Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

s11n::cleaner_upper Struct Reference

Intended for use with for_each(), this type cleans up Serializables using cleanup_serializable(). More...

#include <serialize.hpp>

List of all members.

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).


Detailed Description

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.


Member Function Documentation

template<typename T>
void s11n::cleaner_upper::operator() T *&  t  )  throw () [inline]
 

Calls cleanup_serializable<T>(t).

Definition at line 234 of file serialize.hpp.

template<typename T>
void s11n::cleaner_upper::operator() T &  t  )  throw () [inline]
 

Calls cleanup_serializable<T>(t).

Definition at line 226 of file serialize.hpp.


The documentation for this struct was generated from the following file:
Generated on Mon Dec 26 15:53:18 2005 for libs11n-1.2.3 by  doxygen 1.4.4