class MAGES::AnalyticsModule

Overview

The analytics module base class. More…

class AnalyticsModule: public MAGES::HubModule
{
public:
    // properties

    string ExportPath;
    bool InitializeRuntime;
    bool UploadToCloud;

    // methods

    void InitializeTimer();
    void InvalidateTimer();
    double GetTimeSinceStartUp();
    double GetRealTimeSinceStartUp();
    TQuery AddQuery< TQuery >(string name);
    TQuery GetQuery< TQuery >(string name);
    void RemoveQuery< TQuery >(string name);
    TEvent AddEvent< TEvent >(string name);
    TEvent GetEvent< TEvent >(string name);
    void RemoveEvent< TEvent >(string name);
    void Export(bool upload);
    void Upload(bool showUploadProgressUI);
    void Clean();
};

// direct descendants

class MAGESAnalytics;
class StubAnalytics;

Inherited Members

public:
    // properties

    int Version;

    // methods

    void Startup();
    void Shutdown();
    virtual void UpdateModule(UpdatePhase updatePhase);

Detailed Documentation

The analytics module base class.

Properties

string ExportPath

Gets or sets the export path of analytics data.

bool InitializeRuntime

Gets or sets a value indicating whether the analytics runtime will be initialized or not.

bool UploadToCloud

Gets or sets a value indicating whether to upload the exported data to the cloud.

Methods

void InitializeTimer()

Intializes the analytics timer.

void InvalidateTimer()

Invalidates the analytics timer and resets it.

double GetTimeSinceStartUp()

Gets the time since the last valid start up of the analytics timer in seconds.

Returns:

The time since the last valid start up of the analytics timer in seconds.

double GetRealTimeSinceStartUp()

Gets the time since the start of the operation.

Returns:

The time since the start of the operation.

TQuery AddQuery< TQuery >(string name)

Creates a new query and stores it under the given name.

Parameters:

TQuery

The type of the new query.

name

The name of the query.

Returns:

The newly created query.

TQuery GetQuery< TQuery >(string name)

Retrieves a stored query under the given name.

Parameters:

TQuery

The type of the requested query.

name

The name of the requested query.

Returns:

The requested query.

void RemoveQuery< TQuery >(string name)

Removes a stored query under the given name.

Parameters:

TQuery

The type of the requested query.

name

The name of the query.

TEvent AddEvent< TEvent >(string name)

Creates a new event and stores it under the given name.

Parameters:

TEvent

The type of the requested event.

name

The name of the event.

Returns:

The newly created event.

TEvent GetEvent< TEvent >(string name)

Retrieves a stored event under the given name.

Parameters:

TEvent

The type of the requested event.

name

The name of the requested event.

Returns:

The requested event.

void RemoveEvent< TEvent >(string name)

Removes a stored event under the given name.

Parameters:

TEvent

The type of the requested query.

name

The name of the query.

void Export(bool upload)

Exports the analytics data.

Parameters:

upload

Whether to upload the exported data.

void Upload(bool showUploadProgressUI)

Uploads the exported analytics data.

Parameters:

showUploadProgressUI

The queries with this tag will be exported. Everything is exported if empty.

void Clean()

Cleans the analytics module and all of its data.