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>
Defines the operator() for the classes get_type, set_type and swap_type.
void operator()(std::ostream &ostr) const
Get the data from the xalloced place.
get_type get(StoredType &data) const
A getter.
Handle the data to get from the xalloced place.
swap_type swap(StoredType &data) const
A swapper.
std::ostream & operator<<(std::ostream &os, direction d)
Pretty-printing.
swap_type(const xalloc &slot, StoredType &data)
Set data_ to data.
xalloc()
Allocates the slot.
StoredType & operator()(std::ostream &ostr) const
The stored data as an lvalue.
set_type set(StoredType &data) const
A setter.
get_type(const xalloc &slot, StoredType &data)
Set data_ to data.
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.
long int index() const ATTRIBUTE_PURE
The xalloc index.
set_type(const xalloc &slot, StoredType &data)
Set data_ to data.
Allocate slots in std::ostreams.
void operator()(std::ostream &ostr) const
Set the data in the xalloced place.
Handle the data to put in the xalloced place.