class MAGES::Analytics::Event

Overview

The class that represents an event. More…

class Event: public MAGES::Analytics::MAGESAnalyticsObject
{
public:
    // methods

    Event();
    Event(string name);
    Event SetPrefix(string prefix);
    Event AttachDefaultData();
    Event AttachData(string key, object value);
    T GetData< T >(string key);
    virtual override JProperty Export();
};

Inherited Members

public:
    // properties

    JProperty SerializedObject;

    // methods

    virtual T SetName(string name);
    virtual T SetTag(string tag);
    virtual string GetTag();
    virtual T SetTarget(object target);
    virtual T SetMessage(string message);
    virtual abstract JProperty Export() = 0;

Detailed Documentation

The class that represents an event.

Methods

Event()

Initializes a new instance of the Event class.

Event(string name)

Initializes a new instance of the Event class.

Parameters:

name

The name of the new Event.

Event SetPrefix(string prefix)

Sets the store prefix in the DataContainerModule for this Event.

Parameters:

prefix

The store prefix in the DataContainerModule for this Event.

Returns:

The instance of this Event.

Event AttachDefaultData()

Attaches name and timestamp as default data for the Event.

Returns:

The instance of this Event.

Event AttachData(string key, object value)

Attaches data to the Event and stores it to the DataContainerModule.

Parameters:

key

The key of the data.

value

The value of the data.

Returns:

The instance of this Event.

T GetData< T >(string key)

Gets the value of the data stored in the event with the specified key.

Parameters:

key

The key of the data.

T

The type of the data.

Returns:

The value of the data stored in the event with the specified key.

virtual override JProperty Export()

Exports the analytics object.

Returns:

The JObject containg the event data.