|
CX Framework
Cross-platform C utility framework
|
Macros | |
| #define | ssdPtr(root, path) _ssdPtr(root, path, (SSDLockState*)&_ssdCurrentLockState->_is_SSDLockState) |
| #define | ssdStrRef(root, path) _ssdStrRef(root, path, (SSDLockState*)&_ssdCurrentLockState->_is_SSDLockState) |
| #define | ssdObjInstPtr(root, path) _ssdObjInstPtr(root, path, (SSDLockState*)&_ssdCurrentLockState->_is_SSDLockState) |
| #define | ssdObjPtr(root, path, clsname) objDynCast(clsname, ssdObjInstPtr(root, path)) |
Functions that return pointers to internal storage. These require explicit locking via ssdLockedTransaction() and are only valid while the lock is held.
| #define ssdObjInstPtr | ( | root, | |
| path | |||
| ) | _ssdObjInstPtr(root, path, (SSDLockState*)&_ssdCurrentLockState->_is_SSDLockState) |
ObjInst *ssdObjInstPtr(SSDNode *root, strref path)
Returns an object instance pointer directly from internal storage.
CRITICAL: This function MUST be used within a ssdLockedTransaction(). The pointer is only valid while the lock is held.
| root | The root node |
| path | Path to the object value |
| #define ssdObjPtr | ( | root, | |
| path, | |||
| clsname | |||
| ) | objDynCast(clsname, ssdObjInstPtr(root, path)) |
ClassName *ssdObjPtr(SSDNode *root, strref path, ClassName)
Returns a typed object pointer with runtime type checking.
This is a convenience wrapper around ssdObjInstPtr() that performs a dynamic cast to the specified class type.
| root | The root node |
| path | Path to the object value |
| clsname | The class name to cast to |
| #define ssdPtr | ( | root, | |
| path | |||
| ) | _ssdPtr(root, path, (SSDLockState*)&_ssdCurrentLockState->_is_SSDLockState) |
stvar *ssdPtr(SSDNode *root, strref path)
Returns a pointer to the internal stvar storage at the specified path.
CRITICAL: This function MUST be used within a ssdLockedTransaction() or manual lock. The pointer is only valid while the lock is held. Accessing it after the lock is released results in undefined behavior.
| root | The root node |
| path | Path to the value |
Example:
| #define ssdStrRef | ( | root, | |
| path | |||
| ) | _ssdStrRef(root, path, (SSDLockState*)&_ssdCurrentLockState->_is_SSDLockState) |
strref ssdStrRef(SSDNode *root, strref path)
Returns a string reference directly from internal storage.
CRITICAL: This function MUST be used within a ssdLockedTransaction(). The string reference is only valid while the lock is held.
| root | The root node |
| path | Path to the string value |