Defined in header <fkYAML/node.hpp>
fkyaml::basic_node
template<
template <typename, typename...> class SequenceType = std::vector,
template <typename, typename, typename...> class MappingType = std::map,
typename BooleanType = bool,
typename IntegerType = std::int64_t,
typename FloatNumberType = double,
typename StringType = std::string,
template <typename, typename = void> class ConverterType = node_value_converter>
class basic_node;
This class provides features to handle YAML nodes.
Template Paramters
Specializations
- node - default specialization
Member Types
Member Functions
Construction/Destruction
Name |
|
Description |
(constructor) |
|
constructs a basic_node. |
(destructor) |
|
destroys a basic_node, deallocating internal storage if used. |
operator= |
|
assigns values to the basic_node. |
mapping |
(static) |
constructs a basic_node with a mapping container. |
sequence |
(static) |
constructs a basic_node with a sequence container. |
alias_of |
(static) |
constructs a basic_node with an anchor node. |
Inspection for Node Value Types
Name |
Description |
type |
returns the type of a node value in a basic_node. |
is_sequence |
checks if a basic_node has a sequence node value. |
is_mapping |
checks if a basic_node has a mapping node value. |
is_null |
checks if a basic_node has a null node value. |
is_scalar |
checks if a basic_node has a scalar node value. |
is_boolean |
checks if a basic_node has a boolean node value. |
is_integer |
checks if a basic_node has an integer node value. |
is_float_number |
checks if a basic_node has a float number node value. |
is_string |
checks if a basic_node has a string node value. |
Conversions
Name |
|
Description |
deserialize |
(static) |
deserializes a YAML formatted string into a basic_node. |
operator>> |
|
deserializes an input stream into a basic_node. |
serialize |
(static) |
serializes a basic_node into a YAML formatted string. |
operator<< |
|
serializes a basic_node into an output stream. |
get_value |
|
converts a basic_node into a target native data type. |
get_value_ref |
|
converts a basic_node into reference to a target native data type. |
Iterators
Name |
Description |
begin |
returns an iterator to the beginning of mapping/sequence |
end |
returns an iterator to the end of mapping/sequence |
Inspection for Container Node Values
Name |
Description |
contains |
checks if a basic_node has the given key. |
empty |
checks if a basic_node has an empty container. |
size |
returns the size of a container value of a basic_node. |
Accessors for Container Elements
Name |
Description |
operator[] |
accesses an item specified by the key/index. |
at |
accesses an item specified by the key/index with bounds checking. |
Lexicographical Comparison Operators
Aliasing Nodes
Name |
Description |
is_alias |
checks if a basic_node is an alias node. |
is_anchor |
checks if a basic_node is an anchor node. |
add_anchor_name |
registers an anchor name to a basic_node object. |
get_anchor_name |
gets an anchor name associated with a basic_node object. |
has_anchor_name |
checks if a basic_node has any anchor name. |
Modifiers
Name |
Description |
swap |
swaps the internally stored data |