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

#include <toml.hpp>

Inheritance diagram for array:
[legend]

Public Types

using value_type = node
using size_type = size_t
using difference_type = ptrdiff_t
using reference = node &
using const_reference = const node &
using iterator = array_iterator
using const_iterator = const_array_iterator

Public Member Functions

TOML_NODISCARD_CTOR TOML_EXPORTED_MEMBER_FUNCTION array () noexcept
TOML_EXPORTED_MEMBER_FUNCTION ~array () noexcept
TOML_NODISCARD_CTOR TOML_EXPORTED_MEMBER_FUNCTION array (const array &)
TOML_NODISCARD_CTOR TOML_EXPORTED_MEMBER_FUNCTION array (array &&other) noexcept
 TOML_CONSTRAINED_TEMPLATE ((sizeof...(ElemTypes) > 0||!std::is_same_v< impl::remove_cvref< ElemType >, array >), typename ElemType, typename... ElemTypes) TOML_NODISCARD_CTOR explicit array(ElemType &&val
TOML_EXPORTED_MEMBER_FUNCTION array & operator= (array &&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 node * get (size_t index) noexcept
TOML_PURE_INLINE_GETTER const node * get (size_t index) const noexcept
template<typename ElemType>
TOML_NODISCARD impl::wrap_node< ElemType > * get_as (size_t index) noexcept
template<typename ElemType>
TOML_NODISCARD const impl::wrap_node< ElemType > * get_as (size_t index) const noexcept
TOML_NODISCARD node & operator[] (size_t index) noexcept
TOML_NODISCARD const node & operator[] (size_t index) const noexcept
TOML_NODISCARD TOML_EXPORTED_MEMBER_FUNCTION node & at (size_t index)
TOML_NODISCARD const node & at (size_t index) const
TOML_NODISCARD node & front () noexcept
TOML_NODISCARD const node & front () const noexcept
TOML_NODISCARD node & back () noexcept
TOML_NODISCARD const node & back () const noexcept
TOML_NODISCARD iterator begin () noexcept
TOML_NODISCARD const_iterator begin () const noexcept
TOML_NODISCARD const_iterator cbegin () const noexcept
TOML_NODISCARD iterator end () noexcept
TOML_NODISCARD const_iterator end () const noexcept
TOML_NODISCARD const_iterator cend () const noexcept
template<typename Func>
array & for_each (Func &&visitor) &noexcept(for_each_is_nothrow< Func &&, array & >::value)
template<typename Func>
array && for_each (Func &&visitor) &&noexcept(for_each_is_nothrow< Func &&, array && >::value)
template<typename Func>
const array & for_each (Func &&visitor) const &noexcept(for_each_is_nothrow< Func &&, const array & >::value)
template<typename Func>
const array && for_each (Func &&visitor) const &&noexcept(for_each_is_nothrow< Func &&, const array && >::value)
TOML_NODISCARD bool empty () const noexcept
TOML_NODISCARD size_t size () const noexcept
TOML_NODISCARD size_t max_size () const noexcept
TOML_NODISCARD size_t capacity () const noexcept
TOML_EXPORTED_MEMBER_FUNCTION void reserve (size_t new_capacity)
TOML_EXPORTED_MEMBER_FUNCTION void shrink_to_fit ()
TOML_EXPORTED_MEMBER_FUNCTION void truncate (size_t new_size)
template<typename ElemType>
void resize (size_t new_size, ElemType &&default_init_val, value_flags default_init_flags=preserve_source_value_flags)
TOML_EXPORTED_MEMBER_FUNCTION iterator erase (const_iterator pos) noexcept
TOML_EXPORTED_MEMBER_FUNCTION iterator erase (const_iterator first, const_iterator last) noexcept
TOML_EXPORTED_MEMBER_FUNCTION array & flatten () &
array && flatten () &&
TOML_EXPORTED_MEMBER_FUNCTION array & prune (bool recursive=true) &noexcept
array && prune (bool recursive=true) &&noexcept
TOML_EXPORTED_MEMBER_FUNCTION void pop_back () noexcept
TOML_EXPORTED_MEMBER_FUNCTION void clear () noexcept
template<typename ElemType>
iterator insert (const_iterator pos, ElemType &&val, value_flags flags=preserve_source_value_flags)
template<typename ElemType>
iterator insert (const_iterator pos, size_t count, ElemType &&val, value_flags flags=preserve_source_value_flags)
template<typename Iter>
iterator insert (const_iterator pos, Iter first, Iter last, value_flags flags=preserve_source_value_flags)
template<typename ElemType>
iterator insert (const_iterator pos, std::initializer_list< ElemType > ilist, value_flags flags=preserve_source_value_flags)
template<typename ElemType = void, typename... Args>
iterator emplace (const_iterator pos, Args &&...args)
template<typename ElemType>
iterator replace (const_iterator pos, ElemType &&val, value_flags flags=preserve_source_value_flags)
template<typename ElemType>
void push_back (ElemType &&val, value_flags flags=preserve_source_value_flags)
template<typename ElemType = void, typename... Args>
decltype(auto) emplace_back (Args &&...args)
 TOML_ASYMMETRICAL_EQUALITY_OPS (const array &, const std::initializer_list< T > &, template< typename T >)
 TOML_ASYMMETRICAL_EQUALITY_OPS (const array &, const std::vector< T > &, template< typename T >)

Public Attributes

ElemTypes && vals: array{ std::false_type{}

Friends

TOML_NODISCARD friend bool operator== (const array &lhs, const array &rhs) noexcept
TOML_NODISCARD friend bool operator!= (const array &lhs, const array &rhs) noexcept
template<typename T>
TOML_NODISCARD friend bool operator== (const array &lhs, const std::initializer_list< T > &rhs) noexcept
template<typename T>
TOML_NODISCARD friend bool operator== (const array &lhs, const std::vector< T > &rhs) noexcept
std::ostream & operator<< (std::ostream &lhs, const array &rhs)

Member Typedef Documentation

◆ const_iterator

◆ const_reference

using array::const_reference = const node &

◆ difference_type

◆ iterator

using array::iterator = array_iterator

◆ reference

using array::reference = node &

◆ size_type

◆ value_type

using array::value_type = node

Constructor & Destructor Documentation

◆ array() [1/3]

◆ ~array()

TOML_EXPORTED_MEMBER_FUNCTION array::~array ( )
noexcept

◆ array() [2/3]

◆ array() [3/3]

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

Member Function Documentation

◆ as_array() [1/2]

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

◆ as_array() [2/2]

TOML_CONST_INLINE_GETTER array * array::as_array ( )
inlinefinalnoexcept

◆ as_boolean() [1/2]

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

◆ as_boolean() [2/2]

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

◆ as_date() [1/2]

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

◆ as_date() [2/2]

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

◆ as_date_time() [1/2]

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

◆ as_date_time() [2/2]

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

◆ as_floating_point() [1/2]

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

◆ as_floating_point() [2/2]

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

◆ as_integer() [1/2]

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

◆ as_integer() [2/2]

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

◆ as_string() [1/2]

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

◆ as_string() [2/2]

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

◆ as_table() [1/2]

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

◆ as_table() [2/2]

TOML_CONST_INLINE_GETTER table * array::as_table ( )
inlinefinalnoexcept

◆ as_time() [1/2]

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

◆ as_time() [2/2]

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

◆ at() [1/2]

◆ at() [2/2]

TOML_NODISCARD const node & array::at ( size_t index) const
inline

◆ back() [1/2]

TOML_NODISCARD const node & array::back ( ) const
inlinenoexcept

◆ back() [2/2]

TOML_NODISCARD node & array::back ( )
inlinenoexcept

◆ begin() [1/2]

TOML_NODISCARD const_iterator array::begin ( ) const
inlinenoexcept

◆ begin() [2/2]

TOML_NODISCARD iterator array::begin ( )
inlinenoexcept

◆ capacity()

TOML_NODISCARD size_t array::capacity ( ) const
inlinenoexcept

◆ cbegin()

TOML_NODISCARD const_iterator array::cbegin ( ) const
inlinenoexcept

◆ cend()

TOML_NODISCARD const_iterator array::cend ( ) const
inlinenoexcept

◆ clear()

TOML_EXPORTED_MEMBER_FUNCTION void array::clear ( )
noexcept

◆ emplace()

template<typename ElemType = void, typename... Args>
iterator array::emplace ( const_iterator pos,
Args &&... args )
inline

◆ emplace_back()

template<typename ElemType = void, typename... Args>
decltype(auto) array::emplace_back ( Args &&... args)
inline

◆ empty()

TOML_NODISCARD bool array::empty ( ) const
inlinenoexcept

◆ end() [1/2]

TOML_NODISCARD const_iterator array::end ( ) const
inlinenoexcept

◆ end() [2/2]

TOML_NODISCARD iterator array::end ( )
inlinenoexcept

◆ erase() [1/2]

TOML_EXPORTED_MEMBER_FUNCTION iterator array::erase ( const_iterator first,
const_iterator last )
noexcept

◆ erase() [2/2]

◆ flatten() [1/2]

TOML_EXPORTED_MEMBER_FUNCTION array & array::flatten ( ) &

◆ flatten() [2/2]

array && array::flatten ( ) &&
inline

◆ for_each() [1/4]

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

◆ for_each() [2/4]

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

◆ for_each() [3/4]

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

◆ for_each() [4/4]

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

◆ front() [1/2]

TOML_NODISCARD const node & array::front ( ) const
inlinenoexcept

◆ front() [2/2]

TOML_NODISCARD node & array::front ( )
inlinenoexcept

◆ get() [1/2]

TOML_PURE_INLINE_GETTER const node * array::get ( size_t index) const
inlinenoexcept

◆ get() [2/2]

TOML_PURE_INLINE_GETTER node * array::get ( size_t index)
inlinenoexcept

◆ get_as() [1/2]

template<typename ElemType>
TOML_NODISCARD const impl::wrap_node< ElemType > * array::get_as ( size_t index) const
inlinenoexcept

◆ get_as() [2/2]

template<typename ElemType>
TOML_NODISCARD impl::wrap_node< ElemType > * array::get_as ( size_t index)
inlinenoexcept

◆ insert() [1/4]

template<typename ElemType>
iterator array::insert ( const_iterator pos,
ElemType && val,
value_flags flags = preserve_source_value_flags )
inline

◆ insert() [2/4]

template<typename Iter>
iterator array::insert ( const_iterator pos,
Iter first,
Iter last,
value_flags flags = preserve_source_value_flags )
inline

◆ insert() [3/4]

template<typename ElemType>
iterator array::insert ( const_iterator pos,
size_t count,
ElemType && val,
value_flags flags = preserve_source_value_flags )
inline

◆ insert() [4/4]

template<typename ElemType>
iterator array::insert ( const_iterator pos,
std::initializer_list< ElemType > ilist,
value_flags flags = preserve_source_value_flags )
inline

◆ is_array()

TOML_CONST_INLINE_GETTER bool array::is_array ( ) const
inlinefinalnoexcept

◆ is_array_of_tables()

TOML_PURE_GETTER bool array::is_array_of_tables ( ) const
inlinefinalnoexcept

◆ is_boolean()

TOML_CONST_INLINE_GETTER bool array::is_boolean ( ) const
inlinefinalnoexcept

◆ is_date()

TOML_CONST_INLINE_GETTER bool array::is_date ( ) const
inlinefinalnoexcept

◆ is_date_time()

TOML_CONST_INLINE_GETTER bool array::is_date_time ( ) const
inlinefinalnoexcept

◆ is_floating_point()

TOML_CONST_INLINE_GETTER bool array::is_floating_point ( ) const
inlinefinalnoexcept

◆ is_homogeneous() [1/4]

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

◆ is_homogeneous() [2/4]

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

◆ is_homogeneous() [3/4]

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

◆ is_homogeneous() [4/4]

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

◆ is_integer()

TOML_CONST_INLINE_GETTER bool array::is_integer ( ) const
inlinefinalnoexcept

◆ is_number()

TOML_CONST_INLINE_GETTER bool array::is_number ( ) const
inlinefinalnoexcept

◆ is_string()

TOML_CONST_INLINE_GETTER bool array::is_string ( ) const
inlinefinalnoexcept

◆ is_table()

TOML_CONST_INLINE_GETTER bool array::is_table ( ) const
inlinefinalnoexcept

◆ is_time()

TOML_CONST_INLINE_GETTER bool array::is_time ( ) const
inlinefinalnoexcept

◆ is_value()

TOML_CONST_INLINE_GETTER bool array::is_value ( ) const
inlinefinalnoexcept

◆ max_size()

TOML_NODISCARD size_t array::max_size ( ) const
inlinenoexcept

◆ operator=()

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

◆ operator[]() [1/2]

TOML_NODISCARD const node & array::operator[] ( size_t index) const
inlinenoexcept

◆ operator[]() [2/2]

TOML_NODISCARD node & array::operator[] ( size_t index)
inlinenoexcept

◆ pop_back()

TOML_EXPORTED_MEMBER_FUNCTION void array::pop_back ( )
noexcept

◆ prune() [1/2]

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

◆ prune() [2/2]

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

◆ push_back()

template<typename ElemType>
void array::push_back ( ElemType && val,
value_flags flags = preserve_source_value_flags )
inline

◆ replace()

template<typename ElemType>
iterator array::replace ( const_iterator pos,
ElemType && val,
value_flags flags = preserve_source_value_flags )
inline

◆ reserve()

TOML_EXPORTED_MEMBER_FUNCTION void array::reserve ( size_t new_capacity)

◆ resize()

template<typename ElemType>
void array::resize ( size_t new_size,
ElemType && default_init_val,
value_flags default_init_flags = preserve_source_value_flags )
inline

◆ shrink_to_fit()

TOML_EXPORTED_MEMBER_FUNCTION void array::shrink_to_fit ( )

◆ size()

TOML_NODISCARD size_t array::size ( ) const
inlinenoexcept

◆ TOML_ASYMMETRICAL_EQUALITY_OPS() [1/2]

array::TOML_ASYMMETRICAL_EQUALITY_OPS ( const array & ,
const std::initializer_list< T > & ,
template< typename T >  )

◆ TOML_ASYMMETRICAL_EQUALITY_OPS() [2/2]

array::TOML_ASYMMETRICAL_EQUALITY_OPS ( const array & ,
const std::vector< T > & ,
template< typename T >  )

◆ TOML_CONSTRAINED_TEMPLATE()

array::TOML_CONSTRAINED_TEMPLATE ( (sizeof...(ElemTypes) > 0|| !std::is_same_v< impl::remove_cvref< ElemType >, array >) ,
typename ElemType ,
typename... ElemTypes ) &&

◆ truncate()

TOML_EXPORTED_MEMBER_FUNCTION void array::truncate ( size_t new_size)

◆ type()

TOML_CONST_INLINE_GETTER node_type array::type ( ) const
inlinefinalnoexcept

◆ operator!=

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

◆ operator<<

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

◆ operator== [1/3]

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

◆ operator== [2/3]

template<typename T>
TOML_NODISCARD friend bool operator== ( const array & lhs,
const std::initializer_list< T > & rhs )
friend

◆ operator== [3/3]

template<typename T>
TOML_NODISCARD friend bool operator== ( const array & lhs,
const std::vector< T > & rhs )
friend

Member Data Documentation

◆ vals

ElemTypes&& array::vals

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