cpp-hocon  0.3.0
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 
8 namespace hocon {
9 
17  class config_null : public config_value {
18  public:
19  config_null(shared_origin origin);
20 
21  config_value::type value_type() const override;
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
hocon::config_value::origin
virtual shared_origin const & origin() const
The origin of the value (file, line number, etc.), for debugging and error messages.
hocon::config_value::type
type
The type of a configuration value (following the JSON type schema).
Definition: config_value.hpp:56
hocon::config_null
This exists because sometimes null is not the same as missing.
Definition: config_null.hpp:17
hocon
Factory for creating config_document instances.
Definition: config.hpp:18
hocon::config_null::value_type
config_value::type value_type() const override
The type of the value; matches the JSON type schema.
hocon::config_value::render
virtual std::string render() const
Renders the config value as a HOCON string.
hocon::config_render_options
Definition: config_render_options.hpp:20
hocon::config_value
An immutable value, following the JSON type schema.
Definition: config_value.hpp:39