Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

DbiConfigStream.h

Go to the documentation of this file.
00001 #ifndef DBICONFIGSTREAM_H
00002 #define DBICONFIGSTREAM_H
00003 
00023 #include <string>
00024 
00025 #include "DatabaseInterface/Dbi.h"
00026 #include "DatabaseInterface/DbiConfigSet.h"
00027 #include "DatabaseInterface/DbiResultPtr.h"
00028 #include "Registry/Registry.h"
00029 #include "Validity/VldContext.h"
00030 
00031 class DbiConfigStream;
00032 class DbiFieldType;
00033 class Registry;
00034 #include <iosfwd>
00035 
00036 ostream& operator<<(ostream& s, const DbiConfigStream& cfStream);
00037 
00038 class DbiConfigStream
00039 {
00040 
00041 
00042 public:
00043 
00044 static      VldContext fgDefaultContext;
00045 
00046 // Constructors and destructors.
00047            DbiConfigStream();
00048            DbiConfigStream(const std::string& SoftwName,
00049                            const std::string& ConfigName="default",
00050                            VldContext vc = DbiConfigStream::fgDefaultContext,
00051                            Dbi::Task task=0,
00052                            const std::string& tableName="SOFTWARE_CONFIGURATION");
00053   virtual ~DbiConfigStream();
00054 
00055 // State testing member functions
00056   const DbiConfigStream& operator>>(Registry* reg);
00057   const DbiConfigSet* GetConfigSet() const { return fCFSet; }
00058 
00059 // State changing member functions
00060 
00061   DbiConfigStream& operator<<(const Registry* reg);
00062                Bool_t IsEmpty() { return fCFSet == 0; }
00063       DbiValidityRec& GetValidityRec() { return fVRec; }
00064                Bool_t Write(UInt_t dbNo = 0,
00065                             const std::string& logComment = "",
00066                             Bool_t localTest = false);
00067 
00068 private:  
00069 
00070   DbiConfigStream(const DbiConfigStream&);  // Not implimented
00071 
00072 // Data members
00073 
00076   const DbiConfigSet* 
00077                  fCFSet;          
00078 
00080   DbiResultPtr<DbiConfigSet>
00081                  fCFSetTable;    
00082 
00084     DbiConfigSet fCFSetModified;
00085 
00087   DbiValidityRec fVRec;
00088 
00090   std::string    fConfigName;     
00091 
00093   std::string    fSoftwName;      
00094 
00095    ClassDef(DbiConfigStream,0)  // Input/output stream of configuration data
00096 
00097 };
00098 
00099 #endif  // DBICONFIGSTREAM_H

Generated on Mon Feb 15 11:06:34 2010 for loon by  doxygen 1.3.9.1