squall/storm/hash/Hashkey.hpp

53 lines
1.2 KiB
C++
Raw Normal View History

2020-11-15 13:20:10 -06:00
#ifndef STORM_HASH_HASHKEY_HPP
#define STORM_HASH_HASHKEY_HPP
class HASHKEY_NONE {
2020-11-15 13:20:10 -06:00
public:
// Member functions
bool operator==(const HASHKEY_NONE& key);
};
2020-11-15 13:20:10 -06:00
class HASHKEY_PTR {
public:
2020-11-15 13:20:10 -06:00
// Member functions
HASHKEY_PTR();
HASHKEY_PTR(void* key);
HASHKEY_PTR& operator=(const HASHKEY_PTR& key);
bool operator==(const HASHKEY_PTR& key) const;
void* GetPtr() const;
private:
// Member variables
void* m_key;
2020-11-15 13:20:10 -06:00
};
class HASHKEY_STR {
public:
// Member functions
HASHKEY_STR();
HASHKEY_STR(const char* str);
2020-11-15 13:20:10 -06:00
~HASHKEY_STR();
HASHKEY_STR& operator=(const char* str);
HASHKEY_STR& operator=(const HASHKEY_STR& key);
bool operator==(const char* str) const;
bool operator==(const HASHKEY_STR& key) const;
const char* GetString() const;
protected:
// Member variables
char* m_str;
2020-11-15 13:20:10 -06:00
};
class HASHKEY_STRI : public HASHKEY_STR {
public:
// Member functions
HASHKEY_STRI() : HASHKEY_STR() {};
HASHKEY_STRI(const char* str) : HASHKEY_STR(str) {};
HASHKEY_STRI& operator=(const char* str);
HASHKEY_STRI& operator=(const HASHKEY_STRI& key);
bool operator==(const char* str) const;
bool operator==(const HASHKEY_STRI& key) const;
2020-11-15 13:20:10 -06:00
};
#endif