Intended for use with for_each(), this type cleans up Serializables using cleanup_serializable(). More...
#include <serialize.hpp>
Public Member Functions | |
template<typename T > | |
void | operator() (T &t) throw () |
Calls cleanup_serializable<T>(t). | |
template<typename T > | |
void | operator() (T *&t) throw () |
Calls cleanup_serializable<T>(t). |
Intended for use with for_each(), this type cleans up Serializables using cleanup_serializable().
Usage:
std::for_each( container.begin(), container.end(), cleaner_upper() );
where the container is parameterized to hold Serializables.
Provided that the contained type(s) conform to cleanup_ptr's requirements, this will recursively clean up sub-sub-...subcontainers.
Note that Serializable containers should have a cleanup functor installed as part of their registration, making this class unnecessary for most cases: simply calling cleanup_serializable() will recursively walk/clean such containers. The underlying cleanup algos might use this type, however (at least one of them does).
Added in 1.1.3.
Definition at line 220 of file serialize.hpp.
void s11n::cleaner_upper::operator() | ( | T *& | t | ) | throw () [inline] |
Calls cleanup_serializable<T>(t).
Definition at line 234 of file serialize.hpp.
void s11n::cleaner_upper::operator() | ( | T & | t | ) | throw () [inline] |
Calls cleanup_serializable<T>(t).
Definition at line 226 of file serialize.hpp.