![]() |
|
|
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 /BdbCond/BdbCondHistoryRecord.ddl
Go to the documentation of this file.00001 //----------------------------------------------------------------------------- 00002 // 00003 // File and Version Information: 00004 // $Id: BdbCondHistoryRecord.ddl,v 1.5 2000/08/11 00:55:15 gapon Exp $ 00005 // 00006 // Description: 00007 // Class BdbCondHistoryRecord. 00008 // This is a base class is ment to describe a "significant" 00009 // operation which modified the contents of an interval container. 00010 // 00011 // No objects of this class can be constructed directly. 00012 // 00013 // Environment: 00014 // Software developed for the BaBar Detector at the SLAC B-Factory. 00015 // 00016 // Author List: 00017 // Igor A. Gaponenko Original Author 00018 // 00019 // Copyright Information: 00020 // Copyright (C) 1999 Lawrence Berkeley National Laboratory 00021 // 00022 //----------------------------------------------------------------------------- 00023 00024 #ifndef BDBCONDHISTORYRECORD_HH 00025 #define BDBCONDHISTORYRECORD_HH 00026 00027 // ------------------- 00028 // Database Headers -- 00029 // ------------------- 00030 00031 #include "BdbUtil/Bdb.hh" 00032 00033 // ----------------------------------- 00034 // Collaborating Class Declarations -- 00035 // ----------------------------------- 00036 00037 #include "BdbTime/BdbTime.hh" 00038 00039 class BdbCondTHistoryRecord; 00040 00041 // ------------------ 00042 // Class Interface -- 00043 // ------------------ 00044 00045 class BdbCondHistoryRecord : public BdbPersObj { 00046 00047 protected: 00048 00049 // Constructors 00050 00051 BdbCondHistoryRecord( ); 00052 00053 BdbCondHistoryRecord( d_ULong theOperation, 00054 const char* theCode ); 00055 00056 public: 00057 00058 // Destructor 00059 00060 virtual ~BdbCondHistoryRecord( ); 00061 00062 // Accessors (const) 00063 00064 inline d_ULong operation( ) const; 00065 inline const char* code( ) const; 00066 00067 inline const BdbTime& time( ) const; 00068 inline const char* site( ) const; 00069 inline const char* host( ) const; 00070 inline const char* user( ) const; 00071 00072 // Operations 00073 00074 virtual ostream& print( ostream& os ); 00075 00076 /** This conversion method is meant to construct a transient representation 00077 ** for the corresponding persistent rectord. 00078 ** The method has to be implemented by subclasses. 00079 ** The actuall type of the returnned object can be a subclass of the one 00080 ** mentioned here. 00081 **/ 00082 00083 virtual BdbCondTHistoryRecord* transient( ) const = 0; 00084 00085 private: 00086 00087 // Data members which are initialized through the constructor. 00088 00089 d_ULong _operation; // This is operation's code. 00090 d_String _code; // Version of the code. 00091 00092 // The following data members are constructed by this class itself. 00093 00094 BdbTime _time; // The time when the operation was performed. 00095 d_String _site; // Site name. 00096 d_String _host; // Host name 00097 d_String _user; // User name 00098 }; 00099 00100 // ----------------- 00101 // Inline methods -- 00102 // ----------------- 00103 00104 inline d_ULong 00105 BdbCondHistoryRecord::operation( ) const 00106 { 00107 return _operation; 00108 } 00109 00110 inline const char* 00111 BdbCondHistoryRecord::code( ) const 00112 { 00113 return _code.head( ); 00114 } 00115 00116 inline const 00117 BdbTime& BdbCondHistoryRecord::time( ) const 00118 { 00119 return _time; 00120 } 00121 00122 inline const char* 00123 BdbCondHistoryRecord::site( ) const 00124 { 00125 return _site.head( ); 00126 } 00127 00128 inline const char* 00129 BdbCondHistoryRecord::host( ) const 00130 { 00131 return _host.head( ); 00132 } 00133 00134 inline const char* 00135 BdbCondHistoryRecord::user( ) const 00136 { 00137 return _user.head( ); 00138 } 00139 00140 #endif /* BDBCONDHISTORYRECORD_HH */
BaBar Public Site | SLAC | News | Links | Who's Who | Contact Us
Page Owner: Jacek Becla
Last Update: October 04, 2002