25 template <
class StoredType>
27 : index_(std::ios::
xalloc())
30 template <
class StoredType>
37 template <
class StoredType>
44 return (StoredType&)(ostr.pword(index()));
52 template <
class StoredType>
54 : slot_(slot), data_(data)
57 template <
class StoredType>
64 template <
class StoredType>
76 template <
class StoredType>
78 : slot_(slot), data_(data)
82 template <
class StoredType>
89 template <
class StoredType>
101 template <
class StoredType>
103 : slot_(slot), data_(data)
106 template <
class StoredType>
110 std::swap(slot_(ostr), data_);
113 template <
class StoredType>
std::ostream & operator<<(std::ostream &os, direction d)
Pretty-printing.
get_type(const xalloc &slot, StoredType &data)
Set data_ to data.
Handle the data to get from the xalloced place.
swap_type swap(StoredType &data) const
A swapper.
set_type set(StoredType &data) const
A setter.
Handle the data to put in the xalloced place.
Defines the operator() for the classes get_type, set_type and swap_type.
xalloc()
Allocates the slot.
StoredType & operator()(std::ostream &ostr) const
The stored data as an lvalue.
void operator()(std::ostream &ostr) const
Set the data in the xalloced place.
Allocate slots in std::ostreams.
get_type get(StoredType &data) const
A getter.
void operator()(std::ostream &ostr) const
Get the data from the xalloced place.
void operator()(std::ostream &ostr) const
Swap the data from the xalloced place for a given one.
Swap the data stored in the stream for a given one.
swap_type(const xalloc &slot, StoredType &data)
Set data_ to data.
long int index() const ATTRIBUTE_PURE
The xalloc index.
set_type(const xalloc &slot, StoredType &data)
Set data_ to data.