Skip to content

Statistic Management (stat_set.nvgt)

Classes

stat_set

Methods

add

Adds a stat to the set.

stat@ stat_set::add(const string&in name, var@ value, const string&in text = "", stat_callback@ callback = null, dictionary@ user = null);

Arguments:
Returns:

stat@: a handle to the newly added stat object.

delete

Deletes a stat from the set.

bool stat_set::delete(const string&in name);

Arguments:
Returns:

bool: true if the stat was successfully located and deleted, false otherwise.

exists

Determine if a stat with the given name exists in the set.

bool stat_set::exists(const string&in stat_name) const;

Arguments:
Returns:

bool: true if a stat with the specified name exists in the stat_set, false otherwise.

reset

Clears all stats from the set.

void stat_set::reset();

update

Updates a particular stat with a new value.

void stat_set::update(const string&in name, var@ value);

Arguments:

Operators

opIndex

Allows for the easy access of stats with [...] syntax.

stat@ stat_set::opIndex(const string&in stat_name) const;

Arguments:
Returns:

stat@: a handle to a stat with the given name, or null if no stat could be found.

Properties

size

Returns the number of stats in the set.

int stat_set::size;