class MAGES::Analytics::MAGESObjective

Overview

The class that represents an objective. More…

class MAGESObjective
{
public:
    // structs

    struct Specification;

    // methods

    MAGESObjective(string objectiveName);
    bool RunQuery(Specification spec, bool filtering = true);
    void UnregisterQuery();
    void EmitObjective(bool state, string description);
    bool ProcessObjective(Specification spec, bool filtering = true);
    void Trigger(AnalyticsTypes.BaseType entryData, bool succeeded);
};

Detailed Documentation

The class that represents an objective.

Methods

MAGESObjective(string objectiveName)

Initializes a new instance of the MAGESObjective class.

Parameters:

objectiveName

The name of the objective.

bool RunQuery(Specification spec, bool filtering = true)

Run the query of the objective.

Parameters:

spec

The specification of the objective.

filtering

Defines if the objective will do filtering from the data container or not.

Returns:

True if the query was successfull.

void UnregisterQuery()

Unregisters the objective query.

void EmitObjective(bool state, string description)

Emits the objective event.

Parameters:

state

the state of the objective(successfull or not).

description

the description of the objective.

bool ProcessObjective(Specification spec, bool filtering = true)

Defines and attaches the objective to the appropriate hook.

Parameters:

spec

The specification of the objective.

filtering

Defines if the objective will do filtering from the data container or not.

Returns:

True if the objective was successfull.

void Trigger(AnalyticsTypes.BaseType entryData, bool succeeded)

Trigger the objective.

Parameters:

entryData

The data associated with the objective.

succeeded

Whether or not the objective succeded.