3#include <Foundation/Basics.h>
4#include <Foundation/Communication/Event.h>
5#include <Foundation/Containers/Map.h>
6#include <Foundation/Strings/String.h>
7#include <Foundation/Types/Variant.h>
49 EventType m_EventType;
64 static MapType s_Stats;
65 static plEventStats s_StatsEvents;
Provides a simple mechanism for mutual exclusion to prevent multiple threads from accessing a shared ...
Definition Mutex.h:13
This class holds a simple map that maps strings (keys) to strings (values), which represent certain s...
Definition Stats.h:15
static void AddEventHandler(plEventStats::Handler handler)
Adds an event handler that is called every time a stat is changed.
Definition Stats.h:57
static const MapType & GetAllStats()
Returns the entire map of stats, can be used to display them.
Definition Stats.h:36
static void RemoveEventHandler(plEventStats::Handler handler)
Removes a previously added event handler.
Definition Stats.h:60
static const plVariant & GetStat(plStringView sStatName)
Returns the value of the given stat. Returns an invalid plVariant, if the stat did not exist before.
Definition Stats.h:33
plStringView represent a read-only sub-string of a larger string, as it can store a dedicated string ...
Definition StringView.h:34
plVariant is a class that can store different types of variables, which is useful in situations where...
Definition Variant.h:44
The event data that is broadcast whenever a stat is changed.
Definition Stats.h:40
EventType
Which type of event this is.
Definition Stats.h:43
@ Add
A variable has been set for the first time.
Definition Stats.h:44
@ Set
A variable has been changed.
Definition Stats.h:45