31 typedef std::map<std::string, Handle> LookupTable;
32 typedef std::vector<std::string> NamesList;
33 static LookupTable lookup;
34 static NamesList names;
35 void assign(
const std::string &
s);
37 explicit C4ID(
const char (&
s)[N]) { assign(
s); }
48 explicit C4ID(
const std::string &
s);
53 assert(v < names.size());
58 assert(v < names.size());
59 return names[v].c_str();
61 inline operator std::string ()
const
63 assert(v < names.size());
74 inline bool operator ==(
const C4ID &other)
const {
return names[v] == names[other.v]; }
75 inline bool operator !=(
const C4ID &other)
const {
return names[v] != names[other.v]; }
76 inline bool operator <(
const C4ID &other)
const {
return names[v] < names[other.v]; }
77 inline bool operator >(
const C4ID &other)
const {
return names[v] > names[other.v]; }
78 inline bool operator <=(
const C4ID &other)
const {
return names[v] <= names[other.v]; }
79 inline bool operator >=(
const C4ID &other)
const {
return names[v] >= names[other.v]; }
static const C4ID EditorBase
C4ID(const C4ID &other)=default
size_t C4ID::* safe_bool_type
bool operator==(const C4ID &other) const
void CompileFunc(StdCompiler *pComp)
bool operator!=(const C4ID &other) const
bool operator<(const C4ID &other) const
bool operator>(const C4ID &other) const
bool operator>=(const C4ID &other) const
const char * ToString() const
bool operator<=(const C4ID &other) const
C4ID & operator=(const C4ID &other)=default