Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

BufferedTransactionReader.hpp

Go to the documentation of this file.
00001 
00009 #ifndef BufferedTransactionReader_HPP
00010 #define BufferedTransactionReader_HPP
00011 
00012 #include "io/input/transaction_reader/TransactionReader.hpp"  
00013 
00014 // Base class for buffered TransactionReaders.
00015 template <class T_R = TransactionReader<> >
00016 class BufferedTransactionReader : public T_R
00017 {
00018    public:
00019       class params_t : public T_R::params_t
00020       {
00021          public:
00023             std::streamsize buffer_size;
00024             params_t()
00025             {
00026                buffer_size = 32 * 1024;
00027             }
00028       };
00029 
00030       BufferedTransactionReader( const params_t* par )
00031          : T_R( par), buffer_size(par->buffer_size)
00032       {
00033          buffer = new char[buffer_size];
00034       }
00035 
00037       ~BufferedTransactionReader()
00038       {
00039          delete[] buffer;
00040       }
00041 
00042    protected:
00044       std::streamsize buffer_size;
00046       char* buffer;
00047 };
00048 
00049 
00050 #endif

Generated on Sun Sep 17 17:50:37 2006 for FIM environment by  doxygen 1.4.4