Chira Engine
A customizable MIT-licensed game engine.
chira::ConVar Class Reference
Inheritance diagram for chira::ConVar:
Collaboration diagram for chira::ConVar:

Public Types

using CallbackArg = std::string_view
 

Public Member Functions

 ConVar (std::string name_, ConVarValidType auto defaultValue, int flags_=CON_FLAG_NONE, std::function< void(CallbackArg)> onChanged=[](CallbackArg) {})
 
 ConVar (std::string name_, ConVarValidType auto defaultValue, std::string description_, int flags_=CON_FLAG_NONE, std::function< void(CallbackArg)> onChanged=[](CallbackArg) {})
 
ConVarType getType () const
 
std::string_view getTypeAsString () const
 
template<ConVarValidType T>
getValue () const
 
void setValue (ConVarValidType auto newValue, bool runCallback=true)
 
 operator std::string () const
 
- Public Member Functions inherited from chira::ConEntry
 ConEntry (std::string name_, std::string description_, int flags_=CON_FLAG_NONE)
 
std::string_view getName () const
 
std::string_view getDescription () const
 
bool hasFlag (ConFlags flag) const
 

Static Public Member Functions

static bool areCheatsEnabled ()
 Convenience function to check the value of sv_cheats.
 

Additional Inherited Members

- Protected Attributes inherited from chira::ConEntry
std::string name
 
std::string description
 
int flags
 

Detailed Description

Definition at line 99 of file ConEntry.h.


The documentation for this class was generated from the following files: