Tagcoll::StringIndex Class Reference
MMap-based index of int -> string mappings.
More...
#include <StringIndex.h>
Inheritance diagram for Tagcoll::StringIndex:
[legend]Collaboration diagram for Tagcoll::StringIndex:
[legend]List of all members.
|
Public Member Functions |
| StringIndex (const MasterMMapIndex &master, int idx) |
virtual | ~StringIndex () |
virtual std::string | operator() (const int &id) const |
| Convert a single item.
|
virtual int | operator() (const std::string &item) const |
| Convert a single item.
|
const char * | data (int val) const |
size_t | size (int val) const |
int | data (const char *str) const |
size_t | size () const |
Protected Member Functions |
int | offset (int val) const |
Protected Attributes |
std::vector< std::string > | stringCache |
Detailed Description
MMap-based index of int -> string mappings.
The layout is:
[offset of string for item 0, offset of string for item 1...] [0-terminated string 1][0-terminated string 2][...] [number of items in the mapping]
The index of a string not present in the index is assumed to be -1 The string corresponding to an invalid index is ""
Constructor & Destructor Documentation
Tagcoll::StringIndex::StringIndex |
( |
const MasterMMapIndex & |
master, |
|
|
int |
idx |
|
) |
[inline] |
|
virtual Tagcoll::StringIndex::~StringIndex |
( |
|
) |
[inline, virtual] |
|
Member Function Documentation
int StringIndex::data |
( |
const char * |
str |
) |
const |
|
const char* Tagcoll::StringIndex::data |
( |
int |
val |
) |
const [inline] |
|
int Tagcoll::StringIndex::offset |
( |
int |
val |
) |
const [inline, protected] |
|
virtual int Tagcoll::StringIndex::operator() |
( |
const std::string & |
item |
) |
const [inline, virtual] |
|
virtual std::string Tagcoll::StringIndex::operator() |
( |
const int & |
id |
) |
const [inline, virtual] |
|
size_t Tagcoll::StringIndex::size |
( |
|
) |
const [inline] |
|
size_t Tagcoll::StringIndex::size |
( |
int |
val |
) |
const [inline] |
|
Member Data Documentation
The documentation for this class was generated from the following files:
Generated on Mon Jun 19 17:32:48 2006 for libtagcoll by
1.4.6