cpp-hocon 0.3.0
Loading...
Searching...
No Matches
config_node_object.hpp
1#pragma once
2
3#include "config_node_complex_value.hpp"
4#include "config_node_path.hpp"
5#include <hocon/path.hpp>
6#include <hocon/config_syntax.hpp>
7
8namespace hocon {
9
10 class config_node_object;
11 using shared_node_object = std::shared_ptr<const config_node_object>;
12
14 public:
15 config_node_object(shared_node_list children);
16
17 std::shared_ptr<const config_node_complex_value> new_node(
18 shared_node_list nodes) const override;
19
20 bool has_value(path desired_path) const;
21
22 shared_node_object change_value_on_path(path desired_path,
23 shared_node_value value,
24 config_syntax flavor) const;
25
26 shared_node_object set_value_on_path(std::string desired_path,
27 shared_node_value value,
28 config_syntax flavor = config_syntax::CONF) const;
29
30 shared_node_object set_value_on_path(config_node_path desired_path,
31 shared_node_value value,
32 config_syntax flavor = config_syntax::CONF) const;
33
34 shared_node_list indentation() const;
35
36 shared_node_object add_value_on_path(config_node_path desired_path,
37 shared_node_value value,
38 config_syntax flavor) const;
39
40 shared_node_object remove_value_on_path(std::string desired_path, config_syntax flavor) const;
41
42 static bool contains_token(shared_node node, token_type token);
43 };
44
45} // namespace hocon
Factory for creating config_document instances.
Definition: config.hpp:18