cpp-hocon 0.3.0
Loading...
Searching...
No Matches
config_list.hpp
1#pragma once
2
3#include "types.hpp"
4#include "export.h"
5#include <vector>
6
7namespace hocon {
8
37 class LIBCPP_HOCON_EXPORT config_list : public config_value {
38 public:
39 config_list(shared_origin origin) : config_value(move(origin)) {}
40
41 // list interface
42 using iterator = std::vector<shared_value>::const_iterator;
43 virtual bool is_empty() const = 0;
44 virtual size_t size() const = 0;
45 virtual shared_value operator[](size_t index) const = 0;
46 virtual shared_value get(size_t index) const = 0;
47 virtual iterator begin() const = 0;
48 virtual iterator end() const = 0;
49 virtual unwrapped_value unwrapped() const = 0;
50 };
51} // namespace hocon
Subtype of ConfigValue representing a list value, as in JSON's [1,2,3] syntax.
Definition: config_list.hpp:37
An immutable value, following the JSON type schema.
Factory for creating config_document instances.
Definition: config.hpp:18