|
CartoType API
|
#include <cartotype_trie.h>
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 |
A templated trie class which associates data of type 'pointer to T' with each entry. Entries are strings.
| CartoType::CTrie< T >::CTrie | ( | bool | aOwnData = true | ) | [inline] |
Create a trie, optionally giving it ownership of the data items associated with entries.
| void CartoType::CTrie< T >::Clear | ( | ) | [inline] |
Delete all entries.
| 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 >.
| 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.
1.7.5.1