cpp-hocon  0.3.0
config_render_options.hpp
1 #pragma once
2 
3 #include "export.h"
4 
5 namespace hocon {
6 
20  class LIBCPP_HOCON_EXPORT config_render_options {
21  public:
26  config_render_options(bool origin_comments = true, bool comments = true,
27  bool formatted = true, bool json = true);
28 
36 
47 
54  bool get_comments() const;
55 
73 
80  bool get_origin_comments() const;
81 
91 
98  bool get_formatted() const;
99 
112 
119  bool get_json() const;
120 
121  private:
122  bool _origin_comments;
123  bool _comments;
124  bool _formatted;
125  bool _json;
126  };
127 
128 } // namespace hocon
hocon::config_render_options::set_json
config_render_options set_json(bool value)
Returns options with JSON toggled.
hocon::config_render_options::get_formatted
bool get_formatted() const
Returns whether the options enable formatting.
hocon::config_render_options::set_formatted
config_render_options set_formatted(bool value)
Returns options with formatting toggled.
hocon::config_render_options::config_render_options
config_render_options(bool origin_comments=true, bool comments=true, bool formatted=true, bool json=true)
Leaving the default arguments will result in a verbose rendering, which contains comments and therefo...
hocon
Factory for creating config_document instances.
Definition: config.hpp:18
hocon::config_render_options
Definition: config_render_options.hpp:20
hocon::value
Definition: tokens.hpp:8
hocon::config_render_options::get_origin_comments
bool get_origin_comments() const
Returns whether the options enable automated origin comments.
hocon::config_render_options::concise
static config_render_options concise()
Returns concise render options (no whitespace or comments).
hocon::config_render_options::get_json
bool get_json() const
Returns whether the options enable JSON.
hocon::config_render_options::set_comments
config_render_options set_comments(bool value)
Returns options with comments toggled.
hocon::config_render_options::get_comments
bool get_comments() const
Returns whether the options enable comments.
hocon::config_render_options::set_origin_comments
config_render_options set_origin_comments(bool value)
Returns options with origin comments toggled.