![]() |
Kea 1.5.0
|
A char[S] buffer to store and retrieve objects. More...
#include <parser.h>
Public Types | |
| typedef variant< S > | self_type |
| Type of *this. | |
Public Member Functions | |
| variant () | |
| Empty construction. | |
| template<typename T > | |
| variant (YY_RVREF(T) t) | |
| Construct and fill. | |
| ~variant () | |
| Destruction, allowed only if empty. | |
| template<typename T > | |
| T & | as () |
| Accessor to a built T. | |
| template<typename T > | |
| const T & | as () const |
| Const accessor to a built T (for printer). | |
| 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 &other) |
| Copy the content of other 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 &other) |
| Move the content of other to this. | |
| template<typename T > | |
| void | swap (self_type &other) |
| Swap the content with other, of same type. | |
A char[S] 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 state.
| typedef variant<S> isc::eval::variant< S >::self_type |
|
inline |
|
inline |
Accessor to a built T.
Definition at line 377 of file parser.h.
References YYASSERT.
Referenced by isc::eval::variant< S >::copy(), isc::eval::variant< S >::move(), and isc::eval::variant< S >::swap().
|
inline |
Copy the content of other to this.
Definition at line 443 of file parser.h.
References isc::eval::variant< S >::as().
Here is the call graph for this function:Destroy the stored T.
Definition at line 451 of file parser.h.
Referenced by isc::eval::variant< S >::move().
|
inline |
Move the content of other to this.
Destroys other.
Definition at line 418 of file parser.h.
References isc::eval::variant< S >::as(), and isc::eval::variant< S >::destroy().
Here is the call graph for this function:
|
inline |
Swap the content with other, 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 variant::move ().
Definition at line 406 of file parser.h.
References isc::eval::variant< S >::as(), and YYASSERT.
Here is the call graph for this function:| long double isc::eval::variant< S >::yyalign_me |
| char isc::eval::variant< S >::yyraw[S] |