HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
UT_FSATableT< T, DEFAULT_TOKEN > Class Template Reference

#include <UT_FSATable.h>

Public Member Functions

 UT_FSATableT ()
 Empty table constructor. More...
 
 UT_FSATableT (T token, const char *symbol,...)
 
const char * getToken (T token) const
 
int64 getMemUsage () const
 Returns the memory usage of this object. More...
 
void extractStrings (UT_StringArray &list) const
 Extract all strings. More...
 
T findSymbol (const char *symbol) const
 
T findSymbol (const UT_StringView &symbol) const
 
bool contains (const char *symbol) const
 
bool count (const char *symbol) const
 

Detailed Description

template<typename T, int DEFAULT_TOKEN = -1>
class UT_FSATableT< T, DEFAULT_TOKEN >

Definition at line 21 of file UT_FSATable.h.

Constructor & Destructor Documentation

template<typename T , int DEFAULT_TOKEN = -1>
UT_FSATableT< T, DEFAULT_TOKEN >::UT_FSATableT ( )
inline

Empty table constructor.

Definition at line 25 of file UT_FSATable.h.

template<typename T , int DEFAULT_TOKEN = -1>
UT_FSATableT< T, DEFAULT_TOKEN >::UT_FSATableT ( T  token,
const char *  symbol,
  ... 
)
inline

Create a new token map. Variadic arguments are provided as pairs - for example: UT_FSATableT map(1, "one", 2, "two", -1, NULL); The argument list must be terminated by (-1, NULL).

Definition at line 33 of file UT_FSATable.h.

Member Function Documentation

template<typename T , int DEFAULT_TOKEN = -1>
bool UT_FSATableT< T, DEFAULT_TOKEN >::contains ( const char *  symbol) const
inline

Return whether a symbol exists

Definition at line 108 of file UT_FSATable.h.

template<typename T , int DEFAULT_TOKEN = -1>
bool UT_FSATableT< T, DEFAULT_TOKEN >::count ( const char *  symbol) const
inline

Return whether a symbol exists

Definition at line 110 of file UT_FSATable.h.

template<typename T , int DEFAULT_TOKEN = -1>
void UT_FSATableT< T, DEFAULT_TOKEN >::extractStrings ( UT_StringArray list) const
inline

Extract all strings.

Definition at line 103 of file UT_FSATable.h.

template<typename T , int DEFAULT_TOKEN = -1>
T UT_FSATableT< T, DEFAULT_TOKEN >::findSymbol ( const char *  symbol) const
inline

Find the integer id corresponding to the symbol. Returns DEFAULT_TOKEN if not found

Definition at line 70 of file UT_FSATable.h.

template<typename T , int DEFAULT_TOKEN = -1>
T UT_FSATableT< T, DEFAULT_TOKEN >::findSymbol ( const UT_StringView symbol) const
inline

Find the integer id corresponding to the symbol. Returns DEFAULT_TOKEN if not found

Definition at line 77 of file UT_FSATable.h.

template<typename T , int DEFAULT_TOKEN = -1>
int64 UT_FSATableT< T, DEFAULT_TOKEN >::getMemUsage ( ) const
inline

Returns the memory usage of this object.

Definition at line 98 of file UT_FSATable.h.

template<typename T , int DEFAULT_TOKEN = -1>
const char* UT_FSATableT< T, DEFAULT_TOKEN >::getToken ( T  token) const
inline

Return the name associated with the integer id. If there are duplicate strings which map to the same id, the first string will be returned. Returns NULL if not valid

Definition at line 89 of file UT_FSATable.h.


The documentation for this class was generated from the following file: