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

#include <UT_FSATable.h>

Public Member Functions

 UT_FSATableT ()
 Empty table constructor. More...
 
template<typename... Args>
 UT_FSATableT (T token, const char *symbol, Args...args)
 
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
 
T findSymbol (const UT_String &symbol) const
 
T findSymbol (const UT_StringRef &symbol) const
 
bool contains (const char *symbol) const
 
int count (const char *symbol) const
 

Detailed Description

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

Definition at line 19 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 23 of file UT_FSATable.h.

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

Create a new token map. Variadic arguments are provided as pairs - for example: UT_FSATableT map(1, "one", 2, "two");

Definition at line 31 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 82 of file UT_FSATable.h.

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

Return whether a symbol exists

Definition at line 84 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 77 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 40 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 47 of file UT_FSATable.h.

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

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

Definition at line 54 of file UT_FSATable.h.

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

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

Definition at line 56 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 72 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 63 of file UT_FSATable.h.


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