Nebula
Loading...
Searching...
No Matches
cvar.cc File Reference
#include "cvar.h"
#include "util/hashtable.h"
#include "util/string.h"

Classes

struct  Core::CVarValue
 
struct  Core::CVar
 A console variable. More...
 

Namespaces

namespace  Core
 

Functions

CVarCore::CVarCreate (CVarCreateInfo const &)
 Create or get a console variable.
 
CVarCore::CVarCreate (CVarType type, const char *name, const char *defaultValue, const char *description=nullptr)
 Create or get a console variable.
 
CVarCore::CVarGet (const char *name)
 Get a console variable.
 
void Core::CVarParseWrite (CVar *, const char *value)
 Parse value from c string and assign to cvar.
 
void Core::CVarWriteFloat (CVar *, float value)
 Write float value to cvar.
 
void Core::CVarWriteInt (CVar *, int value)
 Write int value to cvar.
 
void Core::CVarWriteString (CVar *, const char *value)
 Write string value to cvar.
 
int const Core::CVarReadInt (CVar *)
 Read int value from cvar.
 
float const Core::CVarReadFloat (CVar *)
 Read float value from cvar.
 
const char * Core::CVarReadString (CVar *)
 Read string value from cvar.
 
bool Core::CVarModified (CVar *)
 Check if a CVar has been modified.
 
void Core::CVarSetModified (CVar *, bool)
 Set the modified status of a cvar.
 
CVarType Core::CVarGetType (CVar *)
 Get the type of a cvar.
 
const char * Core::CVarGetName (CVar *)
 Get the cvars name.
 
const char * Core::CVarGetDescription (CVar *)
 Get the cvars description.
 
int Core::CVarNum ()
 Get the number of vars created.
 
CVarCore::CVarsBegin ()
 Get a pointer to the first cvar in the array.
 
CVarCore::CVarsEnd ()
 Get a pointer to the address after the last valid cvar in the array.
 
CVarCore::CVarNext (CVar *)
 increment the iterator
 

Variables

constexpr uint16_t Core::MAX_CVARS = 1024
 
uint16_t Core::cVarOffset = 0
 
CVar Core::cVars [MAX_CVARS]
 
Util::HashTable< Util::String, uint16_t > Core::cVarTable