Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

lemur::file::FileMergeThread Class Reference

#include <SortMergeTextFiles.hpp>

Inheritance diagram for lemur::file::FileMergeThread:

indri::thread::UtilityThread List of all members.

Public Types

enum  { MAX_INPUT_FILES = 16, MAX_INPUT_LINESIZE = 65536 }

Public Member Functions

 FileMergeThread (std::vector< std::string > &inputFileList, const std::string &outputFile)
 ~FileMergeThread ()
virtual bool hasWork ()
virtual UINT64 work ()
virtual UINT64 initialize ()
virtual void deinitialize ()
int getRecordCounter ()
bool isThreadActive ()

Private Member Functions

int chooseNextBuffer ()

Private Attributes

FILE * inputFile [MAX_INPUT_FILES]
std::ofstream outfile
std::string filePath [MAX_INPUT_FILES]
std::string outputFilePath
char _buffer [MAX_INPUT_FILES][MAX_INPUT_LINESIZE]
bool fileDone [MAX_INPUT_FILES]
char _outputBuffer [2 *1024 *1024]
int numInputFiles
int recordCounter
bool isActive

Detailed Description

thread for merging two sorted files into one


Member Enumeration Documentation

anonymous enum
 

Enumeration values:
MAX_INPUT_FILES 
MAX_INPUT_LINESIZE 


Constructor & Destructor Documentation

lemur::file::FileMergeThread::FileMergeThread std::vector< std::string > &  inputFileList,
const std::string &  outputFile
 

lemur::file::FileMergeThread::~FileMergeThread  )  [inline]
 


Member Function Documentation

int lemur::file::FileMergeThread::chooseNextBuffer  )  [private]
 

void lemur::file::FileMergeThread::deinitialize  )  [virtual]
 

Implements indri::thread::UtilityThread.

int lemur::file::FileMergeThread::getRecordCounter  )  [inline]
 

virtual bool lemur::file::FileMergeThread::hasWork  )  [inline, virtual]
 

Implements indri::thread::UtilityThread.

UINT64 lemur::file::FileMergeThread::initialize  )  [virtual]
 

Implements indri::thread::UtilityThread.

bool lemur::file::FileMergeThread::isThreadActive  )  [inline]
 

UINT64 lemur::file::FileMergeThread::work  )  [virtual]
 

Implements indri::thread::UtilityThread.


Member Data Documentation

char lemur::file::FileMergeThread::_buffer[MAX_INPUT_FILES][MAX_INPUT_LINESIZE] [private]
 

char lemur::file::FileMergeThread::_outputBuffer[2*1024*1024] [private]
 

bool lemur::file::FileMergeThread::fileDone[MAX_INPUT_FILES] [private]
 

std::string lemur::file::FileMergeThread::filePath[MAX_INPUT_FILES] [private]
 

FILE* lemur::file::FileMergeThread::inputFile[MAX_INPUT_FILES] [private]
 

bool lemur::file::FileMergeThread::isActive [private]
 

int lemur::file::FileMergeThread::numInputFiles [private]
 

std::ofstream lemur::file::FileMergeThread::outfile [private]
 

std::string lemur::file::FileMergeThread::outputFilePath [private]
 

int lemur::file::FileMergeThread::recordCounter [private]
 


The documentation for this class was generated from the following files:
Generated on Tue Jun 15 11:03:05 2010 for Lemur by doxygen 1.3.4