A variant container for any kind of Dom value.
Declared in <mrdocs/Dom/Value.hpp>
class Value;
| Name | Description |
|---|---|
Value [constructor] | Constructors |
~Value [destructor] | Destroy the contained value, releasing owned storage. |
operator= | Assignment operators |
empty | Return if an Array or Object is empty. |
exists | Return true if a key exists. |
get | get overloads |
getArray | Return the array. |
getBool | Return the underlying boolean value. |
getFunction | Return the function. |
getInteger | Return the underlying integer value. |
getObject | Return the object. |
getString | Return the underlying string value. |
isArray | Return true if this is an array. |
isBoolean | Return true if this is a boolean. |
isFunction | Return true if this is a function. |
isInteger | Return true if this is an integer. |
isNull | Return true if this is null. |
isObject | Return true if this is an object. |
isSafeString | Return true if this is a safe string. |
isString | Return true if this is a string. |
isTruthy | Determine if a value is truthy |
isUndefined | Return true if this is undefined. |
kind | Return the type of value contained. |
lookup | Lookup a sequence of keys. |
operator() | Invoke the function. |
set | Set or replace the value for a given key. |
size | Return if an Array or Object is empty. |
swap | Swap two values. |
typeKey | Return the type key of the value. |
operator bool | Determine if a value is truthy |
operator std::string | Return the string. |
| Name | Description |
|---|---|
arr_ [variant member] | Array payload; shared with lazy arrays. |
b_ [variant member] | Boolean payload when the value kind is Boolean. |
fn_ [variant member] | Callable payload used by template helpers. |
i_ [variant member] | Integer payload when the value kind is Integer. |
obj_ [variant member] | Object payload; shared with lazy objects. |
str_ [variant member] | UTF-8 string or safe-string payload. |
| Name | Description |
|---|---|
mrdocs::dom::toString | Return value as a string. |
mrdocs::dom::operator&& | |
mrdocs::dom::operator&& | |
mrdocs::dom::operator&& | Return the first dom::Value that is not truthy, or the last one. |
mrdocs::dom::operator|| | |
mrdocs::dom::operator|| | |
mrdocs::dom::operator|| | Return the first dom::Value that is truthy, or the last one. |
mrdocs::dom::operator+ | |
mrdocs::dom::operator+ | |
mrdocs::dom::operator+ | Add or concatenate two values. |
mrdocs::dom::operator<=> | Three-way comparison operator |
mrdocs::dom::operator<=> | Three-way comparison operator |
mrdocs::dom::operator<=> | Compare two values for inequality. |
mrdocs::dom::operator== | Compare two values for equality. |
mrdocs::dom::swap | Swap two values. |
mrdocs::safeString | Create a wrapper for a safe string. |
mrdocs::dom::Object | A container of key and value pairs. |
mrdocs::dom::Array | An array of values |
| Name | Description |
|---|---|
stringOrNull | Return a non-empty string, or a null. |
stringOrNull | Return a non-empty string, or a null. |
valueFrom | Convert an object of type T to dom::Value. |
valueFrom | Convert an object of type T to dom::Value with a context |
JSON::stringify | Stringify a value as JSON |
::mrdocs::buildCorpusDom | Build a DOM object representing an entire corpus. |
::mrdocs::buildCorpusDom | Build a DOM object representing an entire corpus. |
::mrdocs::buildSymbolDom | Build the DOM value for a single symbol. |
::mrdocs::safeString | Return a DOM string ensuring special characters are escaped. |
::mrdocs::safeString | Mark an existing string-like value as safe to emit without escaping. |
::mrdocs::handlebars::isEmpty | Determine if a value is empty |
::mrdocs::handlebars::helpers::blockHelperMissingFn | The blockHelperMissing helper: renders a block for a missing block helper. |
::mrdocs::handlebars::helpers::detagFn | "detag" helper function |
::mrdocs::handlebars::helpers::incrementFn | "increment" helper function |
::mrdocs::handlebars::helpers::orFn | "or" helper function |
::mrdocs::handlebars::helpers::selectFn | "select" helper function |