#include <RecordReader.hpp>
Public Member Functions | |
RecordReader () | |
virtual | ~RecordReader () |
virtual void | close ()=0 |
virtual bool | next (Record< Value > &record)=0 |
virtual void | open (const bfs::path &path)=0 |
An abstract class which represents a record reader. A record reader is used by the index as a source of records to be indexed.
Created on Jun 22, 2008
Definition at line 25 of file RecordReader.hpp.
aitools::invertedindex::RecordReader< Value >::RecordReader | ( | ) | [inline] |
The default constructor.
Definition at line 32 of file RecordReader.hpp.
virtual aitools::invertedindex::RecordReader< Value >::~RecordReader | ( | ) | [inline, virtual] |
The destructor.
Definition at line 37 of file RecordReader.hpp.
virtual void aitools::invertedindex::RecordReader< Value >::close | ( | ) | [pure virtual] |
Closes the file currently associated with the object.
Implemented in aitools::invertedindex::InvertedFileReader< Value >, and aitools::invertedindex::NGramFileReader.
virtual bool aitools::invertedindex::RecordReader< Value >::next | ( | Record< Value > & | record | ) | [pure virtual] |
Extracts the next record by resetting the content of the given record.
record | A record to fill with new content. |
Implemented in aitools::invertedindex::InvertedFileReader< Value >, and aitools::invertedindex::NGramFileReader.
virtual void aitools::invertedindex::RecordReader< Value >::open | ( | const bfs::path & | path | ) | [pure virtual] |
Opens a file and initializes the reader to extract records. Invoking this method on an already opened file is illegal.
path | The path of the file to be opened. |
Implemented in aitools::invertedindex::InvertedFileReader< Value >, and aitools::invertedindex::NGramFileReader.