Bdb packages | Design docs | Source docs | Guidelines | Recent releases

Search | Site Map .

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

CdbAlwaysClosePolicy< P > Class Template Reference
[CdbBase]

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

#include <CdbAlwaysClosePolicy.hh>

Inheritance diagram for CdbAlwaysClosePolicy< P >:

CdbClosePolicy List of all members.

Static Public Methods

void close (P *ptr)
 Close specified pointer.


Protected Methods

 CdbAlwaysClosePolicy ()
 The constructor.


Detailed Description

template<class P>
class CdbAlwaysClosePolicy< P >

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

This class extends the marker interface CdbClosePolicy.

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( );
     };

See also:
CdbClosePolicy

Definition at line 32 of file CdbAlwaysClosePolicy.hh.


Constructor & Destructor Documentation

template<class P>
CdbAlwaysClosePolicy< P >::CdbAlwaysClosePolicy   [protected]
 

The constructor.

Is disabled...

Definition at line 13 of file CdbAlwaysClosePolicy.cc.


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 20 of file CdbAlwaysClosePolicy.cc.


The documentation for this class was generated from the following files:

 


BaBar Public Site | SLAC | News | Links | Who's Who | Contact Us

Page Owner: Jacek Becla
Last Update: October 04, 2002