Ne.app NeANT
The Ne.app NeANT User module of the NeANT distribution.
Data Structures | Namespaces | Typedefs | Functions | Variables
forward_declarations.hpp File Reference
#include "std_new.hpp"
#include "std_string.hpp"
#include <cfloat>
#include <climits>
#include <cmath>
#include <cstddef>
#include <cstdint>
#include <cstring>
#include <iosfwd>
#include <limits>
#include <memory>
#include <type_traits>
#include "header_start.hpp"
#include "header_end.hpp"
Include dependency graph for forward_declarations.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

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
 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
 Metafunction for determining if a type is, or is a reference to, a toml::node_view.
 

Typedef Documentation

◆ default_formatter

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.

Definition at line 380 of file forward_declarations.hpp.

Function Documentation

◆ inserter() [1/2]

template<typename T >
inserter ( T &&  ) -> inserter< T && >

◆ inserter() [2/2]

template<typename T >
inserter ( T &  ) -> inserter< T & >

◆ operator<<()

template<typename Char >
std::basic_ostream< Char > & operator<< ( std::basic_ostream< Char > &  lhs,
node_type  rhs 
)
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

Definition at line 203 of file forward_declarations.hpp.

◆ TOML_MAKE_FLAGS() [1/2]

enum TOML_CLOSED_FLAGS_ENUM TOML_MAKE_FLAGS ( format_flags  )

◆ TOML_MAKE_FLAGS() [2/2]

enum TOML_OPEN_FLAGS_ENUM TOML_MAKE_FLAGS ( value_flags  )

Variable Documentation

◆ allow_binary_integers

enum TOML_CLOSED_FLAGS_ENUM allow_binary_integers = (1ull << 6)

Allow integers with #value_flags::format_as_binary to be emitted as binary.

Definition at line 323 of file forward_declarations.hpp.

◆ allow_hexadecimal_integers

enum TOML_CLOSED_FLAGS_ENUM allow_hexadecimal_integers = (1ull << 8)

Allow integers with #value_flags::format_as_hexadecimal to be emitted as hexadecimal.

Definition at line 329 of file forward_declarations.hpp.

◆ allow_literal_strings

enum TOML_CLOSED_FLAGS_ENUM allow_literal_strings = (1ull << 2)

Strings will be emitted as single-quoted literal strings where possible.

Definition at line 309 of file forward_declarations.hpp.

◆ allow_multi_line_strings

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.

Definition at line 313 of file forward_declarations.hpp.

◆ allow_octal_integers

enum TOML_CLOSED_FLAGS_ENUM allow_octal_integers = (1ull << 7)

Allow integers with #value_flags::format_as_octal to be emitted as octal.

Definition at line 326 of file forward_declarations.hpp.

◆ allow_real_tabs_in_strings

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).

Definition at line 316 of file forward_declarations.hpp.

◆ allow_unicode_strings

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).

Definition at line 320 of file forward_declarations.hpp.

◆ format_as_binary

enum TOML_OPEN_FLAGS_ENUM format_as_binary = 1

Format integer values as binary.

Definition at line 277 of file forward_declarations.hpp.

◆ format_as_hexadecimal

enum TOML_OPEN_FLAGS_ENUM format_as_hexadecimal = 3

Format integer values as hexadecimal.

Definition at line 283 of file forward_declarations.hpp.

◆ format_as_octal

enum TOML_OPEN_FLAGS_ENUM format_as_octal = 2

Format integer values as octal.

Definition at line 280 of file forward_declarations.hpp.

◆ format_flags

enum TOML_CLOSED_FLAGS_ENUM format_flags
strong

Format flags for modifying how TOML data is printed to streams.

Note
Formatters may disregard/override any of these flags according to the requirements of their output target (e.g. #toml::json_formatter will always apply quotes to dates and times).

Definition at line 298 of file forward_declarations.hpp.

◆ indent_array_elements

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.

Definition at line 336 of file forward_declarations.hpp.

◆ indent_sub_tables

enum TOML_CLOSED_FLAGS_ENUM indent_sub_tables = (1ull << 9)

Apply indentation to tables nested within other tables/arrays.

Definition at line 332 of file forward_declarations.hpp.

◆ indentation

Combination mask of all indentation-enabling flags.

Definition at line 339 of file forward_declarations.hpp.

◆ is_array

template<typename T >
constexpr bool is_array = std::is_same_v<impl::remove_cvref<T>, array>
inlineconstexpr

Metafunction for determining if a type is, or is a reference to, a toml::array.

Definition at line 875 of file forward_declarations.hpp.

◆ is_boolean

template<typename T >
constexpr bool is_boolean
inlineconstexpr
Initial value:
= std::is_same_v<
impl::remove_cvref<impl::wrap_node<impl::remove_cvref<T>>>,
value<bool>>

Metafunction for determining if a type is, or is a reference to, a bool or toml::value<bool>.

Definition at line 911 of file forward_declarations.hpp.

◆ is_chronological

template<typename T >
constexpr bool is_chronological = is_date<T> || is_time<T> || is_date_time<T>
inlineconstexpr

Metafunction for determining if a type satisfies any of toml::is_date, toml::is_time or toml::is_date_time.

Definition at line 939 of file forward_declarations.hpp.

◆ is_container

template<typename T >
constexpr bool is_container = is_table<T> || is_array<T>
inlineconstexpr

Metafunction for determining if a type satisfies either toml::is_table or toml::is_array.

Definition at line 880 of file forward_declarations.hpp.

◆ is_date

template<typename T >
constexpr bool is_date
inlineconstexpr
Initial value:
= std::is_same_v<
impl::remove_cvref<impl::wrap_node<impl::remove_cvref<T>>>,
value<date>>

Metafunction for determining if a type is, or is a reference to, a toml::date or toml::value<date>.

Definition at line 918 of file forward_declarations.hpp.

◆ is_date_time

template<typename T >
constexpr bool is_date_time
inlineconstexpr
Initial value:
= std::is_same_v<
impl::remove_cvref<impl::wrap_node<impl::remove_cvref<T>>>,
value<date_time>>

Metafunction for determining if a type is, or is a reference to, a toml::date_time or toml::value<date_time>.

Definition at line 932 of file forward_declarations.hpp.

◆ is_floating_point

template<typename T >
constexpr bool is_floating_point
inlineconstexpr
Initial value:
= std::is_same_v<
impl::remove_cvref<impl::wrap_node<impl::remove_cvref<T>>>,
value<double>>

Metafunction for determining if a type is, or is a reference to, a double or toml::value<double>.

Definition at line 899 of file forward_declarations.hpp.

◆ is_integer

template<typename T >
constexpr bool is_integer
inlineconstexpr
Initial value:
= std::is_same_v<
impl::remove_cvref<impl::wrap_node<impl::remove_cvref<T>>>,
value<int64_t>>

Metafunction for determining if a type is, or is a reference to, a int64_t or toml::value<int64_t>.

Definition at line 892 of file forward_declarations.hpp.

◆ is_node

template<typename T >
constexpr bool is_node
inlineconstexpr
Initial value:
= std::is_same_v<toml::node, impl::remove_cvref<T>>
|| std::is_base_of_v<toml::node, impl::remove_cvref<T>>

Metafunction for determining if a type is, or is a reference to, a toml::node (or one of its subclasses).

Definition at line 950 of file forward_declarations.hpp.

◆ is_node_view

template<typename T >
constexpr bool is_node_view
inlineconstexpr
Initial value:
=
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.

Definition at line 955 of file forward_declarations.hpp.

◆ is_number

template<typename T >
constexpr bool is_number = is_integer<T> || is_floating_point<T>
inlineconstexpr

Metafunction for determining if a type satisfies either toml::is_integer or toml::is_floating_point.

Definition at line 906 of file forward_declarations.hpp.

◆ is_string

template<typename T >
constexpr bool is_string
inlineconstexpr
Initial value:
= std::is_same_v<
impl::remove_cvref<impl::wrap_node<impl::remove_cvref<T>>>,
value<std::string>>

Metafunction for determining if a type is, or is a reference to, a std::string or toml::value<std::string>.

Definition at line 885 of file forward_declarations.hpp.

◆ is_time

template<typename T >
constexpr bool is_time
inlineconstexpr
Initial value:
= std::is_same_v<
impl::remove_cvref<impl::wrap_node<impl::remove_cvref<T>>>,
value<time>>

Metafunction for determining if a type is, or is a reference to, a toml::time or toml::value<time>.

Definition at line 925 of file forward_declarations.hpp.

◆ is_value

template<typename T >
constexpr bool is_value
inlineconstexpr
Initial 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.

Definition at line 944 of file forward_declarations.hpp.

◆ preserve_source_value_flags

constexpr value_flags preserve_source_value_flags
inlineconstexpr
Initial value:
=
POXY_IMPLEMENTATION_DETAIL(value_flags{static_cast<std::underlying_type_t<value_flags>>(-1)})
enum TOML_OPEN_FLAGS_ENUM value_flags
Metadata associated with TOML values.
#define POXY_IMPLEMENTATION_DETAIL(...)

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.

Definition at line 290 of file forward_declarations.hpp.

◆ quote_dates_and_times

enum TOML_CLOSED_FLAGS_ENUM quote_dates_and_times = (1ull << 0)

Dates and times will be emitted as quoted strings.

Definition at line 303 of file forward_declarations.hpp.

◆ quote_infinities_and_nans

enum TOML_CLOSED_FLAGS_ENUM quote_infinities_and_nans = (1ull << 1)

Infinities and NaNs will be emitted as quoted strings.

Definition at line 306 of file forward_declarations.hpp.

◆ relaxed_float_precision

enum TOML_CLOSED_FLAGS_ENUM relaxed_float_precision = (1ull << 11)

Emit floating-point values with relaxed (human-friendly) precision.

Warning
Setting this flag may cause serialized documents to no longer round-trip correctly since floats might have a less precise value upon being written out than they did when being read in. Use this flag at your own risk.

Definition at line 345 of file forward_declarations.hpp.

◆ terse_key_value_pairs

enum TOML_CLOSED_FLAGS_ENUM terse_key_value_pairs = (1ull << 12)

Avoids the use of whitespace around key-value pairs.

Definition at line 348 of file forward_declarations.hpp.

◆ TOML_DISABLE_WARNINGS

TOML_DISABLE_WARNINGS

Definition at line 9 of file forward_declarations.hpp.

◆ TOML_ENABLE_WARNINGS

TOML_ENABLE_WARNINGS

Definition at line 20 of file forward_declarations.hpp.

◆ TOML_NAMESPACE_END

TOML_NAMESPACE_END

Definition at line 382 of file forward_declarations.hpp.

◆ TOML_NAMESPACE_START

TOML_NAMESPACE_START
Initial value:
{
inline namespace literals {}
enum class TOML_CLOSED_ENUM node_type : uint8_t {
none,
string,
integer,
floating_point,
boolean,
date,
time,
}
#define array
Definition 17.names.cpp:447
A TOML table.
Definition table.hpp:190
#define TOML_CLOSED_ENUM
A date-time.
A local time-of-day.

Definition at line 203 of file forward_declarations.hpp.

◆ value_flags

enum TOML_OPEN_FLAGS_ENUM value_flags
strong

Metadata associated with TOML values.

Definition at line 271 of file forward_declarations.hpp.