43 using native_iter = YAML::const_iterator;
44 using value_type = formats::
yaml::Value;
45 using reference =
const formats::
yaml::Value&;
46 using pointer =
const formats::
yaml::Value*;
54 using Builder = ValueBuilder;
63 Value& operator=(Value&&);
64 Value& operator=(
const Value&);
67 Value& operator=(T&&) && {
70 "You're assigning to a temporary formats::yaml::Value! Use "
71 "formats::yaml::ValueBuilder for data modifications."
82 Value(Value&& other, std::string path_prefix);
100 const_iterator
end()
const;
160 template <
typename T>
166 template <
typename T,
typename First,
typename... Rest>
167 auto As(First&& default_arg, Rest&&... more_default_args)
const;
172 template <
typename T>
252 class EmplaceEnabler {};
256 Value(EmplaceEnabler,
const YAML::Node& value,
const formats::
yaml::
Path& path, std::string_view key);
258 Value(EmplaceEnabler,
const YAML::Node& value,
const formats::
yaml::
Path& path, size_t index);
260 Value CloneWithReplacedPath(std::string&& new_path)
const;
264 Value(
const YAML::Node& root)
noexcept;
266 static Value MakeNonRoot(
const YAML::Node& value,
const formats::
yaml::
Path& path, std::string_view key);
267 static Value MakeNonRoot(
const YAML::Node& val,
const formats::
yaml::
Path& path, size_t index);
269 const YAML::Node& GetNative()
const;
270 YAML::Node& GetNative();
271 int GetExtendedType()
const;
274 bool IsConvertibleToArithmetic()
const;
277 T ValueAsArithmetic()
const;
279 static constexpr std::size_t kNativeNodeSize = 64;
280 static constexpr std::size_t kNativeAlignment =
alignof(
void*);
282 utils::FastPimpl<YAML::Node, kNativeNodeSize, kNativeAlignment> value_pimpl_;
286 friend class ValueBuilder;
288 friend bool Parse(
const Value& value,
parse::To<
bool>);
289 friend int64_t Parse(
const Value& value,
parse::To<int64_t>);
290 friend uint64_t Parse(
const Value& value,
parse::To<uint64_t>);
291 friend double Parse(
const Value& value,
parse::To<
double>);
292 friend std::string Parse(
const Value& value,
parse::To<std::string>);
297 friend formats::
yaml::Value impl::FromStringAllowRepeatedKeys(
const std::string& doc);