ESBMC
Efficient SMT-based Context-Bounded Model Checker
Loading...
Searching...
No Matches
table Class Reference

#include <toml.hpp>

Inheritance diagram for table:
[legend]

Public Types

using iterator = toml::table_iterator
using const_iterator = toml::const_table_iterator
using raw_value_type = impl::remove_cvref<ValueType>
using value_type
using unwrapped_type

Public Member Functions

TOML_NODISCARD_CTOR TOML_EXPORTED_MEMBER_FUNCTION table () noexcept
TOML_EXPORTED_MEMBER_FUNCTION ~table () noexcept
TOML_NODISCARD_CTOR TOML_EXPORTED_MEMBER_FUNCTION table (const table &)
TOML_NODISCARD_CTOR TOML_EXPORTED_MEMBER_FUNCTION table (table &&other) noexcept
TOML_NODISCARD_CTOR TOML_EXPORTED_MEMBER_FUNCTION table (std::initializer_list< impl::table_init_pair > kvps)
TOML_EXPORTED_MEMBER_FUNCTION table & operator= (const table &)
TOML_EXPORTED_MEMBER_FUNCTION table & operator= (table &&rhs) noexcept
TOML_CONST_INLINE_GETTER node_type type () const noexcept final
TOML_PURE_GETTER TOML_EXPORTED_MEMBER_FUNCTION bool is_homogeneous (node_type ntype) const noexcept final
TOML_NODISCARD TOML_EXPORTED_MEMBER_FUNCTION bool is_homogeneous (node_type ntype, node *&first_nonmatch) noexcept final
TOML_NODISCARD TOML_EXPORTED_MEMBER_FUNCTION bool is_homogeneous (node_type ntype, const node *&first_nonmatch) const noexcept final
template<typename ElemType = void>
TOML_PURE_GETTER bool is_homogeneous () const noexcept
TOML_CONST_INLINE_GETTER bool is_table () const noexcept final
TOML_CONST_INLINE_GETTER bool is_array () const noexcept final
TOML_PURE_GETTER bool is_array_of_tables () const noexcept final
TOML_CONST_INLINE_GETTER bool is_value () const noexcept final
TOML_CONST_INLINE_GETTER bool is_string () const noexcept final
TOML_CONST_INLINE_GETTER bool is_integer () const noexcept final
TOML_CONST_INLINE_GETTER bool is_floating_point () const noexcept final
TOML_CONST_INLINE_GETTER bool is_number () const noexcept final
TOML_CONST_INLINE_GETTER bool is_boolean () const noexcept final
TOML_CONST_INLINE_GETTER bool is_date () const noexcept final
TOML_CONST_INLINE_GETTER bool is_time () const noexcept final
TOML_CONST_INLINE_GETTER bool is_date_time () const noexcept final
TOML_CONST_INLINE_GETTER table * as_table () noexcept final
TOML_CONST_INLINE_GETTER array * as_array () noexcept final
TOML_CONST_INLINE_GETTER toml::value< std::string > * as_string () noexcept final
TOML_CONST_INLINE_GETTER toml::value< int64_t > * as_integer () noexcept final
TOML_CONST_INLINE_GETTER toml::value< double > * as_floating_point () noexcept final
TOML_CONST_INLINE_GETTER toml::value< bool > * as_boolean () noexcept final
TOML_CONST_INLINE_GETTER toml::value< date > * as_date () noexcept final
TOML_CONST_INLINE_GETTER toml::value< time > * as_time () noexcept final
TOML_CONST_INLINE_GETTER toml::value< date_time > * as_date_time () noexcept final
TOML_CONST_INLINE_GETTER const table * as_table () const noexcept final
TOML_CONST_INLINE_GETTER const array * as_array () const noexcept final
TOML_CONST_INLINE_GETTER const toml::value< std::string > * as_string () const noexcept final
TOML_CONST_INLINE_GETTER const toml::value< int64_t > * as_integer () const noexcept final
TOML_CONST_INLINE_GETTER const toml::value< double > * as_floating_point () const noexcept final
TOML_CONST_INLINE_GETTER const toml::value< bool > * as_boolean () const noexcept final
TOML_CONST_INLINE_GETTER const toml::value< date > * as_date () const noexcept final
TOML_CONST_INLINE_GETTER const toml::value< time > * as_time () const noexcept final
TOML_CONST_INLINE_GETTER const toml::value< date_time > * as_date_time () const noexcept final
TOML_PURE_INLINE_GETTER bool is_inline () const noexcept
void is_inline (bool val) noexcept
TOML_PURE_GETTER TOML_EXPORTED_MEMBER_FUNCTION node * get (std::string_view key) noexcept
TOML_PURE_INLINE_GETTER const node * get (std::string_view key) const noexcept
template<typename T>
TOML_PURE_GETTER impl::wrap_node< T > * get_as (std::string_view key) noexcept
template<typename T>
TOML_PURE_GETTER const impl::wrap_node< T > * get_as (std::string_view key) const noexcept
TOML_NODISCARD TOML_EXPORTED_MEMBER_FUNCTION node & at (std::string_view key)
TOML_NODISCARD const node & at (std::string_view key) const
TOML_PURE_INLINE_GETTER iterator begin () noexcept
TOML_PURE_INLINE_GETTER const_iterator begin () const noexcept
TOML_PURE_INLINE_GETTER const_iterator cbegin () const noexcept
TOML_PURE_INLINE_GETTER iterator end () noexcept
TOML_PURE_INLINE_GETTER const_iterator end () const noexcept
TOML_PURE_INLINE_GETTER const_iterator cend () const noexcept
template<typename Func>
table & for_each (Func &&visitor) &noexcept(for_each_is_nothrow< Func &&, table & >::value)
template<typename Func>
table && for_each (Func &&visitor) &&noexcept(for_each_is_nothrow< Func &&, table && >::value)
template<typename Func>
const table & for_each (Func &&visitor) const &noexcept(for_each_is_nothrow< Func &&, const table & >::value)
template<typename Func>
const table && for_each (Func &&visitor) const &&noexcept(for_each_is_nothrow< Func &&, const table && >::value)
TOML_PURE_INLINE_GETTER bool empty () const noexcept
TOML_PURE_INLINE_GETTER size_t size () const noexcept
TOML_PURE_GETTER iterator lower_bound (std::string_view key) noexcept
TOML_PURE_GETTER const_iterator lower_bound (std::string_view key) const noexcept
TOML_PURE_GETTER TOML_EXPORTED_MEMBER_FUNCTION iterator find (std::string_view key) noexcept
TOML_PURE_GETTER TOML_EXPORTED_MEMBER_FUNCTION const_iterator find (std::string_view key) const noexcept
TOML_PURE_GETTER bool contains (std::string_view key) const noexcept
iterator erase (iterator pos) noexcept
iterator erase (const_iterator pos) noexcept
iterator erase (const_iterator begin, const_iterator end) noexcept
TOML_EXPORTED_MEMBER_FUNCTION size_t erase (std::string_view key) noexcept
TOML_EXPORTED_MEMBER_FUNCTION table & prune (bool recursive=true) &noexcept
table && prune (bool recursive=true) &&noexcept
TOML_EXPORTED_MEMBER_FUNCTION void clear () noexcept
 TOML_CONSTRAINED_TEMPLATE ((is_key_or_convertible< KeyType && >||impl::is_wide_string< KeyType >), typename ValueType=void, typename KeyType, typename... ValueArgs) iterator emplace_hint(const_iterator hint
if constexpr (impl::is_wide_string< KeyType >)
 if (!ipos->second)
 TOML_CONSTRAINED_TEMPLATE ((is_key_or_convertible< KeyType && >||impl::is_wide_string< KeyType >), typename KeyType, typename ValueType) std
 TOML_CONSTRAINED_TEMPLATE ((!is_key_or_convertible< Iter > &&!impl::is_wide_string< Iter >), typename Iter) void insert(Iter begin
Iter value_flags bool insert_or_assign (KeyType &&key, ValueType &&val, value_flags flags=preserve_source_value_flags)
 TOML_CONSTRAINED_TEMPLATE ((is_key_or_convertible< KeyType && >||impl::is_wide_string< KeyType >), typename ValueType=void, typename KeyType, typename... ValueArgs) std
TOML_NODISCARD node_view< node > operator[] (std::string_view key) noexcept
TOML_NODISCARD node_view< const node > operator[] (std::string_view key) const noexcept

Public Attributes

KeyType && key
KeyType ValueArgs && args
 else
map_iterator ipos
return iterator {ipos}
 TOML_UNREACHABLE
Iter end
Iter value_flags flags

Friends

TOML_NODISCARD friend bool operator== (const table &lhs, const table &rhs) noexcept
TOML_NODISCARD friend bool operator!= (const table &lhs, const table &rhs) noexcept
std::ostream & operator<< (std::ostream &lhs, const table &rhs)

Member Typedef Documentation

◆ const_iterator

using table::const_iterator = toml::const_table_iterator

◆ iterator

using table::iterator = toml::table_iterator

◆ raw_value_type

using table::raw_value_type = impl::remove_cvref<ValueType>

◆ unwrapped_type

Initial value:
impl::remove_cvref<impl::unwrap_node<value_type>>

◆ value_type

Initial value:
std::conditional_t<
std::is_void_v<raw_value_type>,
impl::emplaced_type_of<ValueArgs &&...>,
impl::remove_cvref< ValueType > raw_value_type
Definition toml.hpp:8837

Constructor & Destructor Documentation

◆ table() [1/4]

◆ ~table()

TOML_EXPORTED_MEMBER_FUNCTION table::~table ( )
noexcept

◆ table() [2/4]

◆ table() [3/4]

TOML_NODISCARD_CTOR TOML_EXPORTED_MEMBER_FUNCTION table::table ( table && other)
noexcept

◆ table() [4/4]

TOML_NODISCARD_CTOR TOML_EXPORTED_MEMBER_FUNCTION table::table ( std::initializer_list< impl::table_init_pair > kvps)
inlineexplicit

Member Function Documentation

◆ as_array() [1/2]

TOML_CONST_INLINE_GETTER const array * table::as_array ( ) const
inlinefinalnoexcept

◆ as_array() [2/2]

TOML_CONST_INLINE_GETTER array * table::as_array ( )
inlinefinalnoexcept

◆ as_boolean() [1/2]

TOML_CONST_INLINE_GETTER const toml::value< bool > * table::as_boolean ( ) const
inlinefinalnoexcept

◆ as_boolean() [2/2]

TOML_CONST_INLINE_GETTER toml::value< bool > * table::as_boolean ( )
inlinefinalnoexcept

◆ as_date() [1/2]

TOML_CONST_INLINE_GETTER const toml::value< date > * table::as_date ( ) const
inlinefinalnoexcept

◆ as_date() [2/2]

TOML_CONST_INLINE_GETTER toml::value< date > * table::as_date ( )
inlinefinalnoexcept

◆ as_date_time() [1/2]

TOML_CONST_INLINE_GETTER const toml::value< date_time > * table::as_date_time ( ) const
inlinefinalnoexcept

◆ as_date_time() [2/2]

TOML_CONST_INLINE_GETTER toml::value< date_time > * table::as_date_time ( )
inlinefinalnoexcept

◆ as_floating_point() [1/2]

TOML_CONST_INLINE_GETTER const toml::value< double > * table::as_floating_point ( ) const
inlinefinalnoexcept

◆ as_floating_point() [2/2]

TOML_CONST_INLINE_GETTER toml::value< double > * table::as_floating_point ( )
inlinefinalnoexcept

◆ as_integer() [1/2]

TOML_CONST_INLINE_GETTER const toml::value< int64_t > * table::as_integer ( ) const
inlinefinalnoexcept

◆ as_integer() [2/2]

TOML_CONST_INLINE_GETTER toml::value< int64_t > * table::as_integer ( )
inlinefinalnoexcept

◆ as_string() [1/2]

TOML_CONST_INLINE_GETTER const toml::value< std::string > * table::as_string ( ) const
inlinefinalnoexcept

◆ as_string() [2/2]

TOML_CONST_INLINE_GETTER toml::value< std::string > * table::as_string ( )
inlinefinalnoexcept

◆ as_table() [1/2]

TOML_CONST_INLINE_GETTER const table * table::as_table ( ) const
inlinefinalnoexcept

◆ as_table() [2/2]

TOML_CONST_INLINE_GETTER table * table::as_table ( )
inlinefinalnoexcept

◆ as_time() [1/2]

TOML_CONST_INLINE_GETTER const toml::value< time > * table::as_time ( ) const
inlinefinalnoexcept

◆ as_time() [2/2]

TOML_CONST_INLINE_GETTER toml::value< time > * table::as_time ( )
inlinefinalnoexcept

◆ at() [1/2]

TOML_NODISCARD TOML_EXPORTED_MEMBER_FUNCTION node & table::at ( std::string_view key)

◆ at() [2/2]

TOML_NODISCARD const node & table::at ( std::string_view key) const
inline

◆ begin() [1/2]

TOML_PURE_INLINE_GETTER const_iterator table::begin ( ) const
inlinenoexcept

◆ begin() [2/2]

TOML_PURE_INLINE_GETTER iterator table::begin ( )
inlinenoexcept

◆ cbegin()

TOML_PURE_INLINE_GETTER const_iterator table::cbegin ( ) const
inlinenoexcept

◆ cend()

TOML_PURE_INLINE_GETTER const_iterator table::cend ( ) const
inlinenoexcept

◆ clear()

TOML_EXPORTED_MEMBER_FUNCTION void table::clear ( )
noexcept

◆ constexpr()

if table::constexpr ( impl::is_wide_string< KeyType > )
inlineconstexpr

◆ contains()

TOML_PURE_GETTER bool table::contains ( std::string_view key) const
inlinenoexcept

◆ empty()

TOML_PURE_INLINE_GETTER bool table::empty ( ) const
inlinenoexcept

◆ end() [1/2]

TOML_PURE_INLINE_GETTER const_iterator table::end ( ) const
inlinenoexcept

◆ end() [2/2]

TOML_PURE_INLINE_GETTER iterator table::end ( )
inlinenoexcept

◆ erase() [1/4]

iterator table::erase ( const_iterator begin,
const_iterator end )
inlinenoexcept

◆ erase() [2/4]

iterator table::erase ( const_iterator pos)
inlinenoexcept

◆ erase() [3/4]

iterator table::erase ( iterator pos)
inlinenoexcept

◆ erase() [4/4]

TOML_EXPORTED_MEMBER_FUNCTION size_t table::erase ( std::string_view key)
noexcept

◆ find() [1/2]

TOML_PURE_GETTER TOML_EXPORTED_MEMBER_FUNCTION const_iterator table::find ( std::string_view key) const
noexcept

◆ find() [2/2]

TOML_PURE_GETTER TOML_EXPORTED_MEMBER_FUNCTION iterator table::find ( std::string_view key)
noexcept

◆ for_each() [1/4]

template<typename Func>
table && table::for_each ( Func && visitor) &&
inlinenoexcept

◆ for_each() [2/4]

template<typename Func>
table & table::for_each ( Func && visitor) &
inlinenoexcept

◆ for_each() [3/4]

template<typename Func>
const table && table::for_each ( Func && visitor) const &&
inlinenoexcept

◆ for_each() [4/4]

template<typename Func>
const table & table::for_each ( Func && visitor) const &
inlinenoexcept

◆ get() [1/2]

TOML_PURE_INLINE_GETTER const node * table::get ( std::string_view key) const
inlinenoexcept

◆ get() [2/2]

TOML_PURE_GETTER TOML_EXPORTED_MEMBER_FUNCTION node * table::get ( std::string_view key)
noexcept

◆ get_as() [1/2]

template<typename T>
TOML_PURE_GETTER const impl::wrap_node< T > * table::get_as ( std::string_view key) const
inlinenoexcept

◆ get_as() [2/2]

template<typename T>
TOML_PURE_GETTER impl::wrap_node< T > * table::get_as ( std::string_view key)
inlinenoexcept

◆ if()

table::if ( !ipos-> second)
inline

◆ insert_or_assign()

Iter value_flags bool table::insert_or_assign ( KeyType && key,
ValueType && val,
value_flags flags = preserve_source_value_flags )
inline

◆ is_array()

TOML_CONST_INLINE_GETTER bool table::is_array ( ) const
inlinefinalnoexcept

◆ is_array_of_tables()

TOML_PURE_GETTER bool table::is_array_of_tables ( ) const
inlinefinalnoexcept

◆ is_boolean()

TOML_CONST_INLINE_GETTER bool table::is_boolean ( ) const
inlinefinalnoexcept

◆ is_date()

TOML_CONST_INLINE_GETTER bool table::is_date ( ) const
inlinefinalnoexcept

◆ is_date_time()

TOML_CONST_INLINE_GETTER bool table::is_date_time ( ) const
inlinefinalnoexcept

◆ is_floating_point()

TOML_CONST_INLINE_GETTER bool table::is_floating_point ( ) const
inlinefinalnoexcept

◆ is_homogeneous() [1/4]

template<typename ElemType = void>
TOML_PURE_GETTER bool table::is_homogeneous ( ) const
inlinenoexcept

◆ is_homogeneous() [2/4]

TOML_PURE_GETTER TOML_EXPORTED_MEMBER_FUNCTION bool table::is_homogeneous ( node_type ntype) const
finalnoexcept

◆ is_homogeneous() [3/4]

TOML_NODISCARD TOML_EXPORTED_MEMBER_FUNCTION bool table::is_homogeneous ( node_type ntype,
const node *& first_nonmatch ) const
finalnoexcept

◆ is_homogeneous() [4/4]

TOML_NODISCARD TOML_EXPORTED_MEMBER_FUNCTION bool table::is_homogeneous ( node_type ntype,
node *& first_nonmatch )
finalnoexcept

◆ is_inline() [1/2]

TOML_PURE_INLINE_GETTER bool table::is_inline ( ) const
inlinenoexcept

◆ is_inline() [2/2]

void table::is_inline ( bool val)
inlinenoexcept

◆ is_integer()

TOML_CONST_INLINE_GETTER bool table::is_integer ( ) const
inlinefinalnoexcept

◆ is_number()

TOML_CONST_INLINE_GETTER bool table::is_number ( ) const
inlinefinalnoexcept

◆ is_string()

TOML_CONST_INLINE_GETTER bool table::is_string ( ) const
inlinefinalnoexcept

◆ is_table()

TOML_CONST_INLINE_GETTER bool table::is_table ( ) const
inlinefinalnoexcept

◆ is_time()

TOML_CONST_INLINE_GETTER bool table::is_time ( ) const
inlinefinalnoexcept

◆ is_value()

TOML_CONST_INLINE_GETTER bool table::is_value ( ) const
inlinefinalnoexcept

◆ lower_bound() [1/2]

TOML_PURE_GETTER const_iterator table::lower_bound ( std::string_view key) const
inlinenoexcept

◆ lower_bound() [2/2]

TOML_PURE_GETTER iterator table::lower_bound ( std::string_view key)
inlinenoexcept

◆ operator=() [1/2]

TOML_EXPORTED_MEMBER_FUNCTION table & table::operator= ( const table & )

◆ operator=() [2/2]

TOML_EXPORTED_MEMBER_FUNCTION table & table::operator= ( table && rhs)
noexcept

◆ operator[]() [1/2]

TOML_NODISCARD node_view< const node > table::operator[] ( std::string_view key) const
inlinenoexcept

◆ operator[]() [2/2]

TOML_NODISCARD node_view< node > table::operator[] ( std::string_view key)
inlinenoexcept

◆ prune() [1/2]

table && table::prune ( bool recursive = true) &&
inlinenoexcept

◆ prune() [2/2]

TOML_EXPORTED_MEMBER_FUNCTION table & table::prune ( bool recursive = true) &
noexcept

◆ size()

TOML_PURE_INLINE_GETTER size_t table::size ( ) const
inlinenoexcept

◆ TOML_CONSTRAINED_TEMPLATE() [1/4]

table::TOML_CONSTRAINED_TEMPLATE ( (!is_key_or_convertible< Iter > &&!impl::is_wide_string< Iter >) ,
typename Iter  )

◆ TOML_CONSTRAINED_TEMPLATE() [2/4]

table::TOML_CONSTRAINED_TEMPLATE ( (is_key_or_convertible< KeyType && >||impl::is_wide_string< KeyType >) ,
typename KeyType ,
typename ValueType  )
inline

◆ TOML_CONSTRAINED_TEMPLATE() [3/4]

table::TOML_CONSTRAINED_TEMPLATE ( (is_key_or_convertible< KeyType && >||impl::is_wide_string< KeyType >) ,
typename ValueType = void,
typename KeyType ,
typename... ValueArgs )

◆ TOML_CONSTRAINED_TEMPLATE() [4/4]

table::TOML_CONSTRAINED_TEMPLATE ( (is_key_or_convertible< KeyType && >||impl::is_wide_string< KeyType >) ,
typename ValueType = void,
typename KeyType ,
typename... ValueArgs )
inline

◆ type()

TOML_CONST_INLINE_GETTER node_type table::type ( ) const
inlinefinalnoexcept

◆ operator!=

TOML_NODISCARD friend bool operator!= ( const table & lhs,
const table & rhs )
friend

◆ operator<<

std::ostream & operator<< ( std::ostream & lhs,
const table & rhs )
friend

◆ operator==

TOML_NODISCARD friend bool operator== ( const table & lhs,
const table & rhs )
friend

Member Data Documentation

◆ args

KeyType ValueArgs&& table::args
Initial value:
{
static_assert(
!impl::is_wide_string<KeyType> || TOML_ENABLE_WINDOWS_COMPAT,
"Emplacement using wide-character keys is only supported on Windows "
"with "
"TOML_ENABLE_WINDOWS_COMPAT enabled.")
#define TOML_ENABLE_WINDOWS_COMPAT
Definition toml.hpp:1069

◆ else

table::else
Initial value:
{
static constexpr auto moving_node_ptr =
std::is_same_v<value_type, impl::node_ptr>
&& sizeof...(ValueArgs) == 1u
&& impl::first_is_same<impl::node_ptr &&, ValueArgs &&...>

◆ end

Iter table::end

◆ flags

Iter value_flags table::flags
Initial value:
{
if (begin == end)
return;
for (auto it = begin; it != end; it++)
{
if constexpr (std::is_rvalue_reference_v<decltype(*it)>)
insert(std::move((*it).first), std::move((*it).second), flags);
else
insert((*it).first, (*it).second, flags);
}
}
(is_key_or_convertible<KeyType &&> || impl::is_wide_string<KeyType>),
typename KeyType,
typename ValueType)
std::pair<iterator
Iter value_flags flags
Definition toml.hpp:8958
toml::table_iterator iterator
Definition toml.hpp:8434
TOML_PURE_INLINE_GETTER iterator begin() noexcept
Definition toml.hpp:8439
Iter end
Definition toml.hpp:8957
#define TOML_CONSTRAINED_TEMPLATE(condition,...)
Definition toml.hpp:1187
constexpr value_flags preserve_source_value_flags
Definition toml.hpp:1676
constexpr bool is_key_or_convertible
Definition toml.hpp:7860

◆ ipos

map_iterator table::ipos
Initial value:
= insert_with_hint(
hint, toml::key{static_cast<KeyType &&>(key)}, nullptr)
KeyType && key
Definition toml.hpp:8829

◆ iterator

◆ key

KeyType&& table::key

◆ TOML_UNREACHABLE

table::TOML_UNREACHABLE

The documentation for this class was generated from the following file: