#ifndef DBIVALRECSET #define DBIVALRECSET /** * * $Id: IDbiValRecSet.hxx,v 1.1 2011/01/18 05:49:20 finch Exp $ * * \class COMET::IDbiValRecSet * * * \brief * Concept A set of TDbiValidityRecs * * \brief * Purpose Provides a sequential access mechanism for an entire * table via its auxillary Validity Range table * * Contact: A.Finch@lancaster.ac.uk * * */ #include #include namespace COMET { class IDbiResultSet; class IDbiValidityRec; } namespace COMET { class IDbiValRecSet { public: // Constructors and destructors. IDbiValRecSet(const std::string& tableName,UInt_t dbNo,UInt_t seqNo=0); virtual ~IDbiValRecSet(); // State testing member functions UInt_t GetDbNo() const { return fDbNo; } UInt_t GetNumRows() const; const std::string GetTableName() const; const IDbiValidityRec* GetTableRow(UInt_t rowNum) const; const IDbiValidityRec* GetTableRowBySeqNo(UInt_t seqNo) const; // State changing member functions private: // Data members //// Database number used to fill UInt_t fDbNo; /// Result holding table of IDbiValidityRec IDbiResultSet* fResult; /// Lookup SeqNo -> IDbiValidityRec /// lazy creation - see GetTableRowBySeqNo mutable std::mapfSeqNoToRec; ClassDef(IDbiValRecSet,0) // A set of TDbiValidityRecs }; }; #endif // DBIVALRECSET