xtd 0.2.0
Loading...
Searching...
No Matches
xtd::serialization::yaml Class Reference
Inheritance diagram for xtd::serialization::yaml:
xtd::object

Definition

Represents a YAML content. Typically a xtd::collections::generic::dictionary of xtd::string and xtd::any_object as key value.

Remarks
The xtd::any_object value can be of different type :
type check convert
null_type node.is<yaml::null_type>("key") auto value = node.as<yaml::null_type>("key")
boolean_type node.is<yaml::boolean_type>("key") auto value = node.as<yaml::boolean_type>("key")
integer_type node.is<yaml::integer_type>("key") auto value = node.as<yaml::integer_type>("key")
floating_point_type node.is<yaml::floating_point_type>("key") auto value = node.as<yaml::floating_point_type>("key")
string_type node.is<yaml::string_type>("key") auto value = node.as<yaml::string_type>("key")
sequence_type node.is<yaml::sequence_type>("key") auto value = node.as<yaml::sequence_type>("key")
mapping_type node.is<yaml::mapping_type>("key") auto value = node.as<yaml::mapping_type>("key")
null node.is<null>("key") auto value = node.as<null>("key")
bool node.is<bool>("key") auto value = node.as<bool>("key")
byte node.is<byte>("key") auto value = node.as<byte>("key")
decimal node.is<decimal>("key") auto value = node.as<decimal>("key")
double node.is<double>("key") auto value = node.as<double>("key")
int16 node.is<int16>("key") auto value = node.as<int16>("key")
int32 node.is<int32>("key") auto value = node.as<int32>("key")
int64 node.is<int64>("key") auto value = node.as<int64>("key")
sbyte node.is<sbyte>("key") auto value = node.as<sbyte>("key")
single node.is<single>("key") auto value = node.as<single>("key")
string node.is<string>("key") auto value = node.as<string>("key")
uint16 node.is<uint16>("key") auto value = node.as<uint16>("key")
uint32 node.is<uint32>("key") auto value = node.as<uint32>("key")
uint64 node.is<uint64>("key") auto value = node.as<uint64>("key")

Public Aliases

using boolean_type
using floating_point_type
using integer_type
using mapping_type
using nodes_collection
using null_type
using sequence_type
using string_type

Public Constructors

 yaml (const nodes_collection &nodes)
 yaml (nodes_collection &&nodes)
 yaml (const yaml &)=default
 yaml (yaml &&)=default
yaml & operator= (const yaml &)=default
yaml & operator= (yaml &&)=default

Public Properties

auto nodes () const noexcept -> const nodes_collection &
auto nodes () noexcept -> nodes_collection &
auto nodes (const nodes_collection &nodes) noexcept -> void

Public Metdods

template<class type_t>
auto as (const xtd::string &key) const -> type_t
auto as_boolean (const xtd::string &key) const -> boolean_type
auto as_integer (const xtd::string &key) const
auto as_floating_point (const xtd::string &key) const -> floating_point_type
auto as_mapping (const xtd::string &key) const -> mapping_type
auto as_null (const xtd::string &key) const -> null_type
auto as_sequence (const xtd::string &key) const -> sequence_type
auto as_string (const xtd::string &key) const -> string_type
auto contains_key (const xtd::string &key) const noexcept -> bool
template<class type_t>
auto is (const xtd::string &key) const -> bool
auto is_boolean (const xtd::string &key) const noexcept -> bool
auto is_integer (const xtd::string &key) const noexcept -> bool
auto is_floating_point (const xtd::string &key) const noexcept -> bool
auto is_mapping (const xtd::string &key) const -> bool
auto is_null (const xtd::string &key) const noexcept -> bool
auto is_sequence (const xtd::string &key) const -> bool
auto is_string (const xtd::string &key) const noexcept -> bool

Public Operators

auto operator[] (const xtd::string &key) const -> const xtd::any_object &
auto operator[] (const xtd::string &key) -> xtd::any_object &

Additional Inherited Members

 object ()=default
 Create a new instance of the ultimate base class object.
virtual bool equals (const object &obj) const noexcept
 Determines whether the specified object is equal to the current object.
virtual xtd::size get_hash_code () const noexcept
 Serves as a hash function for a particular type.
virtual type_object get_type () const noexcept
 Gets the type of the current instance.
template<class object_t>
xtd::unique_ptr_object< object_t > memberwise_clone () const
 Creates a shallow copy of the current object.
virtual xtd::string to_string () const
 Returns a xtd::string that represents the current object.
template<class object_a_t, class object_b_t>
static bool equals (const object_a_t &object_a, const object_b_t &object_b) noexcept
 Determines whether the specified object instances are considered equal.
template<class object_a_t, class object_b_t>
static bool reference_equals (const object_a_t &object_a, const object_b_t &object_b) noexcept
 Determines whether the specified object instances are the same instance.

The documentation for this class was generated from the following file:
  • xtd.core/include/xtd/serialization/yaml.hpp