Generic parsers and converters.
Classes | |
| struct | To |
Functions | |
| 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 , class Duration > | |
| std::chrono::time_point< std::chrono::system_clock, Duration > | Parse (const Value &n, To< std::chrono::time_point< std::chrono::system_clock, Duration > >) |
| 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<typename T , typename Value > | |
| std::enable_if_t< common::kIsFormatValue< Value > &&meta::kIsRange< T > &&!meta::kIsMap< T > &&!std::is_same_v< T, boost::uuids::uuid > &&!std::is_convertible_v< T &, utils::impl::strong_typedef::StrongTypedefTag & >, T > | Parse (const Value &value, To< T >) |
| template<typename T , typename Value > | |
| std::enable_if_t< common::kIsFormatValue< Value > &&meta::kIsMap< T >, T > | Parse (const Value &value, To< T >) |
| template<typename T , typename Value > | |
| std::optional< decltype(Parse(std::declval< Value >(), To< 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<typename T , typename Value > | |
| std::enable_if_t< meta::kIsRange< T > &&!meta::kIsMap< T > &&!std::is_same_v< T, boost::uuids::uuid > &&!std::is_convertible_v< T &, utils::impl::strong_typedef::StrongTypedefTag & >, T > | Convert (const Value &value, To< T >) |
| template<typename T , typename Value > | |
| std::enable_if_t< meta::kIsMap< T >, T > | Convert (const Value &value, To< T >) |
| template<typename T , typename Value > | |
| 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 TMessage , typename = std::enable_if_t< std::is_base_of_v<::google::protobuf::Message, TMessage> && !std::is_same_v<::google::protobuf::Message, TMessage>>> | |
| TMessage | Parse (const json::Value &value, To< TMessage >) |
Conversion from formats::json::Value to google::protobuf::Message. Uses the ProtoJSON format in the same way as protobuf::JsonToMessage called with a default options. | |
| 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 , 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 (std::string_view path, std::type_index type_b) |
| template<class ParseException , typename Variant > | |
| void | ThrowVariantParseException (std::string_view path) |
| template<class Value , typename... Types> | |
| std::variant< decltype(Parse(std::declval< Value >(), To< Types >{}))... > | Parse (const Value &value, formats::parse::To< std::variant< Types... > >) |
| formats::json::Value | Convert (const formats::bson::Value &bson, formats::parse::To< formats::json::Value >) |
| formats::bson::Value | Convert (const formats::json::Value &json, formats::parse::To< formats::bson::Value >) |
| template<typename Message , typename = std::enable_if_t<std::is_base_of_v<google::protobuf::Message, Message>>> | |
| Message | Parse (const json::Value &value, To< Message >) |
Conversion from formats::json::Value to google::protobuf::Message. Uses the same format as ugrpc::JsonToMessage with its default options. | |
| grpc::StatusCode | Parse (const yaml_config::YamlConfig &value, To< grpc::StatusCode >) |
yaml_config::YamlConfig parsing support for grpc::StatusCode. | |
| grpc::StatusCode | Parse (std::string_view value, To< grpc::StatusCode >) |
Support for parsing grpc::StatusCode from string. Used for headers and map keys. | |
| ydb::DistLockSettings | Parse (const yaml_config::YamlConfig &config, To< ydb::DistLockSettings >) |
| ydb::OperationSettings | Parse (const yaml_config::YamlConfig &config, To< ydb::OperationSettings >) |
| boost::optional< std::nullptr_t > formats::parse::Convert | ( | const Value & | , |
| To< boost::optional< std::nullptr_t > > | |||
| ) |
Definition at line 38 of file boost_optional.hpp.
| std::optional< std::nullptr_t > formats::parse::Convert | ( | const Value & | , |
| To< std::optional< std::nullptr_t > > | |||
| ) |
Definition at line 131 of file common_containers.hpp.
| std::chrono::seconds formats::parse::Convert | ( | const Value & | n, |
| To< std::chrono::seconds > | |||
| ) |
Definition at line 135 of file common.hpp.
| boost::optional< T > formats::parse::Convert | ( | const Value & | value, |
| To< boost::optional< T > > | |||
| ) |
Definition at line 30 of file boost_optional.hpp.
| float formats::parse::Convert | ( | const Value & | value, |
| To< float > | |||
| ) |
Definition at line 124 of file common.hpp.
| std::optional< T > formats::parse::Convert | ( | const Value & | value, |
| To< std::optional< T > > | |||
| ) |
Definition at line 123 of file common_containers.hpp.
| std::enable_if_t< meta::kIsInteger< T >, T > formats::parse::Convert | ( | const Value & | value, |
| To< T > | |||
| ) |
Definition at line 129 of file common.hpp.
| std::enable_if_t< meta::kIsRange< T > &&!meta::kIsMap< T > &&!std::is_same_v< T, boost::uuids::uuid > && !std::is_convertible_v< T &, utils::impl::strong_typedef::StrongTypedefTag & >, T > formats::parse::Convert | ( | const Value & | value, |
| To< T > | |||
| ) |
Definition at line 107 of file common_containers.hpp.
| std::enable_if_t< meta::kIsMap< T >, T > formats::parse::Convert | ( | const Value & | value, |
| To< T > | |||
| ) |
Definition at line 115 of file common_containers.hpp.
| Message formats::parse::Parse | ( | const json::Value & | value, |
| To< Message > | |||
| ) |
Conversion from formats::json::Value to google::protobuf::Message. Uses the same format as ugrpc::JsonToMessage with its default options.
Works for google::protobuf::Value, google::protobuf::Struct, google::protobuf::ListValue (top-level and nested) as well, converts them without extra objects in JSON representation.
Use as:
Definition at line 123 of file proto_json.hpp.
| TMessage formats::parse::Parse | ( | const json::Value & | value, |
| To< TMessage > | |||
| ) |
Conversion from formats::json::Value to google::protobuf::Message. Uses the ProtoJSON format in the same way as protobuf::JsonToMessage called with a default options.
Use as:
Definition at line 115 of file convert.hpp.
| 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.
| std::optional< std::nullptr_t > formats::parse::Parse | ( | const Value & | , |
| To< std::optional< std::nullptr_t > > | |||
| ) |
Definition at line 97 of file common_containers.hpp.
| 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 107 of file common.hpp.
| std::enable_if_t< common::kIsFormatValue< Value >, std::chrono::seconds > formats::parse::Parse | ( | const Value & | n, |
| To< std::chrono::seconds > | |||
| ) |
Definition at line 112 of file common.hpp.
| std::chrono::time_point< std::chrono::system_clock, Duration > formats::parse::Parse | ( | const Value & | n, |
| To< std::chrono::time_point< std::chrono::system_clock, Duration > > | |||
| ) |
Definition at line 119 of file common.hpp.
| boost::variant< Types... > formats::parse::Parse | ( | const Value & | value, |
| formats::parse::To< boost::variant< Types... > > | |||
| ) |
Definition at line 44 of file boost_variant.hpp.
| std::variant< decltype(Parse(std::declval< Value >(), To< Types >{}))... > formats::parse::Parse | ( | const Value & | value, |
| formats::parse::To< std::variant< Types... > > | |||
| ) |
Definition at line 69 of file variant.hpp.
| boost::optional< T > formats::parse::Parse | ( | const Value & | value, |
| To< boost::optional< T > > | |||
| ) |
Definition at line 16 of file boost_optional.hpp.
| 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.
| float formats::parse::Parse | ( | const Value & | value, |
| To< float > | |||
| ) |
Definition at line 95 of file common.hpp.
| std::optional< decltype(Parse(std::declval< Value >(), To< T >{}))> formats::parse::Parse | ( | const Value & | value, |
| To< std::optional< T > > | |||
| ) |
Definition at line 89 of file common_containers.hpp.
| std::enable_if_t< common::kIsFormatValue< Value > &&meta::kIsInteger< T >, T > formats::parse::Parse | ( | const Value & | value, |
| To< T > | |||
| ) |
Definition at line 100 of file common.hpp.
| std::enable_if_t< common::kIsFormatValue< Value > &&meta::kIsRange< T > &&!meta::kIsMap< T > &&!std::is_same_v< T, boost::uuids::uuid > && !std::is_convertible_v< T &, utils::impl::strong_typedef::StrongTypedefTag & >, T > formats::parse::Parse | ( | const Value & | value, |
| To< T > | |||
| ) |
Definition at line 79 of file common_containers.hpp.
| std::enable_if_t< common::kIsFormatValue< Value > &&meta::kIsMap< T >, T > formats::parse::Parse | ( | const Value & | value, |
| To< T > | |||
| ) |
Definition at line 84 of file common_containers.hpp.
| 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 19 of file time_of_day.hpp.
| void formats::parse::ThrowVariantAmbiguousParse | ( | std::string_view | path, |
| std::type_index | type_b | ||
| ) |
Definition at line 29 of file variant.hpp.
| void formats::parse::ThrowVariantParseException | ( | std::string_view | path | ) |
Definition at line 40 of file variant.hpp.