spot  2.11.6
Classes | Public Types | Public Member Functions | List of all members
tlyy::parser::semantic_type Class Reference

#include <spot/parsetl/parsetl.hh>

Collaboration diagram for tlyy::parser::semantic_type:

Public Types

typedef semantic_type self_type
 Type of *this. More...
 

Public Member Functions

 semantic_type ()
 Empty construction. More...
 
template<typename T >
 semantic_type (const T &t)
 Construct and fill. More...
 
 ~semantic_type ()
 Destruction, allowed only if empty. More...
 
template<typename T >
T & emplace ()
 Instantiate an empty T in here. More...
 
template<typename T >
T & emplace (const T &t)
 Instantiate a T in here from t. More...
 
template<typename T >
T & build ()
 
template<typename T >
T & build (const T &t)
 
template<typename T >
T & as ()
 Accessor to a built T. More...
 
template<typename T >
const T & as () const
 Const accessor to a built T (for printer). More...
 
template<typename T >
void swap (self_type &that)
 
template<typename T >
void move (self_type &that)
 
template<typename T >
void copy (const self_type &that)
 Copy the content of that to this. More...
 
template<typename T >
void destroy ()
 Destroy the stored T. More...
 

Detailed Description

A buffer to store and retrieve objects.

Sort of a variant, but does not keep track of the nature of the stored data, since that knowledge is available via the current parser state.

Member Typedef Documentation

◆ self_type

Type of *this.

Constructor & Destructor Documentation

◆ semantic_type() [1/2]

tlyy::parser::semantic_type::semantic_type ( )
inline

Empty construction.

◆ semantic_type() [2/2]

template<typename T >
tlyy::parser::semantic_type::semantic_type ( const T &  t)
inline

Construct and fill.

◆ ~semantic_type()

tlyy::parser::semantic_type::~semantic_type ( )
inline

Destruction, allowed only if empty.

Member Function Documentation

◆ as() [1/2]

template<typename T >
T& tlyy::parser::semantic_type::as ( )
inline

Accessor to a built T.

Referenced by copy(), and move().

◆ as() [2/2]

template<typename T >
const T& tlyy::parser::semantic_type::as ( ) const
inline

Const accessor to a built T (for printer).

◆ build() [1/2]

template<typename T >
T& tlyy::parser::semantic_type::build ( )
inline

Instantiate an empty T in here. Obsolete, use emplace.

◆ build() [2/2]

template<typename T >
T& tlyy::parser::semantic_type::build ( const T &  t)
inline

Instantiate a T in here from t. Obsolete, use emplace.

◆ copy()

template<typename T >
void tlyy::parser::semantic_type::copy ( const self_type that)
inline

Copy the content of that to this.

References as().

◆ destroy()

template<typename T >
void tlyy::parser::semantic_type::destroy ( )
inline

Destroy the stored T.

Referenced by move().

◆ emplace() [1/2]

template<typename T >
T& tlyy::parser::semantic_type::emplace ( )
inline

Instantiate an empty T in here.

◆ emplace() [2/2]

template<typename T >
T& tlyy::parser::semantic_type::emplace ( const T &  t)
inline

Instantiate a T in here from t.

◆ move()

template<typename T >
void tlyy::parser::semantic_type::move ( self_type that)
inline

Move the content of that to this.

Destroys that.

References as(), and destroy().

◆ swap()

template<typename T >
void tlyy::parser::semantic_type::swap ( self_type that)
inline

Swap the content with that, of same type.

Both variants must be built beforehand, because swapping the actual data requires reading it (with as()), and this is not possible on unconstructed variants: it would require some dynamic testing, which should not be the variant's responsibility. Swapping between built and (possibly) non-built is done with self_type::move ().

Member Data Documentation

◆ yyalign_me

long double tlyy::parser::semantic_type::yyalign_me

Strongest alignment constraints.

◆ yyraw

char tlyy::parser::semantic_type::yyraw[size]

A buffer large enough to store any of the semantic values.


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

Please direct any question, comment, or bug report to the Spot mailing list at spot@lrde.epita.fr.
Generated on Fri Feb 27 2015 10:00:07 for spot by doxygen 1.9.1