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

InvFPDocList Class Reference

#include <InvFPDocList.hpp>

Inheritance diagram for InvFPDocList:

DocInfoList List of all members.

Public Methods

 InvFPDocList ()
 InvFPDocList (int id,int len)
 constructor for this list using malloc for its own memory usage of InvFPDocList without MemCache has not been tested.

 InvFPDocList (MemCache *mc,int id,int len)
 constructors for this list getting memory from a MemCache.

 InvFPDocList (MemCache *mc,int id,int len,int docid,int location)
 InvFPDocList (int id,int listlen,int *list,int fr,int *ldocid,int len)
 constructor for a list not needing to get any memory.

 ~InvFPDocList ()
void setList (int id,int listlen,int *list,int fr,int *ldocid=NULL,int len=0)
 this is meant for use with the empty constructor this allows the DocList values to be set. however it doesn't guarantee that the outsider will be able to set everything properly. thus, when this method is used, the object becomes READ_ONLY such that methods which attempt to append the contents of the list will not be able to
See also:
setListSafe.


void setListSafe (int id,int listlen,int *list,int fr,int *ldocid,int len)
 same as the setList above. however the READ_ONLY flag will not get set. this method should be used only if you really know what you're doing.

void reset ()
 reset the list such that it points to nothing. doesn't free the memory be careful when using this to avoid memory leaks. if you are not managing memory, you should probably use resetFree()
See also:
resetFree.


void resetFree ()
 reset the list and free the memory being used for it
See also:
reset.


bool allocMem ()
bool hasNoMem ()
bool addLocation (int docid,LOC_T location)
void startIteration ()
 prepare iteration.

bool hasMore ()
 test if there's any entry.

DocInfonextEntry ()
 fetch the next entry, return a pointer to a local static memory, so do not delete it.

void nextEntry (InvFPDocInfo *info)
DOCID_T curDocID ()
int docFreq ()
int length ()
int termID ()
int termLen ()
int curDocIDdiff ()
int curDocIDtf ()
void binWrite (ofstream &of)
 write this object in binary to the given filestream. the stream should support binary writing.

bool binRead (ifstream &inf)
 read an object from the given stream into memory. the stream should be pointing to the correct place, starting exactly where binWrite began writing. this method should be used with the empty constructor, else watch out for mem leaks. returns whether the read was successful.


Constructor & Destructor Documentation

InvFPDocList::InvFPDocList ( )
 

InvFPDocList::InvFPDocList ( int id,
int len )
 

constructor for this list using malloc for its own memory usage of InvFPDocList without MemCache has not been tested.

InvFPDocList::InvFPDocList ( MemCache * mc,
int id,
int len )
 

constructors for this list getting memory from a MemCache.

InvFPDocList::InvFPDocList ( MemCache * mc,
int id,
int len,
int docid,
int location )
 

InvFPDocList::InvFPDocList ( int id,
int listlen,
int * list,
int fr,
int * ldocid,
int len )
 

constructor for a list not needing to get any memory.

InvFPDocList::~InvFPDocList ( )
 


Member Function Documentation

bool InvFPDocList::addLocation ( int docid,
LOC_T location )
 

bool InvFPDocList::allocMem ( )
 

bool InvFPDocList::binRead ( ifstream & inf )
 

read an object from the given stream into memory. the stream should be pointing to the correct place, starting exactly where binWrite began writing. this method should be used with the empty constructor, else watch out for mem leaks. returns whether the read was successful.

void InvFPDocList::binWrite ( ofstream & of )
 

write this object in binary to the given filestream. the stream should support binary writing.

DOCID_T InvFPDocList::curDocID ( ) [inline]
 

int InvFPDocList::curDocIDdiff ( ) [inline]
 

int InvFPDocList::curDocIDtf ( ) [inline]
 

int InvFPDocList::docFreq ( ) [inline]
 

bool InvFPDocList::hasMore ( ) [virtual]
 

test if there's any entry.

Reimplemented from DocInfoList.

bool InvFPDocList::hasNoMem ( )
 

int InvFPDocList::length ( ) [inline]
 

void InvFPDocList::nextEntry ( InvFPDocInfo * info )
 

DocInfo * InvFPDocList::nextEntry ( ) [virtual]
 

fetch the next entry, return a pointer to a local static memory, so do not delete it.

Reimplemented from DocInfoList.

void InvFPDocList::reset ( )
 

reset the list such that it points to nothing. doesn't free the memory be careful when using this to avoid memory leaks. if you are not managing memory, you should probably use resetFree()

See also:
resetFree.

void InvFPDocList::resetFree ( )
 

reset the list and free the memory being used for it

See also:
reset.

void InvFPDocList::setList ( int id,
int listlen,
int * list,
int fr,
int * ldocid = NULL,
int len = 0 )
 

this is meant for use with the empty constructor this allows the DocList values to be set. however it doesn't guarantee that the outsider will be able to set everything properly. thus, when this method is used, the object becomes READ_ONLY such that methods which attempt to append the contents of the list will not be able to

See also:
setListSafe.

void InvFPDocList::setListSafe ( int id,
int listlen,
int * list,
int fr,
int * ldocid,
int len )
 

same as the setList above. however the READ_ONLY flag will not get set. this method should be used only if you really know what you're doing.

void InvFPDocList::startIteration ( ) [virtual]
 

prepare iteration.

Reimplemented from DocInfoList.

int InvFPDocList::termID ( ) [inline]
 

int InvFPDocList::termLen ( ) [inline]
 


The documentation for this class was generated from the following files:
Generated at Fri Jul 26 18:22:50 2002 for LEMUR by doxygen1.2.4 written by Dimitri van Heesch, © 1997-2000