cpp-hocon 0.3.0
Loading...
Searching...
No Matches
config_null.hpp
1#pragma once
2
3#include <hocon/config_value.hpp>
4#include <internal/simple_config_origin.hpp>
5
6#include <string>
7
8namespace hocon {
9
17 class config_null : public config_value {
18 public:
19 config_null(shared_origin origin);
20
22 std::string transform_to_string() const override;
23
24 unwrapped_value unwrapped() const override;
25
26 bool operator==(config_value const& other) const override;
27
28 protected:
29 shared_value new_copy(shared_origin) const override;
30 void render(std::string& result, int indent, bool at_root, config_render_options options) const override;
31 };
32
33} // namespace hocon
This exists because sometimes null is not the same as missing.
Definition: config_null.hpp:17
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.
virtual shared_origin const & origin() const
The origin of the value (file, line number, etc.), for debugging and error messages.
type
The type of a configuration value (following the JSON type schema).
virtual std::string render() const
Renders the config value as a HOCON string.
Factory for creating config_document instances.
Definition: config.hpp:18