StatHistory

Accesses the history of an empire's stat. Locks the stat, so limit access to these histories.

Methods

bool toTail( )

Advances to the most recent stat entry. Returns bool : True if there was a tail to move to.

bool toHead( )

Advances to the earliest stat entry. Returns bool : True if there was a head to move to.

bool advance( int offset = 1 )

Advances to another stat entry. Returns bool : Returns true if an entry existed at the offset.

int get_intVal( ) const

Returns the stat's value as an integer.

float get_floatVal( ) const

Returns the stat's value as a float.

uint get_time( ) const

Returns the stat's timestamp in seconds from the start of the game.

bool advanceEvent( )

Advances to the next event for the current stat. Returns bool : True if there was an event to advance to.

uint get_eventType( ) const

Returns the current event's type identifier.

string get_eventName( ) const

Returns the current event's name.