cpp-hocon 0.3.0
Loading...
Searching...
No Matches
types.hpp
1#pragma once
2
3#include <memory>
4#include <vector>
5#include <unordered_map>
6#pragma GCC diagnostic push
7#pragma GCC diagnostic ignored "-Waddress"
8#if defined(__GNUC__) && __GNUC__ > 5
9#pragma GCC diagnostic ignored "-Wnonnull-compare"
10#endif
11#include "boost/variant.hpp"
12#pragma GCC diagnostic pop
13
14namespace hocon {
15
21 using duration = std::pair<int64_t, int>;
22
23 class config;
24 using shared_config = std::shared_ptr<const config>;
25
26 class config_object;
27 using shared_object = std::shared_ptr<const config_object>;
28
29 class config_origin;
30 using shared_origin = std::shared_ptr<const config_origin>;
31
32 class path;
33
34 class config_value;
35 using shared_value = std::shared_ptr<const config_value>;
36
37 class config_list;
38 using shared_list = std::shared_ptr<const config_list>;
39
40 typedef boost::make_recursive_variant<boost::blank, std::string, int64_t, double, int, bool,
41 std::vector<boost::recursive_variant_>, std::unordered_map<std::string,
42 boost::recursive_variant_>>::type unwrapped_value;
43
44 class container;
45 using shared_container = std::shared_ptr<const container>;
46
48 using shared_node = std::shared_ptr<const abstract_config_node>;
49 using shared_node_list = std::vector<shared_node>;
50
51 using shared_string = std::shared_ptr<const std::string>;
52
54
55 class config_includer;
56 using shared_includer = std::shared_ptr<const config_includer>;
57
59 using shared_include_context = std::shared_ptr<const config_include_context>;
60
61 class config_parseable;
62 using shared_parseable = std::shared_ptr<const config_parseable>;
63} // namespace hocon
Context provided to a config_includer; this interface is only useful inside a config_includer impleme...
Implement this interface and provide an instance to config_parse_options.set_includer() to customize ...
Subtype of ConfigValue representing a list value, as in JSON's [1,2,3] syntax.
Definition: config_list.hpp:37
Represents the origin (such as filename and line number) of a config_value for use in error messages.
A set of options related to parsing.
An opaque handle to something that can be parsed, obtained from config_include_context.
An immutable value, following the JSON type schema.
An immutable map from config paths to config values.
Definition: config.hpp:172
An AbstractConfigValue which contains other values.
Definition: container.hpp:12
Factory for creating config_document instances.
Definition: config.hpp:18
std::pair< int64_t, int > duration
A duration represented as a 64-bit integer of seconds plus a 32-bit number of nanoseconds representin...
Definition: types.hpp:21