api/state.h¶
Namespaces¶
| Name |
|---|
| cvedia |
| cvedia::rt API for controlling the server and lifecycle management of runtime instances. |
| cvedia::rt::iface |
| cvedia::rt::api |
| cvedia::rt::api::state |
Functions¶
| Name | |
|---|---|
| NODISCARD expected< void > | loadJsonFromDisk(std::string const & jsonFile) Load global state from disk. |
| NODISCARD expected< void > | loadFromJsonString(std::string const & data) |
| NODISCARD expected< void > | saveToDiskAsJson(std::string const & path) |
| NODISCARD expected< void > | setNode(std::string const & nodePath, CValue const & value) |
| NODISCARD bool | isNodeSet(std::string const & nodePath) |
| NODISCARD std::string | asJsonString() |
| pCValue | getNodeUnsafe() Get global state. |
| pCValue | getNodeUnsafe(std::string const & nodePath) |
| std::unique_lock< shared_mutex_class > | getWriteLock() |
| std::shared_lock< shared_mutex_class > | getReadLock() |
| uCVDictRoot | getCVDict() |
| uCVDictRoot | getCVDict(std::string const & path) |
| void | clear() |
Functions Documentation¶
function loadJsonFromDisk¶
NODISCARD expected< void > loadJsonFromDisk(
std::string const & jsonFile
)
Load global state from disk.
function loadFromJsonString¶
NODISCARD expected< void > loadFromJsonString(
std::string const & data
)
function saveToDiskAsJson¶
NODISCARD expected< void > saveToDiskAsJson(
std::string const & path
)
function setNode¶
NODISCARD expected< void > setNode(
std::string const & nodePath,
CValue const & value
)
function isNodeSet¶
NODISCARD bool isNodeSet(
std::string const & nodePath
)
function asJsonString¶
NODISCARD std::string asJsonString()
function getNodeUnsafe¶
pCValue getNodeUnsafe()
Get global state.
function getNodeUnsafe¶
pCValue getNodeUnsafe(
std::string const & nodePath
)
function getWriteLock¶
std::unique_lock< shared_mutex_class > getWriteLock()
function getReadLock¶
std::shared_lock< shared_mutex_class > getReadLock()
function getCVDict¶
uCVDictRoot getCVDict()
function getCVDict¶
uCVDictRoot getCVDict(
std::string const & path
)
function clear¶
void clear()