Loading...
Searching...
No Matches
StringHashBase Class Referenceabstract
Inheritance diagram for StringHashBase:
[legend]

## Public Member Functions

void | setCaseSensitive (bool caseSensitive)
virtual void | SetSize (int newsize)=0

## Protected Member Functions

bool | stringsEqual (const String &string1, const String &string2) const
unsigned int | getKey (const String &string) const

## Protected Attributes

bool | myCaseSensitive

## Detailed Description

Definition at line 26 of file StringHash.h.

## Constructor & Destructor Documentation

## StringHashBase()

StringHashBase::StringHashBase | ( |  | ) |

inline

Definition at line 30 of file StringHash.h.

: myCaseSensitive(false)
{}

## ~StringHashBase()

virtual StringHashBase::~StringHashBase | ( |  | ) |

inline virtual

Definition at line 34 of file StringHash.h.

{}

## Member Function Documentation

## getKey()

unsigned int StringHashBase::getKey | ( | const String & | string | ) | const

inline protected

Definition at line 51 of file StringHash.h.

{
if(myCaseSensitive)
{
return(hash(string.uchar(), string.Length(), 0));
}
// Case insensitive.
return(hash_no_case(string.uchar(), string.Length(), 0));
}

## setCaseSensitive()

void StringHashBase::setCaseSensitive | ( | bool | caseSensitive | ) |

inline

Definition at line 29 of file StringHash.h.

{myCaseSensitive = caseSensitive;}

## stringsEqual()

bool StringHashBase::stringsEqual | ( | const String & | string1,
|  | const String & | string2 ) const

inline protected

Definition at line 40 of file StringHash.h.

{
if(myCaseSensitive)
{
// Case sensitive is faster.
return(string1.FastCompare(string2) == 0);
}
// Case insensitive - slow compare - convert to same case.
return(string1.SlowCompare(string2) == 0);
}

## Member Data Documentation

## myCaseSensitive

bool StringHashBase::myCaseSensitive

protected

Definition at line 61 of file StringHash.h.

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

- general/StringHash.h