JSON Voorhees
Killer JSON for C++
|
A node handle used when a value is kind::object to access elements of the object in potentially destructive manner. More...
#include <jsonv/value.hpp>
Public Types | |
using | key_type = std::string |
The key type of the object. | |
using | mapped_type = value |
The mapped type of the object. | |
Public Member Functions | |
object_node_handle (object_node_handle &&) noexcept | |
object_node_handle & | operator= (object_node_handle &&) noexcept |
bool | empty () const noexcept |
operator bool () const noexcept | |
key_type & | key () const |
Returns a non-const reference to the key_type member of the element. More... | |
mapped_type & | mapped () const |
Returns a non-const reference to the mapped_type member of the element. More... | |
Friends | |
class | value |
A node handle used when a value is kind::object to access elements of the object in potentially destructive manner.
This makes it possible to modify the contents of a node extracted from an object, and then re-insert it without having to copy the element.
|
inlinenoexcept |
key_type& jsonv::object_node_handle::key | ( | ) | const |
mapped_type& jsonv::object_node_handle::mapped | ( | ) | const |
Returns a non-const reference to the mapped_type member of the element.
std::invalid_argument | if the node handle is empty. |
|
inlineexplicitnoexcept |