| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

DbiDemoData3.h

Go to the documentation of this file.
00001 // $Id: DbiDemoData3.h,v 1.17 2005/10/18 12:17:27 west Exp $
00002 
00003 #ifndef DBIDEMODATA3_H
00004 #define DBIDEMODATA3_H
00005 
00007 // DbiDemoData3                                                       //
00008 //                                                                    //
00009 // Package: Dbi (Database Interface).                                 //
00010 //                                                                    //
00011 // Concept:  A concrete data type corresponding to a single row in a  //
00012 //          database table of non-aggregated data with string data.   //
00013 //                                                                    //
00014 // Purpose: The class is used to test the Data Transmission Fidelity  //
00015 //           (DTF) within and between databases.                      //
00016 //                                                                    //
00017 // N. West  02/2001                                                   //
00019 
00020 #include <string>
00021 using std::string;
00022 
00023 #include "TObject.h"   
00024 #include "Rtypes.h"
00025 
00026 #include "Conventions/Site.h"
00027 #include "Conventions/SimFlag.h"
00028 #include "DatabaseInterface/DbiTableRow.h"
00029 #include "Context/Context.h"
00030 #include "Context/ContextRange.h"
00031 #include "Context/TimeStamp.h"
00032 
00033 class DbiValidityRec;
00034 
00035 class DbiDemoData3 : public DbiTableRow
00036 {
00037 
00038 public:
00039 
00040 //  using TObject::Compare;  //Prevent hiding of TObject Compare
00041 
00042 // Constructors and destructors.
00043   DbiDemoData3();
00044   virtual ~DbiDemoData3(){  };
00045 
00046 // State testing member functions
00047     Bool_t Compare(const DbiDemoData3* that, Bool_t printDiff = true) const;
00048  
00049   virtual DbiTableRow* CreateTableRow() const { 
00050                                               return new DbiDemoData3; }
00051 
00052 
00053 
00054 // State changing member functions
00055   virtual void Fill(DbiResultSet& rs,
00056                     const DbiValidityRec* vrec);
00057   void JunkFill();
00058   virtual void Store(DbiOutRowStream& ors,
00059                      const DbiValidityRec* vrec) const;
00060 
00061 //  Static functions
00062 
00063 static string GetTableDescr(const char* alternateName = 0);
00064 
00065 // Getters that support Data Transmission Fidelity tests.
00066 static UInt_t GetSeqNoDTF() { return 999999990; }
00067 static Context GetContextDTF() { 
00068           return Context(Site::kFar,
00069                             SimFlag::kData,
00070                             TimeStamp(2005,9,27,0,0,0));
00071 }
00072 static ContextRange GetRangeDTF() { 
00073        Context context = DbiDemoData3::GetContextDTF();
00074        TimeStamp tsStart = context.GetTimeStamp();
00075        TimeStamp tsEnd(tsStart.GetSec() + 24*60*60);
00076        return ContextRange(context.GetSite(),
00077                        context.GetSimFlag(),
00078                        tsStart,
00079                        tsEnd
00080                        );
00081                        
00082 }
00083 
00084 private:  
00085 // Constructors and destructors.
00086   DbiDemoData3(const DbiDemoData3& from)
00087     : DbiTableRow(from) {  *this = from; }
00088 
00089 // Data members.  If modifying this set also update:-
00090 //    
00091 //   1)  prepare_db_1.sql:  Line: insert into DbiDemoData3 values(...
00092 //    
00093 //   2)  DbiDemoData3.cxx functions:- 
00094 //          Ctor
00095 //          Bool_t Compare(...)
00096 //          string GetTableDescr(...)
00097 //          void Fill(...)
00098 //          void Store(...)
00099 //          void JunkFill()
00100 
00101 //  If only change values, then update prepare_db_1.sql and ctor.
00102 
00103     Bool_t   fBool_1;
00104     Bool_t   fBool_2;
00105     Char_t   fChar;
00106     string   fString;
00107     string   fChars;
00108     string   fChars2;
00109     Short_t  fSS_Tiny_1;
00110     Short_t  fSS_Tiny_2;
00111     Short_t  fSS_Tiny_3;
00112     Short_t  fSS_Tiny_4;
00113     UShort_t fUU_Tiny_1;
00114     UShort_t fUU_Tiny_2;
00115     UShort_t fUU_Tiny_3;
00116     UShort_t fUU_Tiny_4;
00117     UShort_t fUS_Tiny_1;
00118     UShort_t fUS_Tiny_2;
00119     UShort_t fUS_Tiny_3;
00120     UShort_t fUS_Tiny_4;
00121     UShort_t fSS_Short_1;
00122     UShort_t fSS_Short_2;
00123     UShort_t fSS_Short_3;
00124     UShort_t fSS_Short_4;
00125     UShort_t fUU_Short_1;
00126     UShort_t fUU_Short_2;
00127     UShort_t fUU_Short_3;
00128     UShort_t fUU_Short_4;
00129     UShort_t fUS_Short_1;
00130     UShort_t fUS_Short_2;
00131     UShort_t fUS_Short_3;
00132     UShort_t fUS_Short_4;
00133     Int_t    fSS_Int_1;
00134     Int_t    fSS_Int_2;
00135     Int_t    fSS_Int_3;
00136     Int_t    fSS_Int_4;
00137     UInt_t   fUS_Int_1;
00138     UInt_t   fUS_Int_2;
00139     UInt_t   fUS_Int_3;
00140     UInt_t   fUS_Int_4;
00141     Float_t  fFloat_1;
00142     Float_t  fFloat_2;
00143     Double_t fDouble_1;
00144     Double_t fDouble_2;
00145    
00146 // Removed: ClassDef(DbiDemoData3,0)    // Example of non-aggregated datadata type. 
00147 
00148 };
00149 
00150 
00151 #endif  // DBIDEMODATA3_H
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Mon Apr 11 20:17:02 2011 for DbiTest by doxygen 1.4.7