Hyprlang
A fast and user-friendly configuration language
|
#include <hyprlang.hpp>
Public Member Functions | |
CConfigValue () | |
CConfigValue (const INT value) | |
CConfigValue (const FLOAT value) | |
CConfigValue (const STRING value) | |
CConfigValue (const VEC2 value) | |
CConfigValue (CUSTOMTYPE &&value) | |
CConfigValue (CConfigValue &&)=delete | |
CConfigValue (const CConfigValue &&)=delete | |
CConfigValue (CConfigValue &)=delete | |
CConfigValue (const CConfigValue &) | |
~CConfigValue () | |
void * | dataPtr () const |
void *const * | getDataStaticPtr () const |
std::any | getValue () const |
Public Attributes | |
bool | m_bSetByUser = false |
Friends | |
class | CConfig |
Container for a config value
Hyprlang::CConfigValue::CConfigValue | ( | ) |
Hyprlang::CConfigValue::CConfigValue | ( | const INT | value | ) |
Hyprlang::CConfigValue::CConfigValue | ( | const FLOAT | value | ) |
Hyprlang::CConfigValue::CConfigValue | ( | const STRING | value | ) |
Hyprlang::CConfigValue::CConfigValue | ( | const VEC2 | value | ) |
Hyprlang::CConfigValue::CConfigValue | ( | CUSTOMTYPE && | value | ) |
|
delete |
|
delete |
|
delete |
Hyprlang::CConfigValue::CConfigValue | ( | const CConfigValue & | ) |
Hyprlang::CConfigValue::~CConfigValue | ( | ) |
void * Hyprlang::CConfigValue::dataPtr | ( | ) | const |
Return a pointer to the data. Prefer getDataStaticPtr()
void *const * Hyprlang::CConfigValue::getDataStaticPtr | ( | ) | const |
Return a static pointer to the m_pData. As long as this configValue is alive, this pointer is valid. CConfigValues are alive as long as the owning CConfig is alive.
Please note only the first (outer) pointer is static. The second may (and most likely will) be changing.
For all types except STRING typeof(**retval) is the config value type (e.g. INT or FLOAT)
Please note STRING is a special type and instead of typeof(**retval) being const char*, typeof(*retval) is a const char*.
|
inline |
Get the contained value as an std::any. For strings, this is a const char*. For custom data types, this is a void* representing the data ptr stored by it.
|
friend |
bool Hyprlang::CConfigValue::m_bSetByUser = false |
a flag to notify whether this value has been set explicitly by the user, or not.