![]() |
Vcsn
2.8
Be Rational
|
Allocate slots in std::ostreams. More...
#include <xalloc.hh>
Classes | |
class | get_type |
Handle the data to get from the xalloced place. More... | |
class | set_type |
Handle the data to put in the xalloced place. More... | |
class | swap_type |
Swap the data stored in the stream for a given one. More... | |
Public Member Functions | |
xalloc () | |
Allocates the slot. More... | |
long int | index () const ATTRIBUTE_PURE |
The xalloc index. More... | |
StoredType & | operator() (std::ostream &ostr) const |
The stored data as an lvalue. More... | |
set_type | set (StoredType &data) const |
A setter. More... | |
get_type | get (StoredType &data) const |
A getter. More... | |
swap_type | swap (StoredType &data) const |
A swapper. More... | |
Private Attributes | |
const long int | index_ |
The index of the slot. More... | |
Allocate slots in std::ostreams.
Used to store flags in streams.
Set, get or swap data. The idea is to build the right inner class with set, get or swap methods, then use this class as a parameter of operator<<.
vcsn::xalloc< StoredType >::xalloc | ( | ) |
Allocates the slot.
Definition at line 26 of file xalloc.hxx.
xalloc< StoredType >::get_type vcsn::xalloc< StoredType >::get | ( | StoredType & | data | ) | const |
A getter.
data | where to store the value when the getter is executed. |
Definition at line 110 of file xalloc.hxx.
References vcsn::xalloc< StoredType >::get_type::get_type().
long int vcsn::xalloc< StoredType >::index | ( | ) | const |
The xalloc index.
Definition at line 32 of file xalloc.hxx.
References vcsn::xalloc< StoredType >::index_.
Referenced by vcsn::xalloc< StoredType >::operator()().
StoredType & vcsn::xalloc< StoredType >::operator() | ( | std::ostream & | ostr | ) | const |
The stored data as an lvalue.
Definition at line 61 of file xalloc.hxx.
References vcsn::xalloc< StoredType >::index().
xalloc< StoredType >::set_type vcsn::xalloc< StoredType >::set | ( | StoredType & | data | ) | const |
A setter.
data | where to find the value when the setter is executed. |
Definition at line 85 of file xalloc.hxx.
References vcsn::xalloc< StoredType >::set_type::set_type().
xalloc< StoredType >::swap_type vcsn::xalloc< StoredType >::swap | ( | StoredType & | data | ) | const |
A swapper.
data | value to exchange when the swapper is executed. |
Definition at line 134 of file xalloc.hxx.
References vcsn::xalloc< StoredType >::swap_type::swap_type().
|
private |
The index of the slot.
Definition at line 98 of file xalloc.hh.
Referenced by vcsn::xalloc< StoredType >::index().