- Main Page
- Classes
- Files

- File List
- File Members

# C:/Users/Public/AGS Final Folder/BFLETCHER D4010283/Source/Game/Source/HashString.h

Go to the documentation of this file.

    00001 //Type identifier structure for object types and any other need.
    00002 #ifndef _HASHSTRING_H_
    00003 #define _HASHSTRING_H_
    00004
    00005 #include <string>
    00006
    00007 class HashString
    00008 {
    00009         public:
    00010         HashString();
    00011         HashString(const std::string &typeStr);
    00012         ~HashString() {}
    00013
    00014         void setStr(const std::string &typeStr);
    00015         bool operator==(HashString t) { return (m_ulHash == t.getHash()); }
    00016
    00017         std::string getStr() { return m_sTypeStr; }
    00018         unsigned long getHash() { return m_ulHash; }
    00019
    00020         static unsigned long StringToHash(const std::string &str);
    00021
    00022         private:
    00023         std::string m_sTypeStr;
    00024         unsigned long m_ulHash;
    00025 };
    00026
    00027 #endif