Nebula
Loading...
Searching...
No Matches
Core Namespace Reference

Classes

class  CoreServer
 The central core server object initializes a minimal Nebula runtime environment necessary to boot up the rest of Nebula. More...
 
struct  CVar
 A console variable. More...
 
struct  CVarCreateInfo
 Used to create a Core::CVar. More...
 
struct  CVarValue
 
class  ExitHandler
 ExitHandlers are static objects which register themselves automatically once at startup and are called back from the Core::SysFunc::Exit() static method which is called right before a Nebula application exists. More...
 
class  Factory
 Provides the central object factory mechanism for Nebula. More...
 
class  RefCounted
 The common base class of Nebula. More...
 
class  RefCountedList
 Implements a static list which keeps track of all refcounted objects to detect refcounting leaks at application shutdown. More...
 
class  Rtti
 Nebula's runtime type information for one class. More...
 

Enumerations

enum  CVarType { CVar_Int , CVar_Float , CVar_String }
 Denotes the type of a Core::CVar. More...
 

Functions

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

Variables

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

Enumeration Type Documentation

◆ CVarType

Denotes the type of a Core::CVar.

Enumerator
CVar_Int 
CVar_Float 
CVar_String 

Function Documentation

◆ __ImplementClass()

Core::__ImplementClass ( Core::CoreServer ,
'CORS' ,
Core::RefCounted  )

◆ __ImplementRootClass()

Core::__ImplementRootClass ( Core::RefCounted ,
'REFC'  )

◆ __ImplementSingleton()

Core::__ImplementSingleton ( Core::CoreServer )

◆ CVarCreate() [1/2]

CVar * Core::CVarCreate ( CVarCreateInfo const & info)

Create or get a console variable.

◆ CVarCreate() [2/2]

CVar * Core::CVarCreate ( CVarType type,
const char * name,
const char * defaultValue,
const char * description )

Create or get a console variable.

◆ CVarGet()

CVar * Core::CVarGet ( const char * name)

Get a console variable.

◆ CVarGetDescription()

const char * Core::CVarGetDescription ( CVar * cVar)

Get the cvars description.

◆ CVarGetName()

const char * Core::CVarGetName ( CVar * cVar)

Get the cvars name.

◆ CVarGetType()

CVarType Core::CVarGetType ( CVar * cVar)

Get the type of a cvar.

◆ CVarModified()

bool Core::CVarModified ( CVar * cVar)

Check if a CVar has been modified.

◆ CVarNext()

CVar * Core::CVarNext ( CVar * cVar)

increment the iterator

◆ CVarNum()

int Core::CVarNum ( )

Get the number of vars created.

◆ CVarParseWrite()

void Core::CVarParseWrite ( CVar * cVar,
const char * value )

Parse value from c string and assign to cvar.

◆ CVarReadFloat()

float const Core::CVarReadFloat ( CVar * cVar)

Read float value from cvar.

◆ CVarReadInt()

int const Core::CVarReadInt ( CVar * cVar)

Read int value from cvar.

◆ CVarReadString()

const char * Core::CVarReadString ( CVar * cVar)

Read string value from cvar.

◆ CVarsBegin()

CVar * Core::CVarsBegin ( )

Get a pointer to the first cvar in the array.

◆ CVarsEnd()

CVar * Core::CVarsEnd ( )

Get a pointer to the address after the last valid cvar in the array.

◆ CVarSetModified()

void Core::CVarSetModified ( CVar * cVar,
bool value )

Set the modified status of a cvar.

◆ CVarWriteFloat()

void Core::CVarWriteFloat ( CVar * cVar,
float value )

Write float value to cvar.

◆ CVarWriteInt()

void Core::CVarWriteInt ( CVar * cVar,
int value )

Write int value to cvar.

◆ CVarWriteString()

void Core::CVarWriteString ( CVar * cVar,
const char * value )

Write string value to cvar.

Variable Documentation

◆ cVarOffset

uint16_t Core::cVarOffset = 0

◆ cVars

CVar Core::cVars[MAX_CVARS]

◆ cVarTable

Util::HashTable<Util::String, uint16_t> Core::cVarTable

◆ MAX_CVARS

constexpr uint16_t Core::MAX_CVARS = 1024
constexpr