header_utils
Loading...
Searching...
No Matches
ghassanpl::symbol_base< SYMBOL_PROVIDER > Struct Template Reference

The base class for all symbols. More...

#include <symbol.h>

Public Types

using symbol_provider
using internal_value_type
using hash_type

Public Member Functions

template<typename T>
 symbol_base (T &&val)
template<typename T>
symbol_base & operator= (T &&val) noexcept
 symbol_base (symbol_base const &other) noexcept=default
 symbol_base (symbol_base &&other) noexcept=default
symbol_base & operator= (symbol_base const &other) noexcept=default
symbol_base & operator= (symbol_base &&other) noexcept=default
hash_type get_hash () const noexcept
std::string_view get_string () const noexcept
auto to_string () const noexcept
auto operator-> () const noexcept
 Only available if the internal value type is a pointer.
bool operator== (symbol_base const &other) const noexcept
auto operator<=> (symbol_base const &other) const noexcept
bool empty () const noexcept
size_t size () const noexcept

Public Attributes

internal_value_type value

Friends

bool operator== (std::string_view a, symbol_base const &b) noexcept
auto operator<=> (std::string_view a, symbol_base const &b) noexcept
std::ostream & operator<< (std::ostream &o, const symbol_base &ptr)

Detailed Description

template<typename SYMBOL_PROVIDER>
struct ghassanpl::symbol_base< SYMBOL_PROVIDER >

The base class for all symbols.

Definition at line 24 of file symbol.h.

Member Typedef Documentation

◆ hash_type

template<typename SYMBOL_PROVIDER>
using ghassanpl::symbol_base< SYMBOL_PROVIDER >::hash_type

Definition at line 28 of file symbol.h.

◆ internal_value_type

template<typename SYMBOL_PROVIDER>
using ghassanpl::symbol_base< SYMBOL_PROVIDER >::internal_value_type

Definition at line 27 of file symbol.h.

◆ symbol_provider

template<typename SYMBOL_PROVIDER>
using ghassanpl::symbol_base< SYMBOL_PROVIDER >::symbol_provider

Definition at line 26 of file symbol.h.

Constructor & Destructor Documentation

◆ symbol_base()

template<typename SYMBOL_PROVIDER>
template<typename T>
ghassanpl::symbol_base< SYMBOL_PROVIDER >::symbol_base ( T && val)
inline

Definition at line 34 of file symbol.h.

Member Function Documentation

◆ empty()

template<typename SYMBOL_PROVIDER>
bool ghassanpl::symbol_base< SYMBOL_PROVIDER >::empty ( ) const
inlinenodiscardnoexcept

Definition at line 66 of file symbol.h.

◆ get_hash()

template<typename SYMBOL_PROVIDER>
hash_type ghassanpl::symbol_base< SYMBOL_PROVIDER >::get_hash ( ) const
inlinenodiscardnoexcept

Definition at line 47 of file symbol.h.

◆ get_string()

template<typename SYMBOL_PROVIDER>
std::string_view ghassanpl::symbol_base< SYMBOL_PROVIDER >::get_string ( ) const
inlinenodiscardnoexcept

Definition at line 48 of file symbol.h.

◆ operator->()

template<typename SYMBOL_PROVIDER>
auto ghassanpl::symbol_base< SYMBOL_PROVIDER >::operator-> ( ) const
inlinenodiscardnoexcept

Only available if the internal value type is a pointer.

Definition at line 54 of file symbol.h.

◆ operator<=>()

template<typename SYMBOL_PROVIDER>
auto ghassanpl::symbol_base< SYMBOL_PROVIDER >::operator<=> ( symbol_base< SYMBOL_PROVIDER > const & other) const
inlinenodiscardnoexcept

Definition at line 59 of file symbol.h.

◆ operator=()

template<typename SYMBOL_PROVIDER>
template<typename T>
symbol_base & ghassanpl::symbol_base< SYMBOL_PROVIDER >::operator= ( T && val)
inlinenoexcept

Definition at line 38 of file symbol.h.

◆ operator==()

template<typename SYMBOL_PROVIDER>
bool ghassanpl::symbol_base< SYMBOL_PROVIDER >::operator== ( symbol_base< SYMBOL_PROVIDER > const & other) const
inlinenodiscardnoexcept

Definition at line 58 of file symbol.h.

◆ size()

template<typename SYMBOL_PROVIDER>
size_t ghassanpl::symbol_base< SYMBOL_PROVIDER >::size ( ) const
inlinenodiscardnoexcept

Definition at line 67 of file symbol.h.

◆ to_string()

template<typename SYMBOL_PROVIDER>
auto ghassanpl::symbol_base< SYMBOL_PROVIDER >::to_string ( ) const
inlinenodiscardnoexcept

Definition at line 51 of file symbol.h.

◆ operator<<

template<typename SYMBOL_PROVIDER>
std::ostream & operator<< ( std::ostream & o,
const symbol_base< SYMBOL_PROVIDER > & ptr )
friend

Definition at line 68 of file symbol.h.

◆ operator<=>

template<typename SYMBOL_PROVIDER>
auto operator<=> ( std::string_view a,
symbol_base< SYMBOL_PROVIDER > const & b )
friend

Definition at line 62 of file symbol.h.

◆ operator==

template<typename SYMBOL_PROVIDER>
bool operator== ( std::string_view a,
symbol_base< SYMBOL_PROVIDER > const & b )
friend

Definition at line 61 of file symbol.h.

Member Data Documentation

◆ value

template<typename SYMBOL_PROVIDER>
internal_value_type ghassanpl::symbol_base< SYMBOL_PROVIDER >::value

Definition at line 30 of file symbol.h.