|
EvEmu
0.8.4
11 September 2021
|
a singleton data container for communication string lookup. More...
#include "EVEMarshalStringTable.h"


Public Member Functions | |
| MarshalStringTable () | |
| uint8 | LookupIndex (const std::string &str) |
| lookup a index nr using a string More... | |
| uint8 | LookupIndex (const char *str) |
| lookup a index nr using a string More... | |
| const char * | LookupString (uint8 index) |
| lookup a string using a index More... | |
Public Member Functions inherited from Singleton< MarshalStringTable > | |
| Singleton () | |
| Primary constructor. More... | |
Private Types | |
| typedef std::unordered_map < uint32, uint8 > | StringTableMap |
| typedef StringTableMap::iterator | StringTableMapItr |
| typedef StringTableMap::const_iterator | StringTableMapConstItr |
Private Member Functions | |
| uint32 | hash (const char *str) |
| djb2 algorithm taken from http://www.cse.yorku.ca/~oz/hash.html slightly modified More... | |
Private Attributes | |
| StringTableMap | mStringTableMap |
Static Private Attributes | |
| static const char *const | s_mStringTable [] |
| static const size_t | s_mStringTableSize = sizeof( MarshalStringTable::s_mStringTable ) / sizeof( const char* ) |
Additional Inherited Members | |
Static Public Member Functions inherited from Singleton< MarshalStringTable > | |
| static MarshalStringTable & | get () |
Static Protected Attributes inherited from Singleton< MarshalStringTable > | |
| static std::shared_ptr < MarshalStringTable > | mInstance |
a singleton data container for communication string lookup.
this class is a data container for communication string lookup. eventually this class should be available to every thread the unmarshal's. so only until we have solved the entire mess.. this is a singleton with mutex locks.
Definition at line 47 of file EVEMarshalStringTable.h.
|
private |
Definition at line 99 of file EVEMarshalStringTable.h.
|
private |
Definition at line 101 of file EVEMarshalStringTable.h.
|
private |
Definition at line 100 of file EVEMarshalStringTable.h.
| MarshalStringTable::MarshalStringTable | ( | ) |
Definition at line 290 of file EVEMarshalStringTable.cpp.
References hash(), LookupString(), mStringTableMap, and s_mStringTableSize.

|
inlineprivate |
djb2 algorithm taken from http://www.cse.yorku.ca/~oz/hash.html slightly modified
| [in] | oStr | string that needs to be hashed. |
Definition at line 88 of file EVEMarshalStringTable.h.
Referenced by LookupIndex(), and MarshalStringTable().

| uint8 MarshalStringTable::LookupIndex | ( | const std::string & | str | ) |
lookup a index nr using a string
| [in] | string | that needs a lookup for a index nr. |
Definition at line 297 of file EVEMarshalStringTable.cpp.
| uint8 MarshalStringTable::LookupIndex | ( | const char * | str | ) |
lookup a index nr using a string
| [in] | string | that needs a lookup for a index nr. |
Definition at line 303 of file EVEMarshalStringTable.cpp.
References hash(), mStringTableMap, and STRING_TABLE_ERROR.

| const char * MarshalStringTable::LookupString | ( | uint8 | index | ) |
lookup a string using a index
| [in] | index | is the index of the string that needs to be looked up. |
Definition at line 312 of file EVEMarshalStringTable.cpp.
References s_mStringTable, and s_mStringTableSize.
Referenced by MarshalStringTable().

|
private |
Definition at line 103 of file EVEMarshalStringTable.h.
Referenced by LookupIndex(), and MarshalStringTable().
|
staticprivate |
Definition at line 106 of file EVEMarshalStringTable.h.
Referenced by LookupString().
|
staticprivate |
Definition at line 109 of file EVEMarshalStringTable.h.
Referenced by LookupString(), and MarshalStringTable().