CartoType API
Public Member Functions
CartoType::CTrie< T > Class Template Reference

#include <cartotype_trie.h>

Inheritance diagram for CartoType::CTrie< T >:
CartoType::CTrieBase CartoType::MPointerDictionary< MString, T >

List of all members.

Public Member Functions

 CTrie (bool aOwnData=true)
void Clear ()
TResult Insert (const MString &aText, const T *aData)
bool Find (const MString &aText, const T *&aData) const

Detailed Description

template<class T>
class CartoType::CTrie< T >

A templated trie class which associates data of type 'pointer to T' with each entry. Entries are strings.


Constructor & Destructor Documentation

template<class T>
CartoType::CTrie< T >::CTrie ( bool  aOwnData = true) [inline]

Create a trie, optionally giving it ownership of the data items associated with entries.


Member Function Documentation

template<class T>
void CartoType::CTrie< T >::Clear ( ) [inline]

Delete all entries.

template<class T>
bool CartoType::CTrie< T >::Find ( const MString aText,
const T *&  aData 
) const [inline, virtual]

Find the string aText. If it is in the trie return true, otherwise return false. Put a pointer to any data associated with the string in aData. If no data is associated with the string set aData to null.

Implements CartoType::MPointerDictionary< MString, T >.

template<class T>
TResult CartoType::CTrie< T >::Insert ( const MString aText,
const T *  aData 
) [inline]

Insert the string aText, associating it with aData, which may be null. Return KErrorDuplicate if the text already exists in the trie.


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