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

CDatabaseIndex Class Reference

#include <Database.h>

List of all members.

Public Member Functions

 CDatabaseIndex (const char *dbiFilename)
 ~CDatabaseIndex (void)
int GetNumItems (void)
Tag GetKeyId (void)
char GetKeyType (void)
unsigned long GetKeyLength (void)
unsigned long Search (const char *key)
unsigned long Search (double key)
unsigned long Search (long key)
unsigned long SearchNext (void)
void Dump (FILE *f)

Protected Member Functions

void Load (PODFILE *f)
void Load (const char *dbiFilename)

Protected Attributes

Tag keyId
unsigned char keyType
unsigned long keyLength
std::multimap< std::string,
unsigned long > * 
stringIndex
std::multimap< double, unsigned
long > * 
doubleIndex
std::multimap< long, unsigned
long > * 
intIndex
std::pair< StringIndex::iterator,
StringIndex::iterator > 
stringRange
std::pair< DoubleIndex::iterator,
DoubleIndex::iterator > 
doubleRange
std::pair< IntIndex::iterator,
IntIndex::iterator > 
intRange
StringIndex::iterator stringIter
DoubleIndex::iterator doubleIter
IntIndex::iterator intIter


Detailed Description

Definition at line 133 of file Database.h.


Constructor & Destructor Documentation

CDatabaseIndex::CDatabaseIndex const char *  dbiFilename  ) 
 

Definition at line 54 of file DBIndex.cpp.

References doubleIndex, intIndex, keyId, keyLength, keyType, Load(), and stringIndex.

CDatabaseIndex::~CDatabaseIndex void   ) 
 

Definition at line 67 of file DBIndex.cpp.

References doubleIndex, intIndex, and stringIndex.


Member Function Documentation

void CDatabaseIndex::Dump FILE *  f  ) 
 

Definition at line 313 of file DBIndex.cpp.

Tag CDatabaseIndex::GetKeyId void   ) 
 

Definition at line 219 of file DBIndex.cpp.

References keyId.

unsigned long CDatabaseIndex::GetKeyLength void   ) 
 

Definition at line 235 of file DBIndex.cpp.

References keyLength.

char CDatabaseIndex::GetKeyType void   ) 
 

Definition at line 227 of file DBIndex.cpp.

References keyType.

int CDatabaseIndex::GetNumItems void   ) 
 

Definition at line 201 of file DBIndex.cpp.

References doubleIndex, intIndex, and stringIndex.

void CDatabaseIndex::Load const char *  dbiFilename  )  [protected]
 

Definition at line 184 of file DBIndex.cpp.

References globals, Load(), pclose(), SGlobals::pfs, and popen().

void CDatabaseIndex::Load PODFILE f  )  [protected]
 

Definition at line 77 of file DBIndex.cpp.

References DBIHeader::checksum, doubleIndex, DBIHeader::dummy, intIndex, DBIHeader::keyId, keyId, keyLength, DBIHeader::keyLength, keyType, DBIHeader::keyType, DBIHeader::nRecords, pread(), ReadDouble(), ReadLong(), ReadUChar(), ReadULong(), DBIHeader::recLength, DBIHeader::signature, stringIndex, DBIHeader::unknown0, and DBIHeader::unknown1.

Referenced by CDatabaseIndex(), and Load().

unsigned long CDatabaseIndex::Search long  key  ) 
 

Definition at line 281 of file DBIndex.cpp.

References intIndex, and intRange.

unsigned long CDatabaseIndex::Search double  key  ) 
 

Definition at line 262 of file DBIndex.cpp.

References doubleIndex, and doubleRange.

unsigned long CDatabaseIndex::Search const char *  key  ) 
 

Definition at line 243 of file DBIndex.cpp.

References stringIndex, stringIter, and stringRange.

Referenced by CDatabase::Search().

unsigned long CDatabaseIndex::SearchNext void   ) 
 

Definition at line 299 of file DBIndex.cpp.

References stringIndex, and stringIter.

Referenced by CDatabase::SearchNext().


Member Data Documentation

std::multimap<double, unsigned long>* CDatabaseIndex::doubleIndex [protected]
 

Definition at line 160 of file Database.h.

Referenced by CDatabaseIndex(), GetNumItems(), Load(), Search(), and ~CDatabaseIndex().

DoubleIndex::iterator CDatabaseIndex::doubleIter [protected]
 

Definition at line 168 of file Database.h.

std::pair<DoubleIndex::iterator,DoubleIndex::iterator> CDatabaseIndex::doubleRange [protected]
 

Definition at line 164 of file Database.h.

Referenced by Search().

std::multimap<long, unsigned long>* CDatabaseIndex::intIndex [protected]
 

Definition at line 161 of file Database.h.

Referenced by CDatabaseIndex(), GetNumItems(), Load(), Search(), and ~CDatabaseIndex().

IntIndex::iterator CDatabaseIndex::intIter [protected]
 

Definition at line 169 of file Database.h.

std::pair<IntIndex::iterator,IntIndex::iterator> CDatabaseIndex::intRange [protected]
 

Definition at line 165 of file Database.h.

Referenced by Search().

Tag CDatabaseIndex::keyId [protected]
 

Definition at line 155 of file Database.h.

Referenced by CDatabaseIndex(), GetKeyId(), and Load().

unsigned long CDatabaseIndex::keyLength [protected]
 

Definition at line 157 of file Database.h.

Referenced by CDatabaseIndex(), GetKeyLength(), and Load().

unsigned char CDatabaseIndex::keyType [protected]
 

Definition at line 156 of file Database.h.

Referenced by CDatabaseIndex(), GetKeyType(), and Load().

std::multimap<std::string, unsigned long>* CDatabaseIndex::stringIndex [protected]
 

Definition at line 159 of file Database.h.

Referenced by CDatabaseIndex(), GetNumItems(), Load(), Search(), SearchNext(), and ~CDatabaseIndex().

StringIndex::iterator CDatabaseIndex::stringIter [protected]
 

Definition at line 167 of file Database.h.

Referenced by Search(), and SearchNext().

std::pair<StringIndex::iterator,StringIndex::iterator> CDatabaseIndex::stringRange [protected]
 

Definition at line 163 of file Database.h.

Referenced by Search().


The documentation for this class was generated from the following files:
SourceForge.net Logo Documentation generated by doxygen