Basic element class. More...
#include <Element.h>
Public Member Functions | |
Element (char *name, int number, FILE_POS_TYPE filePosition=0) | |
Initialise the element. | |
void | assignPosition (FILE_POS_TYPE position) |
Assign the position of the element in the stats file. | |
FILE_POS_TYPE | filePosition (void) |
Return the file position of the element in the stats file. | |
char * | name (void) |
Return the element name. | |
int | number (void) |
Return the element number. | |
bool | operator< (const Element &word) const |
Less than operator to compare element inequality. | |
bool | operator== (const Element &word) const |
Equals operator to compare element equality. | |
void | operator= (const Element &word) |
Assignment operator to copy elements. | |
void | purge (FileIO *file) |
Save the element in the given file. | |
void | salvage (FileIO *file) |
Read the element from the given file. | |
void | hashNumber (int number) |
int | hashNumber (void) |
Protected Attributes | |
int | _number |
Friends | |
class | OrderElements |
Basic element class.
This class is used to record a unique element from the documents being indexed. The Element class records various statistics about the unique element.