TDbiResultSetNonAgg.hxx

Go to the documentation of this file.
00001 #ifndef DBIRESULTNONAGG_H
00002 #define DBIRESULTNONAGG_H
00003 
00004 /**
00005  *
00006  *
00007  * \class TDbiResultSetNonAgg
00008  *
00009  *
00010  * \brief 
00011  * <b>Concept</b>  ResultNonAgg is a concrete sub-class of TDbiResultSet
00012  *   that represents a single database query for a non-aggregated table.
00013  *
00014  * <b>Purpose</b> See TDbiResultSet.
00015  *
00016  * Contact: A.Finch@lancaster.ac.uk
00017  *
00018  *
00019  */
00020 
00021 #if !defined(__CINT__) || defined(__MAKECINT__)
00022 #include "Rtypes.h"
00023 #endif
00024 #include <string>
00025 using std::string;
00026 #include <vector>
00027 using std::vector;
00028 
00029 #include "TDbiResultSet.hxx"
00030 
00031 class TDbiBinaryFile;
00032 class TDbiInRowStream;
00033 class TDbiTableRow;
00034 
00035 class TDbiResultSetNonAgg : public TDbiResultSet
00036 
00037 {
00038 
00039 public:
00040 
00041 // Only some Satisfies methods are overriden so include base class ones.
00042 using TDbiResultSet::Satisfies;
00043 
00044 
00045 // Constructors and destructors.
00046            TDbiResultSetNonAgg(TDbiInRowStream* resultSet = 0,
00047                            const TDbiTableRow* tableRow = 0,
00048                            const TDbiValidityRec* vrec = 0,
00049                            Bool_t dropSeqNo = kTRUE,
00050                            const string& sqlQualifiers = "");
00051   virtual ~TDbiResultSetNonAgg();
00052 
00053 
00054 // State testing member functions
00055 
00056  virtual  TDbiResultKey* CreateKey() const;
00057  virtual                UInt_t GetNumAggregates() const { return 1; }
00058  virtual                UInt_t GetNumRows() const {
00059                                                   return fRows.size(); }
00060  virtual    const TDbiTableRow* GetTableRow(UInt_t rowNum) const;
00061  virtual    const TDbiTableRow* GetTableRowByIndex(UInt_t index) const;
00062 
00063 //  State changing member functions.
00064 
00065  virtual Bool_t Owns(const TDbiTableRow* row ) const;
00066          Bool_t Satisfies(const TDbiValidityRec& vrec,
00067                           const string& sqlQualifiers = "");
00068  virtual void   Streamer(TDbiBinaryFile& file);
00069 
00070 private:
00071 
00072     void DebugCtor() const;
00073 
00074 // Data members
00075 
00076 /// Set of table rows eqv. to ResultSet
00077   std::vector<TDbiTableRow*> fRows;
00078 
00079 /// Not null only if table rows read from BinaryFile.
00080  char* fBuffer;
00081 
00082 ClassDef(TDbiResultSetNonAgg,0)     //Example non-aggregated data.
00083 
00084 };
00085 
00086 
00087 #endif  // DBIRESULTNONAGG_H
00088 

Generated on 11 Aug 2013 for SKDatabase by  doxygen 1.6.1