cpp-hocon  0.3.0
config_boolean.hpp
1 #pragma once
2 
3 #include <hocon/config_value.hpp>
4 
5 namespace hocon {
6 
7  class config_boolean : public config_value {
8  public:
9  config_boolean(shared_origin origin, bool value);
10 
11  config_value::type value_type() const override;
12  std::string transform_to_string() const override;
13 
14  unwrapped_value unwrapped() const override;
15 
16  bool bool_value() const;
17  bool operator==(config_value const& other) const override;
18 
19  protected:
20  shared_value new_copy(shared_origin) const override;
21 
22  private:
23  bool _value;
24  };
25 } // namespace hocon;
26 
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_boolean
Definition: config_boolean.hpp:7
hocon::config_value::type
type
The type of a configuration value (following the JSON type schema).
Definition: config_value.hpp:56
hocon::config_boolean::value_type
config_value::type value_type() const override
The type of the value; matches the JSON type schema.
hocon
Factory for creating config_document instances.
Definition: config.hpp:18
hocon::value
Definition: tokens.hpp:8
hocon::config_value
An immutable value, following the JSON type schema.
Definition: config_value.hpp:39