Space Engineers
|
Generates unique IDs for strings. When used as key for hash tables (Dictionary or HashSet) always pass in MyStringId.Comparer, otherwise lookups will allocate memory! Never serialize to network or disk! More...
Classes | |
class | IdComparerType |
Public Member Functions | |
override string | ToString () |
override int | GetHashCode () |
override bool | Equals (object obj) |
bool | Equals (MyStringId id) |
Static Public Member Functions | |
static bool | operator== (MyStringId lhs, MyStringId rhs) |
static bool | operator!= (MyStringId lhs, MyStringId rhs) |
static | operator int (MyStringId id) |
static | MyStringId () |
static MyStringId | GetOrCompute (string str) |
static MyStringId | Get (string str) |
static bool | TryGet (string str, out MyStringId id) |
static MyStringId | TryGet (string str) |
static bool | IsKnown (MyStringId id) |
Static Public Attributes | |
static readonly MyStringId | NullOrEmpty |
static readonly IdComparerType | Comparer = new IdComparerType() |
Properties | |
int | Id [get] |
string | String [get] |
Generates unique IDs for strings. When used as key for hash tables (Dictionary or HashSet) always pass in MyStringId.Comparer, otherwise lookups will allocate memory! Never serialize to network or disk!
IDs are created sequentially as they get requested so two IDs might be different between sessions or clients and server. You can safely use ToString() as it will not allocate.
Definition at line 17 of file MyStringId.cs.
|
inlinestatic |
Definition at line 96 of file MyStringId.cs.
|
inline |
Definition at line 55 of file MyStringId.cs.
|
inline |
Definition at line 60 of file MyStringId.cs.
|
inlinestatic |
Definition at line 128 of file MyStringId.cs.
|
inline |
Definition at line 50 of file MyStringId.cs.
|
inlinestatic |
Definition at line 107 of file MyStringId.cs.
|
inlinestatic |
Definition at line 154 of file MyStringId.cs.
|
inlineexplicitstatic |
Definition at line 68 of file MyStringId.cs.
|
inlinestatic |
Definition at line 66 of file MyStringId.cs.
|
inlinestatic |
Definition at line 65 of file MyStringId.cs.
|
inline |
Definition at line 45 of file MyStringId.cs.
|
inlinestatic |
Definition at line 136 of file MyStringId.cs.
|
inlinestatic |
Definition at line 144 of file MyStringId.cs.
|
static |
Definition at line 89 of file MyStringId.cs.
|
static |
Definition at line 19 of file MyStringId.cs.
|
get |
Definition at line 30 of file MyStringId.cs.
|
get |
Definition at line 35 of file MyStringId.cs.