Kea  1.9.9-git
isc::dhcp::Dhcp4Parser::semantic_type Class Reference

A buffer to store and retrieve objects. More...

#include <dhcp4_parser.h>

Public Types

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

Public Member Functions

 semantic_type () YY_NOEXCEPT
 Empty construction. More...
 
template<typename T >
 semantic_type (YY_RVREF(T) t)
 Construct and fill. More...
 
 ~semantic_type () YY_NOEXCEPT
 Destruction, allowed only if empty. More...
 
template<typename T >
T & as () YY_NOEXCEPT
 Accessor to a built T. More...
 
template<typename T >
const T & as () const YY_NOEXCEPT
 Const accessor to a built T (for printer). More...
 
template<typename T >
T & build ()
 Instantiate an empty T in here. More...
 
template<typename T >
T & build (const T &t)
 Instantiate a T in here from t. More...
 
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...
 
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 >
void move (self_type &that)
 Move the content of that to this. More...
 
template<typename T >
void swap (self_type &that) YY_NOEXCEPT
 Swap the content with that, of same type. 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.

Definition at line 218 of file dhcp4_parser.h.

Member Typedef Documentation

Type of *this.

Definition at line 222 of file dhcp4_parser.h.

Constructor & Destructor Documentation

isc::dhcp::Dhcp4Parser::semantic_type::semantic_type ( )
inline

Empty construction.

Definition at line 225 of file dhcp4_parser.h.

template<typename T >
isc::dhcp::Dhcp4Parser::semantic_type::semantic_type ( YY_RVREF(T)  t)
inline

Construct and fill.

Definition at line 232 of file dhcp4_parser.h.

References PARSER4__ASSERT, and YY_MOVE.

isc::dhcp::Dhcp4Parser::semantic_type::~semantic_type ( )
inline

Destruction, allowed only if empty.

Definition at line 247 of file dhcp4_parser.h.

References PARSER4__ASSERT.

Member Function Documentation

template<typename T >
T& isc::dhcp::Dhcp4Parser::semantic_type::as ( )
inline

Accessor to a built T.

Definition at line 308 of file dhcp4_parser.h.

References PARSER4__ASSERT.

Referenced by copy(), and move().

template<typename T >
const T& isc::dhcp::Dhcp4Parser::semantic_type::as ( ) const
inline

Const accessor to a built T (for printer).

Definition at line 319 of file dhcp4_parser.h.

References PARSER4__ASSERT.

template<typename T >
T& isc::dhcp::Dhcp4Parser::semantic_type::build ( )
inline

Instantiate an empty T in here.

Obsolete, use emplace.

Definition at line 291 of file dhcp4_parser.h.

template<typename T >
T& isc::dhcp::Dhcp4Parser::semantic_type::build ( const T &  t)
inline

Instantiate a T in here from t.

Obsolete, use emplace.

Definition at line 300 of file dhcp4_parser.h.

template<typename T >
void isc::dhcp::Dhcp4Parser::semantic_type::copy ( const self_type that)
inline

Copy the content of that to this.

Definition at line 374 of file dhcp4_parser.h.

References as().

Referenced by isc::dhcp::Dhcp4Parser::basic_symbol< Base >::basic_symbol().

+ Here is the call graph for this function:

template<typename T >
void isc::dhcp::Dhcp4Parser::semantic_type::destroy ( )
inline

Destroy the stored T.

Definition at line 382 of file dhcp4_parser.h.

Referenced by move().

template<typename T >
T& isc::dhcp::Dhcp4Parser::semantic_type::emplace ( )
inline

Instantiate an empty T in here.

Definition at line 267 of file dhcp4_parser.h.

References PARSER4__ASSERT.

template<typename T >
T& isc::dhcp::Dhcp4Parser::semantic_type::emplace ( const T &  t)
inline

Instantiate a T in here from t.

Definition at line 278 of file dhcp4_parser.h.

References PARSER4__ASSERT.

template<typename T >
void isc::dhcp::Dhcp4Parser::semantic_type::move ( self_type that)
inline

Move the content of that to this.

Destroys that.

Definition at line 349 of file dhcp4_parser.h.

References as(), and destroy().

+ Here is the call graph for this function:

template<typename T >
void isc::dhcp::Dhcp4Parser::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 ().

Definition at line 337 of file dhcp4_parser.h.

References PARSER4__ASSERT.

Member Data Documentation

long double isc::dhcp::Dhcp4Parser::semantic_type::yyalign_me

Strongest alignment constraints.

Definition at line 448 of file dhcp4_parser.h.

char isc::dhcp::Dhcp4Parser::semantic_type::yyraw[size]

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

Definition at line 450 of file dhcp4_parser.h.


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