#include
Public Types | |
enum | EConsoleLogMode { eCLM_Off, eCLM_ConsoleAndFile, eCLM_FileOnly, eCLM_FullInfo } |
typedef std::function< void(void)> | CallbackFunction |
Public Member Functions | |
virtual void | Release ()=0 |
virtual int | GetIVal () const =0 |
virtual int64 | GetI64Val () const =0 |
virtual float | GetFVal () const =0 |
virtual const char * | GetString () const =0 |
virtual const char * | GetDataProbeString () const =0 |
virtual void | Set (const char *s)=0 |
virtual void | ForceSet (const char *s)=0 |
virtual void | Set (const float f)=0 |
virtual void | Set (const int i)=0 |
virtual void | ClearFlags (int flags)=0 |
Clear the specified bits in the flag field. | |
virtual int | GetFlags () const =0 |
virtual int | SetFlags (int flags)=0 |
Set the variable's flags. | |
virtual int | GetType ()=0 |
virtual const char * | GetName () const =0 |
virtual const char * | GetHelp ()=0 |
virtual bool | IsConstCVar () const =0 |
virtual void | SetOnChangeCallback (ConsoleVarFunc pChangeFunc)=0 |
virtual uint64 | AddOnChangeFunctor (const SFunctor &pChangeFunctor)=0 |
uint64 | AddOnChange (const CallbackFunction &callback) |
virtual uint64 | GetNumberOfOnChangeFunctors () const =0 |
virtual const SFunctor & | GetOnChangeFunctor (uint64 nFunctorIndex) const =0 |
Returns the number of registered on change functors. | |
virtual bool | RemoveOnChangeFunctor (const uint64 nElement)=0 |
virtual ConsoleVarFunc | GetOnChangeCallback () const =0 |
Get the current callback function. | |
virtual void | GetMemoryUsage (class ICrySizer *pSizer) const =0 |
virtual int | GetRealIVal () const =0 |
virtual void | DebugLog (const int iExpectedValue, const EConsoleLogMode mode) const |
Log difference between expected state and real state. Only useful for CVarGroups. | |
This interface is the 1:1 "C++ representation" of a console variable.
|
inline |
Adds a new on change callback function to the cvar. It will add from index 1 on (0 is reserved).
|
pure virtual |
Adds a new on change functor to the list. It will add from index 1 on (0 is reserved).
|
pure virtual |
Force to set the string value of the variable - can only be called from inside code.
s | String representation the value. |
|
pure virtual |
|
pure virtual |
Return the variable's flags.
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
Only useful for CVarGroups, other types return GetIVal(). CVarGroups set multiple other CVars and this function returns the integer value the CVarGroup should have, when looking at the controlled cvars.
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
Delete the variable.
|
pure virtual |
Removes an on change functor.
|
pure virtual |
Set the string value of the variable.
s | String representation the value. |
|
pure virtual |
Set the float value of the variable.
s | Float representation the value. |
|
pure virtual |
Set the float value of the variable.
s | integer representation the value. |
|
pure virtual |
Set a new on change function callback.