|
Configuru
|
This struct basically contain all the way we can tweak the file format. More...
#include <configuru.hpp>
Public Member Functions | |
| bool | compact () const |
Public Attributes | |
| std::string | indentation = "\t" |
| bool | enforce_indentation = true |
| Must have correct indentation? | |
| bool | end_with_newline = true |
| End each file with a newline (unless compact). | |
| bool | empty_file = false |
| If true, an empty file is an empty object. | |
| bool | implicit_top_object = true |
| Ok with key-value pairs top-level? | |
| bool | implicit_top_array = true |
| Ok with several values top-level? | |
| bool | single_line_comments = true |
| Allow this? | |
| bool | block_comments = true |
| bool | nesting_block_comments = true |
| /* Allow /* this? */ */ | |
| bool | inf = true |
| Allow +inf, -inf. | |
| bool | nan = true |
| Allow +NaN. | |
| bool | hexadecimal_integers = true |
| Allow 0xff. | |
| bool | binary_integers = true |
| Allow 0b1010. | |
| bool | unary_plus = true |
| Allow +42. | |
| bool | distinct_floats = true |
| Print 9.0 as "9.0", not just "9". A must for round-tripping. | |
| bool | array_omit_comma = true |
| Allow [1 2 3]. | |
| bool | array_trailing_comma = true |
| Allow [1, 2, 3,]. | |
| bool | identifiers_keys = true |
| { is_this_ok: true } | |
| bool | object_separator_equal = false |
| { "is_this_ok" = true } | |
| bool | allow_space_before_colon = false |
| { "is_this_ok" : true } | |
| bool | omit_colon_before_object = false |
| { "nested_object" { } } | |
| bool | object_omit_comma = true |
| Allow {a:1 b:2}. | |
| bool | object_trailing_comma = true |
| Allow {a:1, b:2,}. | |
| bool | object_duplicate_keys = false |
| Allow {"a":1, "a":2}. | |
| bool | object_align_values = true |
| Add spaces after keys to align subsequent values. | |
| bool | str_csharp_verbatim = true |
| Allow "Verbatim". | |
| bool | str_python_multiline = true |
| Allow """ Python\nverbatim strings """. | |
| bool | str_32bit_unicode = true |
| Allow "\U0030dbfd". | |
| bool | str_allow_tab = true |
| Allow unescaped tab in string. | |
| bool | allow_macro = true |
Allow #include "some_other_file.cfg" | |
| bool | write_comments = true |
| bool | sort_keys = false |
| Sort keys lexicographically. If false, sort by order they where added. | |
| bool | write_uninitialized = false |
| When printing, write uninitialized values as UNINITIALIZED. Useful for debugging. | |
| bool | mark_accessed = true |
| Dumping should mark the json as accessed? | |
This struct basically contain all the way we can tweak the file format.
| std::string configuru::FormatOptions::indentation = "\t" |
Indentation should be a single tab, multiple spaces or an empty string. An empty string means the output will be compact.
1.8.11