TDbiConfigSet.hxx
Go to the documentation of this file.00001 #ifndef DBICONFIGSET_H
00002 #define DBICONFIGSET_H
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #include <string>
00024 using std::string;
00025
00026 #include <vector>
00027 using std::vector;
00028
00029 #include "TDbiResultSetHandle.hxx"
00030 #include "TDbiWriter.hxx"
00031
00032 #include "TDbiTableRow.hxx"
00033 #include "TDbiFieldType.hxx"
00034 #include <iosfwd>
00035
00036
00037 class TDbiConfigSet;
00038 class TDbiValidityRec;
00039
00040
00041 std::ostream& operator<<(std::ostream& s, const TDbiConfigSet& cfSet);
00042
00043
00044 class TDbiConfigSet : public TDbiTableRow
00045 {
00046
00047 public:
00048
00049
00050 virtual ~TDbiConfigSet();
00051
00052
00053
00054 virtual TDbiTableRow* CreateTableRow() const {
00055 return new TDbiConfigSet; }
00056 Int_t GetAggregateNo() const { return fAggregateNo; }
00057 UInt_t GetNumParams() const { return fParams.size(); }
00058 string GetParamName(UInt_t parNo) const;
00059 TDbiFieldType GetParamType(UInt_t parNo) const;
00060 string GetParamValue(UInt_t parNo) const;
00061
00062
00063 void Clear(const Option_t* = "") { fParams.clear(); }
00064 void PushBack(const string& name,
00065 const string& value,
00066 const TDbiFieldType& type);
00067 void SetAggregateNo(Int_t aggNo) { fAggregateNo = aggNo; }
00068
00069
00070 virtual void Fill(TDbiInRowStream& rs,
00071 const TDbiValidityRec* vrec);
00072 virtual void Store(TDbiOutRowStream& ors,
00073 const TDbiValidityRec* vrec) const;
00074
00075 private:
00076
00077
00078
00079
00080
00081 struct Param {
00082 Param() { }
00083 Param(const Param& that) {
00084 *this = that;}
00085 Param(const string& name,
00086 const string& value,
00087 const TDbiFieldType& type) : Name(name), Value(value), Type(type) {
00088 }
00089 ~Param() { }
00090
00091 string Name;
00092 string Value;
00093 TDbiFieldType Type;
00094 };
00095
00096
00097
00098
00099 vector<Param*> fParams;
00100
00101
00102
00103
00104 Int_t fAggregateNo;
00105
00106 ClassDef(TDbiConfigSet,0)
00107
00108 };
00109
00110
00111 #endif // DBICONFIGSET_H
00112