Github   Telegram
Loading...
Searching...
No Matches
Classes | Functions
formats::parse Namespace Reference

Generic parsers and converters. More...

Classes

struct  To
 

Functions

template<class Value , typename T >
boost::container::flat_set< T > Parse (const Value &value, To< boost::container::flat_set< T > >)
 
template<class Value , typename T >
boost::container::flat_map< std::string, T > Parse (const Value &value, To< boost::container::flat_map< std::string, T > >)
 
template<class Value , typename T >
boost::container::flat_set< T > Convert (const Value &value, To< boost::container::flat_set< T > >)
 
template<class Value , typename T >
boost::container::flat_map< std::string, T > Convert (const Value &value, To< boost::container::flat_map< std::string, T > >)
 
template<class Value , typename T >
boost::optional< T > Parse (const Value &value, To< boost::optional< T > >)
 
template<class Value >
boost::optional< std::nullptr_t > Parse (const Value &, To< boost::optional< std::nullptr_t > >)
 
template<class Value , typename T >
boost::optional< T > Convert (const Value &value, To< boost::optional< T > >)
 
template<class Value >
boost::optional< std::nullptr_t > Convert (const Value &, To< boost::optional< std::nullptr_t > >)
 
template<typename Value >
std::enable_if_t< common::kIsFormatValue< Value >, boost::uuids::uuid > Parse (const Value &value, To< boost::uuids::uuid >)
 
template<class Value , typename... Types>
boost::variant< Types... > Parse (const Value &value, formats::parse::To< boost::variant< Types... > >)
 
template<typename Value >
float Parse (const Value &value, To< float >)
 
template<typename Value , typename T >
std::enable_if_t< common::kIsFormatValue< Value > &&meta::kIsInteger< T >, T > Parse (const Value &value, To< T >)
 
template<typename Value , typename Period >
std::enable_if_t< common::kIsFormatValue< Value >, std::chrono::duration< double, Period > > Parse (const Value &n, To< std::chrono::duration< double, Period > >)
 
template<typename Value >
std::enable_if_t< common::kIsFormatValue< Value >, std::chrono::seconds > Parse (const Value &n, To< std::chrono::seconds >)
 
template<class Value >
std::chrono::system_clock::time_point Parse (const Value &n, To< std::chrono::system_clock::time_point >)
 
template<class Value >
float Convert (const Value &value, To< float >)
 
template<typename Value , typename T >
std::enable_if_t< meta::kIsInteger< T >, T > Convert (const Value &value, To< T >)
 
template<typename Value >
std::chrono::seconds Convert (const Value &n, To< std::chrono::seconds >)
 
template<class Value , typename T >
std::unordered_set< T > Parse (const Value &value, To< std::unordered_set< T > >)
 
template<class Value , typename T >
std::set< T > Parse (const Value &value, To< std::set< T > >)
 
template<class Value , typename T >
std::vector< T > Parse (const Value &value, To< std::vector< T > >)
 
template<class Value , typename T >
std::unordered_map< std::string, T > Parse (const Value &value, To< std::unordered_map< std::string, T > >)
 
template<class Value , typename T >
std::map< std::string, T > Parse (const Value &value, To< std::map< std::string, T > >)
 
template<class Value , typename T >
std::optional< T > Parse (const Value &value, To< std::optional< T > >)
 
template<class Value >
std::optional< std::nullptr_t > Parse (const Value &, To< std::optional< std::nullptr_t > >)
 
template<class Value , typename T >
std::unordered_set< T > Convert (const Value &value, To< std::unordered_set< T > >)
 
template<class Value , typename T >
std::set< T > Convert (const Value &value, To< std::set< T > >)
 
template<class Value , typename T >
std::vector< T > Convert (const Value &value, To< std::vector< T > >)
 
template<class Value , typename T >
std::unordered_map< std::string, T > Convert (const Value &value, To< std::unordered_map< std::string, T > >)
 
template<class Value , typename T >
std::map< std::string, T > Convert (const Value &value, To< std::map< std::string, T > >)
 
template<class Value , typename T >
std::optional< T > Convert (const Value &value, To< std::optional< T > >)
 
template<class Value >
std::optional< std::nullptr_t > Convert (const Value &, To< std::optional< std::nullptr_t > >)
 
template<typename Value , typename Duration >
std::enable_if_t< common::kIsFormatValue< Value >, utils::datetime::TimeOfDay< Duration > > Parse (const Value &value, To< utils::datetime::TimeOfDay< Duration > >)
 
template<typename ParseException , typename Variant , typename TypeA >
void ThrowVariantAmbiguousParse (const std::string &path, std::type_index type_b)
 
template<class ParseException , typename Variant >
void ThrowVariantParseException (const std::string &path)
 
template<class Value , typename... Types>
std::variant< Types... > Parse (const Value &value, formats::parse::To< std::variant< Types... > >)
 

Detailed Description

Generic parsers and converters.

Function Documentation

◆ Convert() [1/14]

template<class Value >
boost::optional< std::nullptr_t > formats::parse::Convert ( const Value &  ,
To< boost::optional< std::nullptr_t > >   
)

Definition at line 40 of file boost_optional.hpp.

◆ Convert() [2/14]

template<class Value >
std::optional< std::nullptr_t > formats::parse::Convert ( const Value &  ,
To< std::optional< std::nullptr_t > >   
)

Definition at line 164 of file common_containers.hpp.

◆ Convert() [3/14]

template<typename Value >
std::chrono::seconds formats::parse::Convert ( const Value &  n,
To< std::chrono::seconds >   
)

Definition at line 116 of file common.hpp.

◆ Convert() [4/14]

template<class Value , typename T >
boost::container::flat_map< std::string, T > formats::parse::Convert ( const Value &  value,
To< boost::container::flat_map< std::string, T > >   
)

Definition at line 41 of file boost_flat_containers.hpp.

◆ Convert() [5/14]

template<class Value , typename T >
boost::container::flat_set< T > formats::parse::Convert ( const Value &  value,
To< boost::container::flat_set< T > >   
)

Definition at line 31 of file boost_flat_containers.hpp.

◆ Convert() [6/14]

template<class Value , typename T >
boost::optional< T > formats::parse::Convert ( const Value &  value,
To< boost::optional< T > >   
)

Definition at line 32 of file boost_optional.hpp.

◆ Convert() [7/14]

template<class Value >
float formats::parse::Convert ( const Value &  value,
To< float >   
)

Definition at line 105 of file common.hpp.

◆ Convert() [8/14]

template<class Value , typename T >
std::map< std::string, T > formats::parse::Convert ( const Value &  value,
To< std::map< std::string, T > >   
)

Definition at line 146 of file common_containers.hpp.

◆ Convert() [9/14]

template<class Value , typename T >
std::optional< T > formats::parse::Convert ( const Value &  value,
To< std::optional< T > >   
)

Definition at line 156 of file common_containers.hpp.

◆ Convert() [10/14]

template<class Value , typename T >
std::set< T > formats::parse::Convert ( const Value &  value,
To< std::set< T > >   
)

Definition at line 118 of file common_containers.hpp.

◆ Convert() [11/14]

template<class Value , typename T >
std::unordered_map< std::string, T > formats::parse::Convert ( const Value &  value,
To< std::unordered_map< std::string, T > >   
)

Definition at line 136 of file common_containers.hpp.

◆ Convert() [12/14]

template<class Value , typename T >
std::unordered_set< T > formats::parse::Convert ( const Value &  value,
To< std::unordered_set< T > >   
)

Definition at line 109 of file common_containers.hpp.

◆ Convert() [13/14]

template<class Value , typename T >
std::vector< T > formats::parse::Convert ( const Value &  value,
To< std::vector< T > >   
)

Definition at line 127 of file common_containers.hpp.

◆ Convert() [14/14]

template<typename Value , typename T >
std::enable_if_t< meta::kIsInteger< T >, T > formats::parse::Convert ( const Value &  value,
To< T >   
)

Definition at line 110 of file common.hpp.

◆ Parse() [1/20]

template<class Value >
boost::optional< std::nullptr_t > formats::parse::Parse ( const Value &  ,
To< boost::optional< std::nullptr_t > >   
)

Definition at line 24 of file boost_optional.hpp.

◆ Parse() [2/20]

template<class Value >
std::optional< std::nullptr_t > formats::parse::Parse ( const Value &  ,
To< std::optional< std::nullptr_t > >   
)

Definition at line 101 of file common_containers.hpp.

◆ Parse() [3/20]

template<typename Value , typename Period >
std::enable_if_t< common::kIsFormatValue< Value >, std::chrono::duration< double, Period > > formats::parse::Parse ( const Value &  n,
To< std::chrono::duration< double, Period > >   
)

Definition at line 86 of file common.hpp.

◆ Parse() [4/20]

template<typename Value >
std::enable_if_t< common::kIsFormatValue< Value >, std::chrono::seconds > formats::parse::Parse ( const Value &  n,
To< std::chrono::seconds >   
)

Definition at line 91 of file common.hpp.

◆ Parse() [5/20]

template<class Value >
std::chrono::system_clock::time_point formats::parse::Parse ( const Value &  n,
To< std::chrono::system_clock::time_point >   
)

Definition at line 98 of file common.hpp.

◆ Parse() [6/20]

template<class Value , typename... Types>
boost::variant< Types... > formats::parse::Parse ( const Value &  value,
formats::parse::To< boost::variant< Types... > >   
)

Definition at line 46 of file boost_variant.hpp.

◆ Parse() [7/20]

template<class Value , typename... Types>
std::variant< Types... > formats::parse::Parse ( const Value &  value,
formats::parse::To< std::variant< Types... > >   
)

Definition at line 65 of file variant.hpp.

◆ Parse() [8/20]

template<class Value , typename T >
boost::container::flat_map< std::string, T > formats::parse::Parse ( const Value &  value,
To< boost::container::flat_map< std::string, T > >   
)

Definition at line 24 of file boost_flat_containers.hpp.

◆ Parse() [9/20]

template<class Value , typename T >
boost::container::flat_set< T > formats::parse::Parse ( const Value &  value,
To< boost::container::flat_set< T > >   
)

Definition at line 17 of file boost_flat_containers.hpp.

◆ Parse() [10/20]

template<class Value , typename T >
boost::optional< T > formats::parse::Parse ( const Value &  value,
To< boost::optional< T > >   
)

Definition at line 16 of file boost_optional.hpp.

◆ Parse() [11/20]

template<typename Value >
std::enable_if_t< common::kIsFormatValue< Value >, boost::uuids::uuid > formats::parse::Parse ( const Value &  value,
To< boost::uuids::uuid >   
)

Valid uuid strings: 0123456789abcdef0123456789abcdef 01234567-89ab-cdef-0123-456789abcdef {01234567-89ab-cdef-0123-456789abcdef} {0123456789abcdef0123456789abcdef}

Definition at line 28 of file boost_uuid.hpp.

◆ Parse() [12/20]

template<typename Value >
float formats::parse::Parse ( const Value &  value,
To< float >   
)

Definition at line 72 of file common.hpp.

◆ Parse() [13/20]

template<class Value , typename T >
std::map< std::string, T > formats::parse::Parse ( const Value &  value,
To< std::map< std::string, T > >   
)

Definition at line 86 of file common_containers.hpp.

◆ Parse() [14/20]

template<class Value , typename T >
std::optional< T > formats::parse::Parse ( const Value &  value,
To< std::optional< T > >   
)

Definition at line 93 of file common_containers.hpp.

◆ Parse() [15/20]

template<class Value , typename T >
std::set< T > formats::parse::Parse ( const Value &  value,
To< std::set< T > >   
)

Definition at line 68 of file common_containers.hpp.

◆ Parse() [16/20]

template<class Value , typename T >
std::unordered_map< std::string, T > formats::parse::Parse ( const Value &  value,
To< std::unordered_map< std::string, T > >   
)

Definition at line 79 of file common_containers.hpp.

◆ Parse() [17/20]

template<class Value , typename T >
std::unordered_set< T > formats::parse::Parse ( const Value &  value,
To< std::unordered_set< T > >   
)

Definition at line 62 of file common_containers.hpp.

◆ Parse() [18/20]

template<class Value , typename T >
std::vector< T > formats::parse::Parse ( const Value &  value,
To< std::vector< T > >   
)

Definition at line 73 of file common_containers.hpp.

◆ Parse() [19/20]

template<typename Value , typename T >
std::enable_if_t< common::kIsFormatValue< Value > &&meta::kIsInteger< T >, T > formats::parse::Parse ( const Value &  value,
To< T >   
)

Definition at line 77 of file common.hpp.

◆ Parse() [20/20]

template<typename Value , typename Duration >
std::enable_if_t< common::kIsFormatValue< Value >, utils::datetime::TimeOfDay< Duration > > formats::parse::Parse ( const Value &  value,
To< utils::datetime::TimeOfDay< Duration > >   
)

Definition at line 20 of file time_of_day.hpp.

◆ ThrowVariantAmbiguousParse()

template<typename ParseException , typename Variant , typename TypeA >
void formats::parse::ThrowVariantAmbiguousParse ( const std::string &  path,
std::type_index  type_b 
)

Definition at line 23 of file variant.hpp.

◆ ThrowVariantParseException()

template<class ParseException , typename Variant >
void formats::parse::ThrowVariantParseException ( const std::string &  path)

Definition at line 34 of file variant.hpp.