00001 #ifndef TTableRow_hxx_seen 00002 #define TTableRow_hxx_seen 00003 00004 #include "TDbiTableRow.hxx" 00005 #include "TSK_DBI_Log.hxx" 00006 #include "TResultInputStream.hxx" 00007 00008 00009 class TTableRow; 00010 class TResultInputStream; 00011 class TDbiTableRow; 00012 00013 00014 /// This is the base class for all table rows 00015 00016 class TTableRow : public TDbiTableRow { 00017 00018 00019 public: 00020 00021 TTableRow(); 00022 TTableRow(const TTableRow& from); 00023 virtual ~TTableRow(); 00024 00025 virtual TDbiTableRow* CreateTableRow() const { return this->MakeTableRow();} 00026 00027 virtual void Fill(TDbiInRowStream& rs, const TDbiValidityRec* vrec) { 00028 TResultInputStream ris(rs); 00029 this->Fill(ris); 00030 } 00031 virtual void Fill(TResultInputStream& ris) { 00032 SK_DBI_Error("Calling base class TTableRow::Fill method - this should be redefined in subclass"); 00033 00034 } 00035 virtual TTableRow* MakeTableRow() const =0; 00036 00037 /// Return class name but strip off leading "T" 00038 const char* GetName() const { 00039 const char* name = TObject::GetName(); 00040 if ( strncmp("",name,4) == 0 ) name += 4; 00041 if ( strncmp("T", name,1) == 0 ) name += 1; 00042 return name; 00043 } 00044 00045 00046 private: 00047 ClassDef(TTableRow,1) 00048 00049 }; 00050 00051 #endif