class DjVuTokenList

Token list.

Public Methods

[more] DjVuTokenList()
Simple Constructor
[more] ~DjVuTokenList()
Simple Destructor
[more]inline const char* const GetString(const int token) const
Lookup up a string given the token
[more]int GetToken(const char name[]) const
Lookup up a token given a string
[more]int SetToken(const char name[])
Assign a token if not already assigned and return it given the string
[more]friend void DjVuParseOptions::init(const char [], const char [])
Everybody needs friends


Documentation

Token list. This is a class very similar to GMap, only it is limited much more limited scope. It is an associative array "string" to integer. But the integer is assigned uniquely by this class in sequential order. This is of use when you want to store items sequentially in an array without making the array too large. This list is always sorted, so this class is also useful for creating a sorted unique list of words.

At some point the TokenList class could easily be replace by GMap, but is left as a separate class so static install programs can link just one object from the libdjvu++ library.

The DjVuTokenList keeps track of string/integer pairs. One unique integer is assigned per string. With the integer range stored from zero to the number of strings present. This is primarily intended to allow a simple mapping between strings and a fixed size array.

o DjVuTokenList()
Simple Constructor

o ~DjVuTokenList()
Simple Destructor

oinline const char* const GetString(const int token) const
Lookup up a string given the token

oint GetToken(const char name[]) const
Lookup up a token given a string

oint SetToken(const char name[])
Assign a token if not already assigned and return it given the string

ofriend void DjVuParseOptions::init(const char [], const char [])
Everybody needs friends


This class has no child classes.

Alphabetic index HTML hierarchy of classes or Java


DjVu is a trademark of LizardTech, Inc.
All other products mentioned are registered trademarks or trademarks of their respective companies.