00001 #ifndef CDBBDB_PROXY_ELEMENT_HH 00002 #define CDBBDB_PROXY_ELEMENT_HH 00003 00004 // File and Version Information: 00005 // $Id: CdbBdbProxyElement.hh,v 1.2 2002/09/23 22:39:10 gapon Exp $ 00006 00007 #include "CdbBase/CdbCommon.hh" 00008 00009 #include "BdbTime/BdbTime.hh" 00010 #include "BdbTime/BdbIntervalBase.hh" 00011 00012 #include "BdbCond/BdbObject.hh" 00013 00014 #include <string> 00015 00016 /// An element of the proxy cache 00017 /** 00018 * Objects of this class are meant to pass the information about 00019 * updated cache elments to cleints 00020 */ 00021 class CdbBdbProxyElement { 00022 00023 public: 00024 00025 // Constructors 00026 00027 CdbBdbProxyElement( ); 00028 00029 CdbBdbProxyElement( const std::string& theName, 00030 const BdbRef(BdbObject)& theRef, 00031 const BdbIntervalBase& theValidity, 00032 bool updatedFlag ); 00033 00034 CdbBdbProxyElement( const CdbBdbProxyElement& theElement ); 00035 00036 // Destructor 00037 00038 ~CdbBdbProxyElement( ); 00039 00040 // Assignment operator 00041 00042 CdbBdbProxyElement& operator=( const CdbBdbProxyElement& theElement ); 00043 00044 // Accessors 00045 00046 inline std::string name( ) const; 00047 00048 inline BdbIntervalBase validity ( ) const; 00049 inline BdbRef(BdbObject) objectRef( ) const; 00050 00051 inline bool updated( ) const; 00052 00053 /// Get the short condition name only 00054 /** 00055 * This method will extract the condition name from the path. 00056 */ 00057 std::string shortName( ) const; 00058 00059 private: 00060 00061 std::string _name; 00062 00063 BdbIntervalBase _validity; 00064 BdbRef(BdbObject) _objectRef; 00065 00066 bool _updated; 00067 }; 00068 00069 // Implementation for inline methods 00070 00071 inline 00072 std::string 00073 CdbBdbProxyElement::name( ) const 00074 { 00075 return _name; 00076 } 00077 00078 inline 00079 BdbIntervalBase 00080 CdbBdbProxyElement::validity( ) const 00081 { 00082 return _validity; 00083 } 00084 00085 inline 00086 BdbRef(BdbObject) 00087 CdbBdbProxyElement::objectRef( ) const 00088 { 00089 return _objectRef; 00090 } 00091 00092 inline 00093 bool 00094 CdbBdbProxyElement::updated( ) const 00095 { 00096 return _updated; 00097 } 00098 00099 #endif // CDBBDB_PROXY_ELEMENT_HH
1.3-rc3