#include <BasicDocStream.hpp>
Inheritance diagram for BasicDocStream:
Public Methods | |
BasicDocStream () | |
BasicDocStream (const char *inputFile) | |
virtual | ~BasicDocStream () |
bool | hasMore () |
void | startDocIteration () |
start document iteration | |
Document * | nextDoc () |
return a pointer to next document (static memory, do not delete returned instance). hasMore() should be called before calling nextDoc() | |
Private Attributes | |
char | file [1024] |
ifstream * | ifs |
char | buf [2000] |
bool | nextTokenRead |
BasicTokenDoc | doc |
|
|
|
|
|
|
|
Implements DocStream. |
|
return a pointer to next document (static memory, do not delete returned instance). hasMore() should be called before calling nextDoc()
Implements DocStream. |
|
start document iteration Typical usage:
... myStream.startDocIteration(); Document *doc; while (myStream.nextDoc(doc)) { Term *term; doc->startTermIteration(); while (doc->nextTerm(term)) { ... process "term" ... YOU MUST NOT DELETE term, as it is a pointer to a local static memory } YOU MUST NOT DELETE doc, as it is a pointer to a local static memory } Implements DocStream. |
|
|
|
|
|
|
|
|
|
|