Kea: isc::dhcp::Dhcp4Parser::value_type Class Reference

| Kea 3.0.2-git

isc::dhcp::Dhcp4Parser::value_type Class Reference

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

`#include <dhcp4_parser.h>`

## Public Types
typedef value_type | self_type
| Type of *this.

## Public Member Functions
| value_type () YY_NOEXCEPT
| Empty construction.
template<typename T>
| value_type (YY_RVREF(T) t)
| Construct and fill.
| ~value_type () YY_NOEXCEPT
| Destruction, allowed only if empty.
template<typename T>
const T & | as () const YY_NOEXCEPT
| Const accessor to a built T (for printer).
template<typename T>
T & | as () YY_NOEXCEPT
| Accessor to a built T.
template<typename T>
T & | build ()
| Instantiate an empty T in here.
template<typename T>
T & | build (const T &t)
| Instantiate a T in here from t.
template<typename T>
void | copy (const self_type &that)
| Copy the content of that to this.
template<typename T>
void | destroy ()
| Destroy the stored T.
template<typename T>
T & | emplace ()
| Instantiate an empty T in here.
template<typename T>
T & | emplace (const T &t)
| Instantiate a T in here from t.
template<typename T>
void | move (self_type &that)
| Move the content of that to this.
template<typename T>
void | swap (self_type &that) YY_NOEXCEPT
| Swap the content with that, of same type.

## 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 229 of file dhcp4_parser.h.

## Member Typedef Documentation

## ◆ self_type

typedef value_type isc::dhcp::Dhcp4Parser::value_type::self_type

Type of *this.

Definition at line 233 of file dhcp4_parser.h.

## Constructor & Destructor Documentation

## ◆ value_type() [1/2]

isc::dhcp::Dhcp4Parser::value_type::value_type | ( |  | ) |
| inline

Empty construction.

Definition at line 236 of file dhcp4_parser.h.

References YY_NOEXCEPT, and yyraw_.

## ◆ value_type() [2/2]

template<typename T>

isc::dhcp::Dhcp4Parser::value_type::value_type | ( | YY_RVREF(T) | t | ) |
| inline

Construct and fill.

Definition at line 243 of file dhcp4_parser.h.

References PARSER4__ASSERT, YY_MOVE, and YY_RVREF.

## ◆ ~value_type()

isc::dhcp::Dhcp4Parser::value_type::~value_type | ( |  | ) |
| inline

Destruction, allowed only if empty.

Definition at line 258 of file dhcp4_parser.h.

References PARSER4__ASSERT, and YY_NOEXCEPT.

## Member Function Documentation

## ◆ as() [1/2]

template<typename T>

const T & isc::dhcp::Dhcp4Parser::value_type::as | ( |  | ) | const
| inline

Const accessor to a built T (for printer).

Definition at line 330 of file dhcp4_parser.h.

References PARSER4__ASSERT, and YY_NOEXCEPT.

## ◆ as() [2/2]

template<typename T>

T & isc::dhcp::Dhcp4Parser::value_type::as | ( |  | ) |
| inline

Accessor to a built T.

Definition at line 319 of file dhcp4_parser.h.

References PARSER4__ASSERT, and YY_NOEXCEPT.

Referenced by copy(), destroy(), move(), isc::dhcp::Dhcp4Parser::parse(), and swap().

## ◆ build() [1/2]

template<typename T>

T & isc::dhcp::Dhcp4Parser::value_type::build | ( |  | ) |
| inline

Instantiate an empty T in here.

Obsolete, use emplace.

Definition at line 302 of file dhcp4_parser.h.

References emplace().

Here is the call graph for this function:

## ◆ build() [2/2]

template<typename T>

T & isc::dhcp::Dhcp4Parser::value_type::build | ( | const T & | t | ) |
| inline

Instantiate a T in here from t.

Obsolete, use emplace.

Definition at line 311 of file dhcp4_parser.h.

References emplace().

Here is the call graph for this function:

## ◆ copy()

template<typename T>

void isc::dhcp::Dhcp4Parser::value_type::copy | ( | const self_type & | that | ) |
| inline

Copy the content of that to this.

Definition at line 385 of file dhcp4_parser.h.

References as(), and emplace().

Here is the call graph for this function:

## ◆ destroy()

template<typename T>

void isc::dhcp::Dhcp4Parser::value_type::destroy | ( |  | ) |
| inline

Destroy the stored T.

Definition at line 393 of file dhcp4_parser.h.

References as().

Referenced by move().

Here is the call graph for this function:

## ◆ emplace() [1/2]

template<typename T>

T & isc::dhcp::Dhcp4Parser::value_type::emplace | ( |  | ) |
| inline

Instantiate an empty T in here.

Definition at line 278 of file dhcp4_parser.h.

References PARSER4__ASSERT.

Referenced by build(), build(), copy(), move(), and isc::dhcp::Dhcp4Parser::parse().

## ◆ emplace() [2/2]

template<typename T>

T & isc::dhcp::Dhcp4Parser::value_type::emplace | ( | const T & | t | ) |
| inline

Instantiate a T in here from t.

Definition at line 289 of file dhcp4_parser.h.

References PARSER4__ASSERT.

## ◆ move()

template<typename T>

void isc::dhcp::Dhcp4Parser::value_type::move | ( | self_type & | that | ) |
| inline

Move the content of that to this.

Destroys that.

Definition at line 360 of file dhcp4_parser.h.

References as(), destroy(), emplace(), and swap().

Here is the call graph for this function:

## ◆ swap()

template<typename T>

void isc::dhcp::Dhcp4Parser::value_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 348 of file dhcp4_parser.h.

References as(), PARSER4__ASSERT, and YY_NOEXCEPT.

Referenced by move().

Here is the call graph for this function:

## Member Data Documentation

## ◆ yyalign_me_

long double isc::dhcp::Dhcp4Parser::value_type::yyalign_me_

Strongest alignment constraints.

Definition at line 460 of file dhcp4_parser.h.

## ◆ yyraw_

char isc::dhcp::Dhcp4Parser::value_type::yyraw_[size]

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

Definition at line 462 of file dhcp4_parser.h.

Referenced by value_type().

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

- dhcp4_parser.h