3 #include <hocon/config_value.hpp>
4 #include <hocon/config_list.hpp>
5 #include <hocon/config_render_options.hpp>
6 #include <hocon/config_exception.hpp>
7 #include <internal/container.hpp>
11 #include <boost/optional.hpp>
21 resolve_status get_resolve_status()
const override {
return _resolved; }
23 shared_value
replace_child(shared_value
const& child, shared_value replacement)
const override;
26 shared_value
relativized(
const std::string prefix)
const override;
28 bool contains(shared_value v)
const {
return std::find(_value.begin(), _value.end(), v) != _value.end(); }
29 bool contains_all(std::vector<shared_value>)
const;
31 int index_of(shared_value v) {
32 auto pos = find(_value.begin(), _value.end(), v);
33 if (pos == _value.end()) {
36 return pos - _value.begin();
41 bool is_empty()
const override {
return _value.empty(); }
42 size_t size()
const override {
return _value.size(); }
43 shared_value operator[](
size_t index)
const override {
return _value.at(index); }
44 shared_value get(
size_t index)
const override {
return _value.at(index); }
45 iterator begin()
const override {
return _value.begin(); }
46 iterator end()
const override {
return _value.end(); }
48 std::shared_ptr<const simple_config_list> concatenate(std::shared_ptr<const simple_config_list> other)
const;
50 unwrapped_value unwrapped()
const override;
52 bool operator==(config_value
const& other)
const override;
55 resolve_result<shared_value>
56 resolve_substitutions(resolve_context
const& context, resolve_source
const& source)
const override;
57 shared_value new_copy(shared_origin
origin)
const override;
59 void render(std::string& result,
int indent,
bool at_root, config_render_options options)
const override;
62 static const long _serial_version_UID = 2L;
63 const std::vector<shared_value> _value;
64 const resolve_status _resolved;
66 std::shared_ptr<const simple_config_list>
67 modify(no_exceptions_modifier& modifier, boost::optional<resolve_status> new_resolve_status)
const;
69 std::shared_ptr<const simple_config_list>
70 modify_may_throw(modifier& modifier, boost::optional<resolve_status> new_resolve_status)
const;
72 struct resolve_modifier;