#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). |
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.
This type is usable as a Finalizer for s11n::refcount::rcptr, by the way.
Definition at line 225 of file serialize.hpp.
void s11n::cleaner_upper::operator() | ( | T & | t | ) | throw () [inline] |
void s11n::cleaner_upper::operator() | ( | T *& | t | ) | throw () [inline] |