ezEngine  Milestone 7
ezTempHashedString Class Reference

A class to use together with ezHashedString for quick comparisons with temporary strings that need not be stored further. More...

#include <HashedString.h>

Public Member Functions

template<size_t N>
 ezTempHashedString (const char(&szString)[N])
 Creates an ezTempHashedString object from the given string constant. The hash can be computed at compile time.
 
 ezTempHashedString (ezHashing::StringWrapper szString)
 Creates an ezTempHashedString object from the given string. Computes the hash of the given string during runtime, which might be slow.
 
 ezTempHashedString (const ezTempHashedString &rhs)
 Copies the hash from rhs.
 
 ezTempHashedString (const ezHashedString &rhs)
 Copies the hash from the ezHashedString.
 
 ezTempHashedString (ezUInt32 uiHash)
 Copies the hash from the integer.
 
template<size_t N>
void operator= (const char(&szString)[N])
 The hash of the given string can be computed at compile time.
 
void operator= (ezHashing::StringWrapper szString)
 Computes and stores the hash of the given string during runtime, which might be slow.
 
void operator= (const ezTempHashedString &rhs)
 Copies the hash from rhs.
 
void operator= (const ezHashedString &rhs)
 Copies the hash from the ezHashedString.
 
bool operator== (const ezTempHashedString &rhs) const
 Compares the two objects by their hash value. Might report incorrect equality, if two strings have the same hash value.
 
bool operator!= (const ezTempHashedString &rhs) const
 
bool operator< (const ezTempHashedString &rhs) const
 This operator allows soring objects by hash value, not by alphabetical order.
 
ezUInt32 GetHash () const
 Returns the hash of the stored string.
 

Private Member Functions

 ezTempHashedString ()
 Default constructor is disabled, you are not supposed to store these objects as members.
 

Private Attributes

ezUInt32 m_uiHash
 

Friends

class ezHashedString
 

Detailed Description

A class to use together with ezHashedString for quick comparisons with temporary strings that need not be stored further.

Whenever you have objects that use ezHashedString members and you need to compare against them with some temporary string, prefer to use ezTempHashedString instead of ezHashedString, as the latter requires thread synchronization to actually set up the object.

Member Function Documentation

bool ezTempHashedString::operator!= ( const ezTempHashedString rhs) const
inline
See Also
operator==

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