00001 00010 #ifndef TransactionReader_HPP 00011 #define TransactionReader_HPP 00012 00013 #include "common.hpp" 00014 #include "io/FDRepr.hpp" 00015 #include <iostream> 00016 00017 00018 template <class FR = FDRepr> 00019 class TransactionReader : public FR 00020 { 00021 public: 00022 class params_t : public FR::params_t 00023 { 00024 public: 00026 item_t largest_item; 00027 00028 params_t() : FR::params_t() 00029 { 00030 largest_item = 0; 00031 } 00032 }; 00033 00038 TransactionReader( const params_t* par ) 00039 throw(std::ios_base::failure) : 00040 FR(par), largest_item(par->largest_item){} 00041 00069 template <class BIS> counter_t nextTransactionBIS( BIS& transaction ) 00070 { 00071 std::cerr<<"Error: using function nextTransactionBIS"<<std::endl; 00072 return 0; 00073 } 00074 00100 template <class UAC> counter_t nextTransactionUAC( UAC& transaction ) 00101 { 00102 std::cerr<<"Error: using function nextTransactionUAC"<<std::endl; 00103 return 0; 00104 } 00105 00106 00113 void setLargestItem(item_t largest_item) 00114 {this->largest_item = largest_item;} 00115 00123 item_t getLargestItem() const 00124 {return largest_item;} 00125 00126 protected: 00127 item_t largest_item; 00128 }; 00129 00130 #endif