cpp-hocon 0.3.0
Loading...
Searching...
No Matches
config_render_options.hpp
1#pragma once
2
3#include "export.h"
4
5namespace 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
bool get_origin_comments() const
Returns whether the options enable automated origin comments.
config_render_options set_origin_comments(bool value)
Returns options with origin comments toggled.
config_render_options set_comments(bool value)
Returns options with comments toggled.
bool get_formatted() const
Returns whether the options enable formatting.
config_render_options set_formatted(bool value)
Returns options with formatting toggled.
bool get_comments() const
Returns whether the options enable comments.
config_render_options set_json(bool value)
Returns options with JSON toggled.
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...
static config_render_options concise()
Returns concise render options (no whitespace or comments).
bool get_json() const
Returns whether the options enable JSON.
Factory for creating config_document instances.
Definition: config.hpp:18