NeBuild dev
|
#include "std_string.hpp"
#include "std_new.hpp"
#include <cstdint>
#include <cstddef>
#include <cstring>
#include <cfloat>
#include <climits>
#include <cmath>
#include <limits>
#include <memory>
#include <iosfwd>
#include <type_traits>
#include "header_start.hpp"
#include "header_end.hpp"
Go to the source code of this file.
Classes | |
struct | inserter< T > |
Helper class for suppressing move-construction in single-argument array constructors. More... | |
Namespaces | |
namespace | toml |
The root namespace for all toml++ functions and types. | |
Typedefs | |
using | default_formatter = toml_formatter |
The 'default' formatter used by TOML objects when they are printed to a stream. \detail This is an alias for #toml::toml_formatter. | |
Functions | |
template<typename Char > | |
std::basic_ostream< Char > & | operator<< (std::basic_ostream< Char > &lhs, node_type rhs) |
Pretty-prints the value of a node_type to a stream. | |
enum TOML_OPEN_FLAGS_ENUM | TOML_MAKE_FLAGS (value_flags) |
enum TOML_CLOSED_FLAGS_ENUM | TOML_MAKE_FLAGS (format_flags) |
template<typename T > | |
inserter (T &&) -> inserter< T && > | |
template<typename T > | |
inserter (T &) -> inserter< T & > | |
Variables | |
TOML_DISABLE_WARNINGS | |
TOML_ENABLE_WARNINGS | |
TOML_NAMESPACE_START | |
enum TOML_OPEN_FLAGS_ENUM | value_flags |
Metadata associated with TOML values. | |
enum TOML_OPEN_FLAGS_ENUM | format_as_binary = 1 |
Format integer values as binary. | |
enum TOML_OPEN_FLAGS_ENUM | format_as_octal = 2 |
Format integer values as octal. | |
enum TOML_OPEN_FLAGS_ENUM | format_as_hexadecimal = 3 |
Format integer values as hexadecimal. | |
constexpr value_flags | preserve_source_value_flags |
Special #toml::value_flags constant used for array + table insert functions to specify that any value nodes being copied should not have their flags property overridden by the inserting function's flags argument. | |
enum TOML_CLOSED_FLAGS_ENUM | format_flags |
Format flags for modifying how TOML data is printed to streams. | |
enum TOML_CLOSED_FLAGS_ENUM | quote_dates_and_times = (1ull << 0) |
Dates and times will be emitted as quoted strings. | |
enum TOML_CLOSED_FLAGS_ENUM | quote_infinities_and_nans = (1ull << 1) |
Infinities and NaNs will be emitted as quoted strings. | |
enum TOML_CLOSED_FLAGS_ENUM | allow_literal_strings = (1ull << 2) |
Strings will be emitted as single-quoted literal strings where possible. | |
enum TOML_CLOSED_FLAGS_ENUM | allow_multi_line_strings = (1ull << 3) |
Strings containing newlines will be emitted as triple-quoted 'multi-line' strings where possible. | |
enum TOML_CLOSED_FLAGS_ENUM | allow_real_tabs_in_strings = (1ull << 4) |
Allow real tab characters in string literals (as opposed to the escaped form \t ). | |
enum TOML_CLOSED_FLAGS_ENUM | allow_unicode_strings = (1ull << 5) |
Allow non-ASCII characters in strings (as opposed to their escaped form, e.g. \u00DA ). | |
enum TOML_CLOSED_FLAGS_ENUM | allow_binary_integers = (1ull << 6) |
Allow integers with #value_flags::format_as_binary to be emitted as binary. | |
enum TOML_CLOSED_FLAGS_ENUM | allow_octal_integers = (1ull << 7) |
Allow integers with #value_flags::format_as_octal to be emitted as octal. | |
enum TOML_CLOSED_FLAGS_ENUM | allow_hexadecimal_integers = (1ull << 8) |
Allow integers with #value_flags::format_as_hexadecimal to be emitted as hexadecimal. | |
enum TOML_CLOSED_FLAGS_ENUM | indent_sub_tables = (1ull << 9) |
Apply indentation to tables nested within other tables/arrays. | |
enum TOML_CLOSED_FLAGS_ENUM | indent_array_elements = (1ull << 10) |
Apply indentation to array elements when the array is forced to wrap over multiple lines. | |
enum TOML_CLOSED_FLAGS_ENUM | indentation = indent_sub_tables | indent_array_elements |
Combination mask of all indentation-enabling flags. | |
enum TOML_CLOSED_FLAGS_ENUM | relaxed_float_precision = (1ull << 11) |
Emit floating-point values with relaxed (human-friendly) precision. | |
enum TOML_CLOSED_FLAGS_ENUM | terse_key_value_pairs = (1ull << 12) |
Avoids the use of whitespace around key-value pairs. | |
TOML_NAMESPACE_END | |
template<typename T > | |
constexpr bool | is_array = std::is_same_v<impl::remove_cvref<T>, array> |
Metafunction for determining if a type is, or is a reference to, a toml::array. | |
template<typename T > | |
constexpr bool | is_container = is_table<T> || is_array<T> |
Metafunction for determining if a type satisfies either toml::is_table or toml::is_array. | |
template<typename T > | |
constexpr bool | is_string |
Metafunction for determining if a type is, or is a reference to, a std::string or toml::value<std::string>. | |
template<typename T > | |
constexpr bool | is_integer |
Metafunction for determining if a type is, or is a reference to, a int64_t or toml::value<int64_t>. | |
template<typename T > | |
constexpr bool | is_floating_point |
Metafunction for determining if a type is, or is a reference to, a double or toml::value<double>. | |
template<typename T > | |
constexpr bool | is_number = is_integer<T> || is_floating_point<T> |
Metafunction for determining if a type satisfies either toml::is_integer or toml::is_floating_point. | |
template<typename T > | |
constexpr bool | is_boolean |
Metafunction for determining if a type is, or is a reference to, a bool or toml::value<bool>. | |
template<typename T > | |
constexpr bool | is_date |
Metafunction for determining if a type is, or is a reference to, a toml::date or toml::value<date>. | |
template<typename T > | |
constexpr bool | is_time |
Metafunction for determining if a type is, or is a reference to, a toml::time or toml::value<time>. | |
template<typename T > | |
constexpr bool | is_date_time |
Metafunction for determining if a type is, or is a reference to, a toml::date_time or toml::value<date_time>. | |
template<typename T > | |
constexpr bool | is_chronological = is_date<T> || is_time<T> || is_date_time<T> |
Metafunction for determining if a type satisfies any of toml::is_date, toml::is_time or toml::is_date_time. | |
template<typename T > | |
constexpr bool | is_value = is_string<T> || is_number<T> || is_boolean<T> || is_chronological<T> |
Metafunction for determining if a type is, or is a reference to, any of the toml value types. Excludes tables and arrays. | |
template<typename T > | |
constexpr bool | is_node |
Metafunction for determining if a type is, or is a reference to, a toml::node (or one of its subclasses). | |
template<typename T > | |
constexpr bool | is_node_view = impl::is_one_of<impl::remove_cvref<T>, node_view<node>, node_view<const node>> |
Metafunction for determining if a type is, or is a reference to, a toml::node_view. | |
using default_formatter = toml_formatter |
The 'default' formatter used by TOML objects when they are printed to a stream. \detail This is an alias for #toml::toml_formatter.
|
inline |
Pretty-prints the value of a node_type to a stream.
\detail \cpp auto arr = toml::array{ 1, 2.0, "3", false }; for (size_t i = 0; i < arr.size() i++) std::cout << "Element ["sv << i << "] is: "sv << arr[i].type() << "\n"; \ecpp
\out Element [0] is: integer Element [1] is: floating-point Element [2] is: string Element [3] is: boolean \eout
enum TOML_CLOSED_FLAGS_ENUM TOML_MAKE_FLAGS | ( | format_flags | ) |
enum TOML_OPEN_FLAGS_ENUM TOML_MAKE_FLAGS | ( | value_flags | ) |
enum TOML_CLOSED_FLAGS_ENUM allow_binary_integers = (1ull << 6) |
Allow integers with #value_flags::format_as_binary to be emitted as binary.
enum TOML_CLOSED_FLAGS_ENUM allow_hexadecimal_integers = (1ull << 8) |
Allow integers with #value_flags::format_as_hexadecimal to be emitted as hexadecimal.
enum TOML_CLOSED_FLAGS_ENUM allow_literal_strings = (1ull << 2) |
Strings will be emitted as single-quoted literal strings where possible.
enum TOML_CLOSED_FLAGS_ENUM allow_multi_line_strings = (1ull << 3) |
Strings containing newlines will be emitted as triple-quoted 'multi-line' strings where possible.
enum TOML_CLOSED_FLAGS_ENUM allow_octal_integers = (1ull << 7) |
Allow integers with #value_flags::format_as_octal to be emitted as octal.
enum TOML_CLOSED_FLAGS_ENUM allow_real_tabs_in_strings = (1ull << 4) |
Allow real tab characters in string literals (as opposed to the escaped form \t
).
enum TOML_CLOSED_FLAGS_ENUM allow_unicode_strings = (1ull << 5) |
Allow non-ASCII characters in strings (as opposed to their escaped form, e.g. \u00DA
).
enum TOML_OPEN_FLAGS_ENUM format_as_binary = 1 |
Format integer values as binary.
enum TOML_OPEN_FLAGS_ENUM format_as_hexadecimal = 3 |
Format integer values as hexadecimal.
enum TOML_OPEN_FLAGS_ENUM format_as_octal = 2 |
Format integer values as octal.
|
strong |
Format flags for modifying how TOML data is printed to streams.
enum TOML_CLOSED_FLAGS_ENUM indent_array_elements = (1ull << 10) |
Apply indentation to array elements when the array is forced to wrap over multiple lines.
enum TOML_CLOSED_FLAGS_ENUM indent_sub_tables = (1ull << 9) |
Apply indentation to tables nested within other tables/arrays.
enum TOML_CLOSED_FLAGS_ENUM indentation = indent_sub_tables | indent_array_elements |
Combination mask of all indentation-enabling flags.
|
inlineconstexpr |
Metafunction for determining if a type is, or is a reference to, a toml::array.
|
inlineconstexpr |
Metafunction for determining if a type is, or is a reference to, a bool or toml::value<bool>.
|
inlineconstexpr |
Metafunction for determining if a type satisfies any of toml::is_date, toml::is_time or toml::is_date_time.
|
inlineconstexpr |
Metafunction for determining if a type satisfies either toml::is_table or toml::is_array.
|
inlineconstexpr |
Metafunction for determining if a type is, or is a reference to, a toml::date or toml::value<date>.
|
inlineconstexpr |
Metafunction for determining if a type is, or is a reference to, a toml::date_time or toml::value<date_time>.
|
inlineconstexpr |
Metafunction for determining if a type is, or is a reference to, a double or toml::value<double>.
|
inlineconstexpr |
Metafunction for determining if a type is, or is a reference to, a int64_t or toml::value<int64_t>.
|
inlineconstexpr |
Metafunction for determining if a type is, or is a reference to, a toml::node (or one of its subclasses).
|
inlineconstexpr |
Metafunction for determining if a type is, or is a reference to, a toml::node_view.
|
inlineconstexpr |
Metafunction for determining if a type satisfies either toml::is_integer or toml::is_floating_point.
|
inlineconstexpr |
Metafunction for determining if a type is, or is a reference to, a std::string or toml::value<std::string>.
|
inlineconstexpr |
Metafunction for determining if a type is, or is a reference to, a toml::time or toml::value<time>.
|
inlineconstexpr |
Metafunction for determining if a type is, or is a reference to, any of the toml value types. Excludes tables and arrays.
|
inlineconstexpr |
Special #toml::value_flags constant used for array + table insert functions to specify that any value nodes being copied should not have their flags property overridden by the inserting function's flags
argument.
enum TOML_CLOSED_FLAGS_ENUM quote_dates_and_times = (1ull << 0) |
Dates and times will be emitted as quoted strings.
enum TOML_CLOSED_FLAGS_ENUM quote_infinities_and_nans = (1ull << 1) |
Infinities and NaNs will be emitted as quoted strings.
enum TOML_CLOSED_FLAGS_ENUM relaxed_float_precision = (1ull << 11) |
Emit floating-point values with relaxed (human-friendly) precision.
enum TOML_CLOSED_FLAGS_ENUM terse_key_value_pairs = (1ull << 12) |
Avoids the use of whitespace around key-value pairs.
TOML_DISABLE_WARNINGS |
TOML_ENABLE_WARNINGS |
TOML_NAMESPACE_END |
TOML_NAMESPACE_START |
|
strong |
Metadata associated with TOML values.