00001 // File and Version Information: 00002 // $Id: CdbRooReadonly.cc,v 1.2 2004/12/20 20:18:23 gapon Exp $ 00003 00004 /// The implementation of the CdbRooReadonly singleton. 00005 /** 00006 * @see CdbRooReadonly 00007 */ 00008 00009 #include "BaBar/BaBar.hh" 00010 00011 #include "CdbRooReadonly/CdbRooReadonly.hh" 00012 #include "CdbRooReadonly/CdbRooRoCdb.hh" 00013 00014 #include "CdbRoo/CdbRoo.hh" 00015 00016 namespace { 00017 00018 const CdbRooRoCdb* 00019 instantiate_Cdb( ) 00020 { 00021 // The constructor will register a smart pointer onto itself 00022 // into the Registry. This is why we're having a sort of "memory leak" here. 00023 00024 static CdbRooRoCdb* ptr = 0; 00025 if( 0 == ptr ) ptr = new CdbRooRoCdb( ); 00026 return ptr; 00027 } 00028 }; 00029 00030 void 00031 CdbRooReadonly::forceLoad( ) 00032 { 00033 // WARNING: We should never mess with smart pointers onto this object because 00034 // they may destroy the object, which is still in the registry. 00035 00036 // const Cdb* cdb = 00037 instantiate_Cdb( ); 00038 } 00039 00040 const char* 00041 CdbRooReadonly::technology( ) 00042 { 00043 return CdbRoo::technology( ); 00044 } 00045 00046 const char* 00047 CdbRooReadonly::implementation( ) 00048 { 00049 return "Readonly"; 00050 } 00051 00052 ///////////////// 00053 // End Of File // 00054 /////////////////
1.3-rc3