![]() |
|
|
Bdb packages | Design docs | Source docs | Guidelines | Recent releases |
|
Main Page Modules Namespace List Class Hierarchy Alphabetical List Compound List File List Compound Members File Members /CdbBase/CdbCPtrBase.hh
Go to the documentation of this file.00001 #ifndef CDB_CPTR_BASE_HH 00002 #define CDB_CPTR_BASE_HH 00003 00004 #include "CdbBase/CdbCommon.hh" 00005 00006 /// A base class for the counted smart pointer class. 00007 /** 00008 * The only role of this utility class is to provide "trusted" destruction of 00009 * an object of the specific parameter class. We do this operation in the 00010 * dedicated class in order to increase the flexibility in the actual 00011 * implementation of the derived smart pointers. 00012 */ 00013 template < class P > 00014 class CdbCPtrBase { 00015 00016 protected: 00017 00018 /// The destructor of pointed objects 00019 /** 00020 * We're assuming that the current class has access to the destructor 00021 * of the pointed object. Note, that the passed pointer will also be 00022 * reset to 0 upon the completion of this method. 00023 */ 00024 static void deleteObject( P*& ptr ); 00025 }; 00026 00027 #ifdef BABAR_COMP_INST 00028 #include "CdbBase/CdbCPtrBase.cc" 00029 #endif // BABAR_COMP_INST 00030 00031 #endif // CDB_CPTR_BASE_HH 00032
BaBar Public Site | SLAC | News | Links | Who's Who | Contact Us
Page Owner: Jacek Becla
Last Update: October 04, 2002