Classes | Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes | Friends | List of all members
lexy::_symbol_table< T, CaseFolding, Strings > Class Template Reference

#include <literal.hpp>

Classes

class  iterator
 
struct  key_index
 
struct  value_type
 

Public Types

using char_type = decltype(_char_type())
 
using key_type = char_type
 
using mapped_type = T
 

Public Member Functions

LEXY_CONSTEVAL _symbol_table ()
 
constexpr iterator begin () const noexcept
 
template<typename CaseFoldingDSL >
LEXY_CONSTEVAL auto case_folding (CaseFoldingDSL) const
 
constexpr iterator end () const noexcept
 
template<typename SymbolString , typename... Args>
LEXY_CONSTEVAL auto map (Args &&... args) const
 
template<auto C, typename... Args>
LEXY_CONSTEVAL auto map (Args &&... args) const
 
template<typename CharT , CharT... C, typename... Args>
LEXY_CONSTEVAL auto map (lexyd::_lit< CharT, C... >, Args &&... args) const
 
constexpr const T & operator[] (key_index idx) const noexcept
 
template<typename Input >
constexpr key_index parse (const Input &input) const
 
template<typename Reader >
constexpr key_index try_parse (Reader &reader) const
 

Static Public Member Functions

static constexpr bool empty () noexcept
 
static constexpr std::size_t size () noexcept
 

Private Member Functions

template<std::size_t... Idx, template< typename > typename OtherCaseFolding>
constexpr _symbol_table (lexy::_detail::index_sequence< Idx... >, const _symbol_table< T, OtherCaseFolding, Strings... > &table)
 
template<std::size_t... Idx, typename... Args>
constexpr _symbol_table (lexy::_detail::index_sequence< Idx... >, const T *data, Args &&... args)
 

Static Private Member Functions

template<typename Encoding >
static LEXY_CONSTEVAL auto _build_trie ()
 
static auto _char_type ()
 

Private Attributes

std::conditional_t< empty(), char, T > _data [empty() ? 1 :size()]
 

Static Private Attributes

static constexpr auto _max_char_count = (0 + ... + Strings::size)
 
template<typename Encoding >
static constexpr lexy::_detail::lit_trie< Encoding, CaseFolding, _max_char_count_trie = _build_trie<Encoding>()
 

Friends

template<typename , template< typename > typename, typename... >
class _symbol_table
 

Detailed Description

template<typename T, template< typename > typename CaseFolding, typename... Strings>
class lexy::_symbol_table< T, CaseFolding, Strings >

Definition at line 492 of file literal.hpp.

Member Typedef Documentation

◆ char_type

template<typename T , template< typename > typename CaseFolding, typename... Strings>
using lexy::_symbol_table< T, CaseFolding, Strings >::char_type = decltype(_char_type())

Definition at line 29 of file symbol.hpp.

◆ key_type

template<typename T , template< typename > typename CaseFolding, typename... Strings>
using lexy::_symbol_table< T, CaseFolding, Strings >::key_type = char_type

Definition at line 30 of file symbol.hpp.

◆ mapped_type

template<typename T , template< typename > typename CaseFolding, typename... Strings>
using lexy::_symbol_table< T, CaseFolding, Strings >::mapped_type = T

Definition at line 31 of file symbol.hpp.

Constructor & Destructor Documentation

◆ _symbol_table() [1/3]

template<typename T , template< typename > typename CaseFolding, typename... Strings>
LEXY_CONSTEVAL lexy::_symbol_table< T, CaseFolding, Strings >::_symbol_table ( )
inline

Definition at line 40 of file symbol.hpp.

◆ _symbol_table() [2/3]

template<typename T , template< typename > typename CaseFolding, typename... Strings>
template<std::size_t... Idx, typename... Args>
constexpr lexy::_symbol_table< T, CaseFolding, Strings >::_symbol_table ( lexy::_detail::index_sequence< Idx... >  ,
const T *  data,
Args &&...  args 
)
inlineexplicitconstexprprivate

Definition at line 226 of file symbol.hpp.

◆ _symbol_table() [3/3]

template<typename T , template< typename > typename CaseFolding, typename... Strings>
template<std::size_t... Idx, template< typename > typename OtherCaseFolding>
constexpr lexy::_symbol_table< T, CaseFolding, Strings >::_symbol_table ( lexy::_detail::index_sequence< Idx... >  ,
const _symbol_table< T, OtherCaseFolding, Strings... > &  table 
)
inlineexplicitconstexprprivate

Definition at line 232 of file symbol.hpp.

Member Function Documentation

◆ _build_trie()

template<typename T , template< typename > typename CaseFolding, typename... Strings>
template<typename Encoding >
static LEXY_CONSTEVAL auto lexy::_symbol_table< T, CaseFolding, Strings >::_build_trie ( )
inlinestaticprivate

Definition at line 212 of file symbol.hpp.

◆ _char_type()

template<typename T , template< typename > typename CaseFolding, typename... Strings>
static auto lexy::_symbol_table< T, CaseFolding, Strings >::_char_type ( )
inlinestaticprivate

Definition at line 20 of file symbol.hpp.

◆ begin()

template<typename T , template< typename > typename CaseFolding, typename... Strings>
constexpr iterator lexy::_symbol_table< T, CaseFolding, Strings >::begin ( ) const
inlineconstexprnoexcept

Definition at line 144 of file symbol.hpp.

◆ case_folding()

template<typename T , template< typename > typename CaseFolding, typename... Strings>
template<typename CaseFoldingDSL >
LEXY_CONSTEVAL auto lexy::_symbol_table< T, CaseFolding, Strings >::case_folding ( CaseFoldingDSL  ) const
inline

Definition at line 43 of file symbol.hpp.

◆ empty()

template<typename T , template< typename > typename CaseFolding, typename... Strings>
static constexpr bool lexy::_symbol_table< T, CaseFolding, Strings >::empty ( )
inlinestaticconstexprnoexcept

Definition at line 85 of file symbol.hpp.

◆ end()

template<typename T , template< typename > typename CaseFolding, typename... Strings>
constexpr iterator lexy::_symbol_table< T, CaseFolding, Strings >::end ( ) const
inlineconstexprnoexcept

Definition at line 148 of file symbol.hpp.

◆ map() [1/3]

template<typename T , template< typename > typename CaseFolding, typename... Strings>
template<typename SymbolString , typename... Args>
LEXY_CONSTEVAL auto lexy::_symbol_table< T, CaseFolding, Strings >::map ( Args &&...  args) const
inline

Definition at line 50 of file symbol.hpp.

◆ map() [2/3]

template<typename T , template< typename > typename CaseFolding, typename... Strings>
template<auto C, typename... Args>
LEXY_CONSTEVAL auto lexy::_symbol_table< T, CaseFolding, Strings >::map ( Args &&...  args) const
inline

Definition at line 72 of file symbol.hpp.

◆ map() [3/3]

template<typename T , template< typename > typename CaseFolding, typename... Strings>
template<typename CharT , CharT... C, typename... Args>
LEXY_CONSTEVAL auto lexy::_symbol_table< T, CaseFolding, Strings >::map ( lexyd::_lit< CharT, C... >  ,
Args &&...  args 
) const
inline

Definition at line 79 of file symbol.hpp.

◆ operator[]()

template<typename T , template< typename > typename CaseFolding, typename... Strings>
constexpr const T& lexy::_symbol_table< T, CaseFolding, Strings >::operator[] ( key_index  idx) const
inlineconstexprnoexcept

Definition at line 202 of file symbol.hpp.

◆ parse()

template<typename T , template< typename > typename CaseFolding, typename... Strings>
template<typename Input >
constexpr key_index lexy::_symbol_table< T, CaseFolding, Strings >::parse ( const Input &  input) const
inlineconstexpr

Definition at line 192 of file symbol.hpp.

◆ size()

template<typename T , template< typename > typename CaseFolding, typename... Strings>
static constexpr std::size_t lexy::_symbol_table< T, CaseFolding, Strings >::size ( )
inlinestaticconstexprnoexcept

Definition at line 90 of file symbol.hpp.

◆ try_parse()

template<typename T , template< typename > typename CaseFolding, typename... Strings>
template<typename Reader >
constexpr key_index lexy::_symbol_table< T, CaseFolding, Strings >::try_parse ( Reader &  reader) const
inlineconstexpr

Definition at line 179 of file symbol.hpp.

Friends And Related Function Documentation

◆ _symbol_table

template<typename T , template< typename > typename CaseFolding, typename... Strings>
template<typename , template< typename > typename, typename... >
friend class _symbol_table
friend

Definition at line 240 of file symbol.hpp.

Member Data Documentation

◆ _data

template<typename T , template< typename > typename CaseFolding, typename... Strings>
std::conditional_t<empty(), char, T> lexy::_symbol_table< T, CaseFolding, Strings >::_data[empty() ? 1 :size()]
private

Definition at line 237 of file symbol.hpp.

◆ _max_char_count

template<typename T , template< typename > typename CaseFolding, typename... Strings>
constexpr auto lexy::_symbol_table< T, CaseFolding, Strings >::_max_char_count = (0 + ... + Strings::size)
staticconstexprprivate

Definition at line 209 of file symbol.hpp.

◆ _trie

template<typename T , template< typename > typename CaseFolding, typename... Strings>
template<typename Encoding >
constexpr lexy::_detail::lit_trie<Encoding, CaseFolding, _max_char_count> lexy::_symbol_table< T, CaseFolding, Strings >::_trie = _build_trie<Encoding>()
staticconstexprprivate

Definition at line 223 of file symbol.hpp.


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


behaviortree_cpp_v4
Author(s): Davide Faconti
autogenerated on Fri Dec 13 2024 03:19:19