Vcsn
2.2
Be Rational
|
A char[S] buffer to store and retrieve objects. More...
#include <parse.hh>
Public Types | |
typedef variant< S > | self_type |
Type of *this. More... | |
Public Member Functions | |
variant () | |
Empty construction. More... | |
template<typename T > | |
variant (const T &t) | |
Construct and fill. More... | |
~variant () | |
Destruction, allowed only if empty. 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 > | |
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 &other) |
Swap the content with other, of same type. More... | |
template<typename T > | |
void | move (self_type &other) |
Move the content of other to this. More... | |
template<typename T > | |
void | copy (const self_type &other) |
Copy the content of other to this. More... | |
template<typename T > | |
void | destroy () |
Destroy the stored T. More... | |
Private Member Functions | |
self_type & | operator= (const self_type &) |
Prohibit blind copies. More... | |
variant (const self_type &) | |
template<typename T > | |
T * | yyas_ () |
Accessor to raw memory as T. More... | |
template<typename T > | |
const T * | yyas_ () const |
Const accessor to raw memory as T. More... | |
Private Attributes | |
union { | |
long double yyalign_me | |
Strongest alignment constraints. More... | |
char yyraw [S] | |
A buffer large enough to store any of the semantic values. More... | |
} | yybuffer_ |
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> vcsn::detail::dot::variant< S >::self_type |
|
inline |
|
inline |
|
inline |
|
private |
Accessor to a built T.
Definition at line 215 of file parse.hh.
Referenced by vcsn::rat::variant< sizeof(union_type)>::copy(), vcsn::detail::dot::variant< sizeof(union_type)>::copy(), vcsn::detail::dot::parser::parse(), vcsn::rat::variant< sizeof(union_type)>::swap(), and vcsn::detail::dot::variant< sizeof(union_type)>::swap().
|
inline |
Instantiate an empty T in here.
Definition at line 199 of file parse.hh.
Referenced by vcsn::detail::dot::parser::parse().
|
inline |
|
inline |
Copy the content of other to this.
Definition at line 258 of file parse.hh.
Referenced by vcsn::detail::dot::parser::basic_symbol< Base >::basic_symbol().
Destroy the stored T.
Definition at line 266 of file parse.hh.
Referenced by vcsn::rat::variant< sizeof(union_type)>::move(), and vcsn::detail::dot::variant< sizeof(union_type)>::move().
|
inline |
Move the content of other to this.
Destroys other.
Definition at line 248 of file parse.hh.
Referenced by vcsn::detail::dot::parser::stack_symbol_type::stack_symbol_type(), and vcsn::rat::parser::stack_symbol_type::stack_symbol_type().
|
private |
Prohibit blind copies.
|
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 responsability. Swapping between built and (possibly) non-built is done with variant::move ().
|
inlineprivate |
|
inlineprivate |
long double vcsn::detail::dot::variant< S >::yyalign_me |
union { ... } vcsn::detail::dot::variant< S >::yybuffer_ |
Referenced by vcsn::detail::dot::variant< sizeof(union_type)>::yyas_().
char vcsn::detail::dot::variant< S >::yyraw[S] |