|
| Value () noexcept=default |
| Constructs a Value that holds a null.
|
|
| Value (const Value &)=default |
|
| Value (Value &&) noexcept=default |
|
Value & | operator= (const Value &) &=default |
|
Value & | operator= (Value &&other) &noexcept=default |
|
template<class T > |
Value & | operator= (T &&) && |
|
Value | operator[] (std::string_view key) const |
| Access member by key for read.
|
|
Value | operator[] (std::size_t index) const |
| Access array member by index for read.
|
|
const_iterator | begin () const |
| Returns an iterator to the beginning of the held array or map.
|
|
const_iterator | end () const |
| Returns an iterator to the end of the held array or map.
|
|
const_reverse_iterator | rbegin () const |
| Returns an iterator to the reversed begin of the held array.
|
|
const_reverse_iterator | rend () const |
| Returns an iterator to the reversed end of the held array.
|
|
bool | IsEmpty () const |
| Returns whether the array or object is empty. Returns true for null.
|
|
std::size_t | GetSize () const |
| Returns array size, object members count, or 0 for null.
|
|
bool | operator== (const Value &other) const |
| Compares values.
|
|
bool | operator!= (const Value &other) const |
|
bool | IsMissing () const noexcept |
| Returns true if *this holds nothing. When IsMissing() returns true any attempt to get the actual value or iterate over *this will.
|
|
bool | IsNull () const noexcept |
| Returns true if *this holds a null (Type::kNull).
|
|
bool | IsBool () const noexcept |
| Returns true if *this holds a bool.
|
|
bool | IsInt () const noexcept |
| Returns true if *this holds an int.
|
|
bool | IsInt64 () const noexcept |
| Returns true if *this holds an int64_t.
|
|
bool | IsUInt64 () const noexcept |
| Returns true if *this holds an uint64_t.
|
|
bool | IsDouble () const noexcept |
| Returns true if *this holds a double.
|
|
bool | IsString () const noexcept |
| Returns true if *this is holds a std::string.
|
|
bool | IsArray () const noexcept |
| Returns true if *this is holds an array (Type::kArray).
|
|
bool | IsObject () const noexcept |
| Returns true if *this holds a map (Type::kObject).
|
|
template<typename T > |
T | As () const |
| Returns value of *this converted to T.
|
|
template<typename T , typename First , typename... Rest> |
T | As (First &&default_arg, Rest &&... more_default_args) const |
| Returns value of *this converted to T or T(args) if this->IsMissing().
|
|
template<typename T > |
T | As (DefaultConstructed) const |
| Returns value of *this converted to T or T() if this->IsMissing().
|
|
template<typename T > |
T | ConvertTo () const |
| Extracts the specified type with relaxed type checks. For example, true may be converted to 1.0.
|
|
template<typename T , typename First , typename... Rest> |
T | ConvertTo (First &&default_arg, Rest &&... more_default_args) const |
|
bool | HasMember (std::string_view key) const |
| Returns true if *this holds a key .
|
|
std::string | GetPath () const |
| Returns full path to this value.
|
|
Value | Clone () const |
| Returns new value that is an exact copy if the existing one but references different memory (a deep copy of a *this). The returned value is a root value with path '/'.
|
|
void | CheckNotMissing () const |
|
void | CheckArrayOrNull () const |
|
void | CheckObjectOrNull () const |
|
void | CheckObject () const |
|
void | CheckObjectOrArrayOrNull () const |
|
void | CheckInBounds (std::size_t index) const |
|
bool | IsRoot () const noexcept |
| Returns true if *this is a first (root) value.
|
|
bool | DebugIsReferencingSameMemory (const Value &other) const |
| Returns true if *this and other reference the value by the same pointer.
|
|
template<> |
bool | As () const |
|
template<> |
int64_t | As () const |
|
template<> |
uint64_t | As () const |
|
template<> |
double | As () const |
|
template<> |
bool | ConvertTo () const |
|
template<> |
int64_t | ConvertTo () const |
|
template<> |
uint64_t | ConvertTo () const |
|
template<> |
double | ConvertTo () const |
|