3 #include "config_value.hpp"
4 #include "config_mergeable.hpp"
6 #include <unordered_map>
25 virtual std::shared_ptr<const config>
to_config()
const;
31 virtual shared_object with_value(
path raw_path, shared_value
value)
const = 0;
32 virtual shared_object with_value(std::string key, shared_value
value)
const = 0;
52 virtual std::vector<std::string>
key_set()
const = 0;
55 using iterator = std::unordered_map<std::string, shared_value>::const_iterator;
56 virtual bool is_empty()
const = 0;
57 virtual size_t size()
const = 0;
58 virtual shared_value operator[](std::string
const& key)
const = 0;
59 virtual shared_value get(std::string
const& key)
const = 0;
60 virtual iterator begin()
const = 0;
61 virtual iterator end()
const = 0;
64 shared_value peek_path(
path desired_path)
const;
65 shared_value peek_assuming_resolved(std::string
const& key,
path original_path)
const;
67 virtual shared_object new_copy(resolve_status
const& status, shared_origin origin)
const = 0;
68 shared_value new_copy(shared_origin origin)
const override;
70 shared_value construct_delayed_merge(shared_origin origin, std::vector<shared_value> stack)
const override;
72 virtual std::unordered_map<std::string, shared_value>
const& entry_set()
const = 0;
73 virtual shared_object without_path(
path raw_path)
const = 0;
74 virtual shared_object with_only_path(
path raw_path)
const = 0;
75 virtual shared_object with_only_path_or_null(
path raw_path)
const = 0;
78 static shared_origin merge_origins(std::vector<shared_value>
const& stack);
virtual std::vector< std::string > key_set() const =0
Construct a list of keys in the _value map.
virtual shared_value attempt_peek_with_partial_resolve(std::string const &key) const =0
Look up the key on an only-partially-resolved object, with no transformation or type conversion of an...
virtual std::shared_ptr< const config > to_config() const
Converts this object to a Config instance, enabling you to use path expressions to find values in the...
config_value::type value_type() const override
The type of the value; matches the JSON type schema.
An immutable value, following the JSON type schema.
type
The type of a configuration value (following the JSON type schema).
An immutable map from config paths to config values.
Factory for creating config_document instances.