119 bool operator==(
const std::string& rhs)
const;
130 bool operator!=(
const std::string& rhs)
const;
141 bool operator<(
const std::string& rhs)
const;
152 bool operator>(
const std::string& rhs)
const;
187 virtual int Compare(
const std::string& nameString)
const;
255 #define DECLARE_ENUM(EnumType) \ 257 using EnumerateListType = std::vector<EnumType*>; \ 259 static const EnumerateListType& EnumerateType() \ 261 return EnumType::mInstances; \ 264 static const std::vector<trUtil::EnumerationString*>& Enumerate() \ 266 return EnumType::mGenericInstances; \ 269 static EnumType* GetValueForName(const std::string& name); \ 272 static EnumerateListType mInstances; \ 273 static std::vector<trUtil::EnumerationString*> mGenericInstances; \ 274 static void AddInstance(EnumType* instance); \ 284 #define IMPLEMENT_ENUM(EnumType) \ 285 EnumType::EnumerateListType EnumType::mInstances; \ 286 std::vector<trUtil::EnumerationString*> EnumType::mGenericInstances; \ 287 void EnumType::AddInstance(EnumType* instance) \ 289 EnumType::mInstances.push_back(instance); \ 290 EnumType::mGenericInstances.push_back(instance); \ 292 EnumType* EnumType::GetValueForName(const std::string& name) \ 294 for (unsigned i = 0; i < mInstances.size(); ++i) \ 296 if ((*mInstances[i]) == name) \ 298 return mInstances[i]; \ 312 template <
typename T>
441 if (mEnum == ptr)
return *
this;
457 if (mEnum == &enumRef)
return *
this;
473 return (mEnum == rp.
mEnum);
487 return (mEnum == ptr);
502 return (ptr == rp.
mEnum);
516 return (mEnum != rp.
mEnum);
530 return (mEnum != ptr);
545 return (ptr != rp.
mEnum);
559 return (mEnum < rp.
mEnum);
573 return (mEnum > rp.
mEnum);
621 return mEnum ==
nullptr;
633 return mEnum !=
nullptr;
~EnumerationPointer()
Destructor.
bool operator<(const EnumerationPointer &rp) const
Overloaded less than test for this EnumerationString pointers's string value.
T * operator->() const
Pointer method access operator.
T & operator*() const
Pointer operator that returns a reference.
bool operator==(const std::string &s1, const RefStr &s2)
bool operator!=(const T *ptr) const
Comparison between EnumerationPointers and a pointer.
bool valid() const
Returns FALSE if the pointer is nullptr.
friend bool operator==(const T *ptr, const EnumerationPointer &rp)
Comparison between EnumerationPointer and a pointer.
bool operator!() const
The NOT operator.
const std::string & GetName() const
Inlined because it's called frequently.
#define TR_DISABLE_WARNING_START_MSVC(...)
bool operator!=(const std::string &s1, const RefStr &s2)
TR_BASE_EXPORT std::ostream & operator<<(std::ostream &ios, const Matrixd &q)
Stream insertion operator.
A class that specifies what kind of entity an object is in the Entity System.
bool operator>(const EnumerationPointer &rp) const
Overloaded greater than test for this EnumerationString pointers's string value.
EnumerationPointer(T *ptr)
A constructor that creates a pointer from a passed in EnumerationString.
bool operator!=(const EnumerationString &rhs) const
Inequality test for an EnumerationString.
EnumerationString Pointer class holds a reference to a passed in Enumeration.
std::string mName
String representation of the EnumerationString.
#define TR_DISABLE_WARNING_END
EnumerationPointer(const EnumerationPointer &rp)
A constructor that creates a pointer from another EnumerationString Pointer.
EnumerationPointer & operator=(const EnumerationPointer< Other > &rp)
Assignment by reference operator.
This class represents a type-safe EnumerationString pattern.
A class that represents date time utility.
Namespace that holds various utility classes for the engine.
friend bool operator!=(const T *ptr, const EnumerationPointer &rp)
Comparison between EnumerationPointer and a pointer.
void swap(EnumerationPointer &rp)
Swaps the internal object with the passed in.
bool operator<(const EnumerationString &rhs) const
Overloaded less than operator.
EnumerationPointer(const EnumerationPointer< Other > &rp)
A templated pointer constructor that can create an EnumerationString pointer from an EnumerationStrin...
EnumerationPointer & operator=(const EnumerationPointer &rp)
Assignment by reference operator.
bool operator==(const EnumerationPointer &rp) const
Comparison between two EnumerationPointers.
EnumerationPointer & operator=(T *ptr)
Assignment from a pointer operator.
EnumerationPointer()
A constructor that creates and empty pointer.
EnumerationPointer & operator=(T &enumRef)
Assignment from a reference operator.
bool operator==(const T *ptr) const
Comparison between EnumerationPointers and a pointer.
bool operator==(const EnumerationString &rhs) const
Equality test for an EnumerationString.
bool operator!=(const EnumerationPointer &rp) const
Comparison between two EnumerationPointers.