#include <traits.hpp>
Public Types | |
typedef type_traits < SerializableType > ::type | serializable_type |
Public Member Functions | |
void | operator() (serializable_type &) const throw () |
Default implementation does nothing, though we should arguably assign to a default-constructed object. |
Compatible implementations and specializations must follow the conventions defined for this class.
This implementation is only suitable for cleaning up types which manage any child pointers which are assigned to them during deserialization. For example, std:: containers do not own their pointers, and therefor require a specialization of this type to clean them up.
SerializableType must be a Serializable and may be pointer-qualified.
The library manual goes into more detail about what this type is for.
The operations of this class are declared as throw() because of their logical role in the destruction process, and destructors are not generally allowed to throw.
Definition at line 340 of file traits.hpp.
typedef type_traits<SerializableType>::type s11n::default_cleanup_functor< SerializableType >::serializable_type |
Definition at line 342 of file traits.hpp.
void s11n::default_cleanup_functor< SerializableType >::operator() | ( | serializable_type & | ) | const throw () [inline] |
Default implementation does nothing, though we should arguably assign to a default-constructed object.
Specializations must do any cleanup they need to here. For example, container specializations must a) deallocate any heap-based entries and b) empty the list. Specializations are free to do a default-assign, as mentioned above, but are not required to. Specializations for containers must recursively use s11n_trait::cleanup_functor for the contained types, to ensure that they can properly clean up containers holding other containers.
Definition at line 359 of file traits.hpp.