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