Vcsn
2.2
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 91 of file xalloc.hxx.
long int vcsn::xalloc< StoredType >::index | ( | ) | const |
The xalloc index.
Definition at line 32 of file xalloc.hxx.
StoredType & vcsn::xalloc< StoredType >::operator() | ( | std::ostream & | ostr | ) | const |
The stored data as an lvalue.
Definition at line 39 of file xalloc.hxx.
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 66 of file xalloc.hxx.
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 115 of file xalloc.hxx.
|
private |