Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

CdbAlwaysClosePolicy< P > Class Template Reference

This is a policy class meant to parametrize smart pointer classes. More...

#include <CdbAlwaysClosePolicy.hh>

List of all members.

Static Public Member Functions

void close (P *ptr)
 Close specified pointer.


Detailed Description

template<class P>
class CdbAlwaysClosePolicy< P >

This is a policy class meant to parametrize smart pointer classes.

This class is passed as a parameter to the counted smart pointer classes in order to close a pointed object (pointee) when (right before) it's going to be destroyed.

This particular implementation ensures that a pointed object gets always closed before deleted. This means that some interraction with this class takes place. So we expect the pointee class to expose the following interface:

     class P ... {
     public:
         ...
         bool isOpen( );
         void close( );
     };
 

Definition at line 30 of file CdbAlwaysClosePolicy.hh.


Member Function Documentation

template<class P>
void CdbAlwaysClosePolicy< P >::close P *    ptr [static]
 

Close specified pointer.

In accordance with this policy this method interracts with specified object and makes sure it's closed.

Definition at line 14 of file CdbAlwaysClosePolicy.cc.


The documentation for this class was generated from the following files:
Generated on Mon Dec 5 18:22:17 2005 for CDB by doxygen1.3-rc3