#ifndef TTableRow_hxx_seen #define TTableRow_hxx_seen #include "IDbiTableRow.hxx" #include "ICOMETLog.hxx" #include "IResultInputStream.hxx" namespace COMET { class ITableRow; class IResultInputStream; class IDbiTableRow; }; /// This is the base class for all table rows class COMET::ITableRow : public IDbiTableRow { public: ITableRow(); ITableRow(const ITableRow& from); virtual ~ITableRow(); virtual IDbiTableRow* CreateTableRow() const { return this->MakeTableRow();} virtual void Fill(IDbiInRowStream& rs, const IDbiValidityRec* vrec) { IResultInputStream ris(rs); this->Fill(ris); } virtual void Fill(COMET::IResultInputStream& ris) { COMETError("Calling base class COMET::ITableRow::Fill method - this should be redefined in subclass"); } virtual ITableRow* MakeTableRow() const =0; /// Return class name but strip off leading "COMET::T" const char* GetName() const { const char* name = TObject::GetName(); if ( strncmp("COMET::",name,4) == 0 ) name += 4; if ( strncmp("T", name,1) == 0 ) name += 1; return name; } private: ClassDef(ITableRow,1) }; #endif