|
CeresEngine 0.2.0
A game development framework
|
The interface for all databases. You can derive own databases from it. More...
#include <CeresEngine/Foundation/StringID.hpp>
Public Member Functions | |
| StringDatabase (const StringDatabase &)=delete | |
| StringDatabase (StringDatabase &&)=delete | |
| virtual | ~StringDatabase ()=default |
| virtual StringID::Status | insert (StringID::Hash hash, StringView string)=0 |
| Inserts a new hash-string-pair with prefix (optional) into the internal database. | |
| virtual StringID::Status | insertPrefix (StringID::Hash hash, StringID::Hash prefix, StringView string) |
| Inserts a hash-string-pair with given prefix into the internal database. | |
| virtual StringView | lookup (StringID::Hash hash) const noexcept=0 |
| Returns the string stored with a given hash. | |
Static Public Member Functions | |
| static StringDatabase & | getDefault () noexcept |
Protected Member Functions | |
| StringDatabase ()=default | |
The interface for all databases. You can derive own databases from it.
|
delete |
|
delete |
|
virtualdefault |
|
protecteddefault |
|
staticnoexcept |
|
pure virtual |
Inserts a new hash-string-pair with prefix (optional) into the internal database.
| hash | The hash of the string. |
| string | The string which does not need to be null-terminated. |
Implemented in CeresEngine::MapStringDatabase, and CeresEngine::DummyStringDatabase.
|
virtual |
Inserts a hash-string-pair with given prefix into the internal database.
insert. Override it if you can do it more efficiently.| hash | The hash of the string plus prefix. |
| prefix | The hash of the prefix-string. |
| string | The suffix which does not need to be null-terminated. |
Reimplemented in CeresEngine::MapStringDatabase, and CeresEngine::DummyStringDatabase.
|
pure virtualnoexcept |
Returns the string stored with a given hash.
Implemented in CeresEngine::MapStringDatabase, and CeresEngine::DummyStringDatabase.