mrdocs::dom::Value

A variant container for any kind of Dom value.

Synopsis

Declared in <mrdocs/Dom/Value.hpp>
class Value;

Member Functions

Name Description
Value [constructor]Constructors
~Value [destructor]Destructor
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.
type_key Return the type key of the value.
operator std::string Return the string.
operator bool Determine if a value is truthy

Data Members

Name
arr_ [variant member]
b_ [variant member]
fn_ [variant member]
i_ [variant member]
obj_ [variant member]
str_ [variant member]

Friends

|===
Name Description
toString Return value as a string.
operator&&
operator&&
operator&& Return the first dom::Value that is not truthy, or the last one.
operator||
operator||
operator|| Return the first dom::Value that is truthy, or the last one.
operator+
operator+
operator+ Add or concatenate two values.
operator<=> Three-way comparison operator
operator<=> Three-way comparison operator
operator<=> Compare two values for inequality.
operator== Compare two values for equality.
swap Swap two values.
safeString Create a wrapper for a safe string.
Object A container of key and value pairs.
Array An array of values

Non-Member Functions

Name Description
ValueFromConvert an object of type T to dom::Value.
ValueFromConvert an object of type T to dom::Value with a context
stringOrNullReturn a non-empty string, or a null.
stringOrNullReturn a non-empty string, or a null.
stringOrNullReturn a non-empty string, or a null.
JSON::stringifyStringify a value as JSON
::mrdocs::isEmptyDetermine if a value is empty
::mrdocs::helpers::detag_fn"detag" helper function
::mrdocs::helpers::increment_fn"increment" helper function
::mrdocs::helpers::or_fn"or" helper function
::mrdocs::helpers::relativize_fn"relativize" helper function
::mrdocs::helpers::select_fn"select" helper function

Created with MrDocs