#ifndef TDBITABLEROW_H #define TDBITABLEROW_H ////////////////////////////////////////////////////////////////////////// //////////////////////////// ROOT API //////////////////////////// ////////////////////////////////////////////////////////////////////////// /** * * $Id: IDbiTableRow.hxx,v 1.2 2011/06/09 14:44:29 finch Exp $ * * \class COMET::IDbiTableRow * * * \brief * Concept Abstract interface to TableRow objects. Each database * table consists of a collection of TableRow objects. * * \brief * Purpose Provides a generic interface to TableRow objects permiting * much of the database machinery to be generic. * * \brief * Subclass COMET::obligations All subclasses must have public default * and constructors. * * \brief * Program Notes It inherits from TObject only so that it can get * the class name at execution time. * * Contact: A.Finch@lancaster.ac.uk * * */ #include "TObject.h" #include #include namespace COMET { class IDbiOutRowStream; class IDbiResultSet; class IDbiInRowStream; class IDbiTableProxy; class IDbiValidityRec; } namespace COMET { class IDbiTableRow : public TObject { public: // Constructors and destructors. IDbiTableRow(); IDbiTableRow(const IDbiTableRow& from); virtual ~IDbiTableRow(); // State testing member functions /// Replace this with a function returning true in order to use the level 2 disk cache. virtual Bool_t CanL2Cache() const { return kFALSE; } //virtual Bool_t CanL2Cache() const { return kTRUE; } //FOR TESTS virtual Int_t GetAggregateNo() const { return -1; } IDbiResultSet* GetOwner() const { return fOwner; } virtual IDbiTableRow* CreateTableRow() const =0; virtual UInt_t GetIndex(UInt_t defIndex) const {return defIndex;} // State modifying member functions void SetOwner(IDbiResultSet* owner) {fOwner = owner;} // I/O member functions virtual void Fill(IDbiInRowStream& rs, const IDbiValidityRec* vrec) =0; virtual void Store(IDbiOutRowStream& /* ors */, const IDbiValidityRec* /* vrec */) const { assert(0); } private: // Data members /// The owning IDbiResultSet, if any. IDbiResultSet * fOwner; ClassDef(IDbiTableRow,0) // IDbiTableRow for a specific database table. }; }; #endif // TDBITABLEROW_H