Public Member Functions | Private Member Functions | List of all members
UsedIndexLetters Class Reference
Inheritance diagram for UsedIndexLetters:
SIntDict< uint >

Public Member Functions

 UsedIndexLetters ()
 
void add (uint letter)
 
- Public Member Functions inherited from SIntDict< uint >
 SIntDict (int size=17)
 
virtual ~SIntDict ()
 
void append (int key, const uint *d)
 
void prepend (int key, const uint *d)
 
bool remove (int key)
 
void sort ()
 
void inSort (int key, const uint *d)
 
void setAutoDelete (bool val)
 
uintfind (int key)
 
uintoperator[] (int key) const
 
uintat (uint i)
 
void clear ()
 
int count ()
 

Private Member Functions

int compareValues (const uint *p1, const uint *p2) const
 

Detailed Description

Definition at line 1740 of file index.cpp.

Constructor & Destructor Documentation

UsedIndexLetters::UsedIndexLetters ( )
inline

Definition at line 1743 of file index.cpp.

1743 : SIntDict<uint>(257) { setAutoDelete(TRUE); }
void setAutoDelete(bool val)
Definition: sortdict.h:545
const bool TRUE
Definition: qglobal.h:371

Member Function Documentation

void UsedIndexLetters::add ( uint  letter)
inline

Definition at line 1744 of file index.cpp.

1745  {
1746  uint *v = find(letter);
1747  if (v==0)
1748  {
1749  append(letter,new uint(letter));
1750  }
1751  }
uint * find(int key)
Definition: sortdict.h:555
void append(int key, const uint *d)
Definition: sortdict.h:481
unsigned uint
Definition: qglobal.h:351
int UsedIndexLetters::compareValues ( const uint item1,
const uint 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< uint >.

Definition at line 1753 of file index.cpp.

1754  {
1755  return (int)*p1 - (int)*p2; // subtracting is done by int not uint.
1756  }

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