00001 #ifndef CDB_DO_NOT_CLOSE_POLICY_HH 00002 #define CDB_DO_NOT_CLOSE_POLICY_HH 00003 00004 // File and Version Information: 00005 // $Id: CdbDoNotClosePolicy.hh,v 1.3 2004/07/13 01:41:49 gapon Exp $ 00006 00007 #include "CdbBase/CdbCommon.hh" 00008 00009 /// This is a policy class meant to parametrize smart pointer classes 00010 /** 00011 * This class is passed as a parameter to the counted smart pointer 00012 * classes in order to close a pointed object (pointee) when (right before) 00013 * it's going to be destroyed. 00014 * 00015 * This particular implementation does not do anything although 00016 * it's interface obeys the required syntax. 00017 */ 00018 template < class P > 00019 class CdbDoNotClosePolicy { 00020 00021 public: 00022 00023 /// Close specified pointer 00024 /** 00025 * In accordance with this policy this method does nothing to that 00026 * objects. 00027 */ 00028 static void close( P* ptr ); 00029 }; 00030 00031 #ifdef BABAR_COMP_INST 00032 #include "CdbBase/CdbDoNotClosePolicy.cc" 00033 #endif // BABAR_COMP_INST 00034 00035 #endif // CDB_DO_NOT_CLOSE_POLICY_HH
1.3-rc3