mirror of
https://github.com/thunderbrewhq/squall.git
synced 2026-02-04 16:59:08 +00:00
feat(hash): add HASHKEY_CONSTSTR and HASHKEY_CONSTSTRI
This commit is contained in:
parent
5190c49019
commit
8c2439277c
4 changed files with 234 additions and 20 deletions
|
|
@ -49,4 +49,32 @@ class HASHKEY_STRI : public HASHKEY_STR {
|
|||
bool operator==(const HASHKEY_STRI& key) const;
|
||||
};
|
||||
|
||||
class HASHKEY_CONSTSTR {
|
||||
public:
|
||||
// Member functions
|
||||
HASHKEY_CONSTSTR();
|
||||
HASHKEY_CONSTSTR(const char* str);
|
||||
~HASHKEY_CONSTSTR();
|
||||
HASHKEY_CONSTSTR& operator=(const char* str);
|
||||
HASHKEY_CONSTSTR& operator=(const HASHKEY_CONSTSTR& key);
|
||||
bool operator==(const char* str) const;
|
||||
bool operator==(const HASHKEY_CONSTSTR& key) const;
|
||||
const char* GetString() const;
|
||||
|
||||
protected:
|
||||
// Member variables
|
||||
const char* m_str;
|
||||
};
|
||||
|
||||
class HASHKEY_CONSTSTRI : public HASHKEY_CONSTSTR {
|
||||
public:
|
||||
// Member functions
|
||||
HASHKEY_CONSTSTRI() : HASHKEY_CONSTSTR() {};
|
||||
HASHKEY_CONSTSTRI(const char* str) : HASHKEY_CONSTSTR(str) {};
|
||||
HASHKEY_CONSTSTRI& operator=(const char* str);
|
||||
HASHKEY_CONSTSTRI& operator=(const HASHKEY_CONSTSTRI& key);
|
||||
bool operator==(const char* str) const;
|
||||
bool operator==(const HASHKEY_CONSTSTRI& key) const;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue