My Project
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Member Functions | List of all members
LetterToIndexMap< T > Class Template Reference

maps a unicode character code to a list of T::ElementType's More...

#include <util.h>

Inheritance diagram for LetterToIndexMap< T >:
SIntDict< T >

Public Member Functions

 LetterToIndexMap ()
 
void append (uint letter, typename T::ElementType *elem)
 
- Public Member Functions inherited from SIntDict< T >
 SIntDict (int size=17)
 
virtual ~SIntDict ()
 
void append (int key, const T *d)
 
void prepend (int key, const T *d)
 
bool remove (int key)
 
void sort ()
 
void inSort (int key, const T *d)
 
void setAutoDelete (bool val)
 
T * find (int key)
 
T * operator[] (int key) const
 
T * at (uint i)
 
void clear ()
 
int count ()
 

Private Member Functions

int compareValues (const T *l1, const T *l2) const
 

Detailed Description

template<class T>
class LetterToIndexMap< T >

maps a unicode character code to a list of T::ElementType's

Definition at line 96 of file util.h.

Constructor & Destructor Documentation

template<class T>
LetterToIndexMap< T >::LetterToIndexMap ( )
inline

Definition at line 99 of file util.h.

Member Function Documentation

template<class T>
void LetterToIndexMap< T >::append ( uint  letter,
typename T::ElementType *  elem 
)
inline

Definition at line 100 of file util.h.

Referenced by addClassMemberNameToIndex(), addFileMemberNameToIndex(), addMemberToSearchIndex(), addNamespaceMemberNameToIndex(), createJavascriptSearchIndex(), and writeAlphabeticalClassList().

{
T *l = SIntDict<T>::find((int)letter);
if (l==0)
{
l = new T(letter);
SIntDict<T>::inSort((int)letter,l);
}
l->append(elem);
}
template<class T>
int LetterToIndexMap< T >::compareValues ( const T *  item1,
const T *  item2 
) const
inlineprivatevirtual

Function that is used to compare two items when sorting. Overload this to properly sort items.

See Also
inSort()

Reimplemented from SIntDict< T >.

Definition at line 111 of file util.h.

{
return (int)l1->letter()-(int)l2->letter();
}

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