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

CdbBdbProxyElement.cc

Go to the documentation of this file.
00001 // File and Version Information:
00002 //      $Id: CdbBdbProxyElement.cc,v 1.4 2004/12/08 09:09:35 gapon Exp $
00003 
00004 /// The implementation of the CdbBdbProxyElement.
00005 /**
00006   * @see CdbBdbProxyElement
00007   */
00008 
00009 #include "BaBar/BaBar.hh"
00010 
00011 #include "CdbBdb/CdbBdbProxyElement.hh"
00012 #include "CdbBase/CdbPathName.hh"
00013 
00014 CdbBdbProxyElement::CdbBdbProxyElement( ) :
00015     _name(""),
00016     _validity( BdbTime::minusInfinity,
00017                BdbTime::plusInfinity ),
00018     _objectRef(0),
00019     _updated(false)
00020 { }
00021 
00022 CdbBdbProxyElement::CdbBdbProxyElement( const std::string&       theName,
00023                                         const BdbRef(BdbObject)& theRef,
00024                                         const BdbIntervalBase&   theValidity,
00025                                         bool                     updatedFlag ) :
00026     _name(theName),
00027     _validity(theValidity),
00028     _objectRef(theRef),
00029     _updated(updatedFlag)
00030 { }
00031 
00032 CdbBdbProxyElement::CdbBdbProxyElement( const CdbBdbProxyElement& theElement ) :
00033     _name(theElement._name),
00034     _validity(theElement._validity),
00035     _objectRef(theElement._objectRef),
00036     _updated(theElement._updated)
00037 { }
00038 
00039 CdbBdbProxyElement::~CdbBdbProxyElement( )
00040 { }
00041 
00042 CdbBdbProxyElement&
00043 CdbBdbProxyElement::operator=( const CdbBdbProxyElement& theElement )
00044 {
00045     if( &theElement != this ) {
00046         _name      = theElement._name;
00047         _validity  = theElement._validity;
00048         _objectRef = theElement._objectRef;
00049         _updated   = theElement._updated;
00050     }
00051     return *this;
00052 }
00053 
00054 std::string
00055 CdbBdbProxyElement::shortName( ) const
00056 {
00057   // We're not going to check if the original name has correct syntax. Just
00058   // assuming that it's.
00059 
00060     CdbPathName pName( _name.c_str( ));
00061 
00062   // NOTE: The following code will invoke an implicit convertor
00063   //       from the path object to the constant string pointer.
00064 
00065     return pName.last( ).toString( );
00066 }
00067 
00068 /////////////////
00069 // End Of File //
00070 /////////////////

Generated on Mon Dec 5 18:22:00 2005 for CDB by doxygen1.3-rc3