|
TrueReality
v0.1.1912
|
This class represents a type-safe EnumerationString pattern. More...
#include <EnumerationString.h>

Public Member Functions | |
| const std::string & | GetName () const |
| Inlined because it's called frequently. More... | |
| bool | operator== (const EnumerationString &rhs) const |
| Equality test for an EnumerationString. More... | |
| bool | operator!= (const EnumerationString &rhs) const |
| Inequality test for an EnumerationString. More... | |
| bool | operator== (const std::string &rhs) const |
| Overloaded string compare operator for the EnumerationString. More... | |
| bool | operator!= (const std::string &rhs) const |
| Overloaded inequality test for this EnumerationString's string value. More... | |
| bool | operator< (const std::string &rhs) const |
| Overloaded less than test for this EnumerationString's string value. More... | |
| bool | operator> (const std::string &rhs) const |
| Overloaded greater than test for this EnumerationString's string value. More... | |
| bool | operator< (const EnumerationString &rhs) const |
| Overloaded less than operator. More... | |
Protected Member Functions | |
| virtual int | Compare (const std::string &nameString) const |
| Virtual string compare method to used by the operators that take a string. More... | |
| virtual | ~EnumerationString () |
| Private virtual destructor to get rid of compile warning. More... | |
| EnumerationString (const std::string &name) | |
| Construct the EnumerationString. More... | |
Private Member Functions | |
| EnumerationString & | operator= (const EnumerationString &) |
| Private assignment operator to enforce EnumerationString storage by reference. More... | |
| EnumerationString (const EnumerationString &) | |
| Private copy constructor to enforce EnumerationString storage by reference. More... | |
Private Attributes | |
| std::string | mName |
| String representation of the EnumerationString. More... | |
This class represents a type-safe EnumerationString pattern.
It allows one to also enumerate an EnumerationString thus looking up values in a list fashion.
Definition at line 57 of file EnumerationString.h.
|
protectedvirtual |
Private virtual destructor to get rid of compile warning.
Definition at line 60 of file EnumerationString.cpp.
|
protected |
Construct the EnumerationString.
| name | The name. |
Definition at line 65 of file EnumerationString.cpp.
|
private |
Private copy constructor to enforce EnumerationString storage by reference.
| parameter1 | The first parameter. |
Definition at line 77 of file EnumerationString.cpp.
|
protectedvirtual |
Virtual string compare method to used by the operators that take a string.
This allows overriding the behavior in a subclass. It should work like std::string::compare.
| nameString | The constant standard string& to compare to this object. |
Definition at line 54 of file EnumerationString.cpp.
References mName.
Referenced by operator!=(), trUtil::EnumerationNumeric::operator!=(), operator<(), trUtil::EnumerationNumeric::operator<(), operator==(), trUtil::EnumerationNumeric::operator==(), operator>(), and trUtil::EnumerationNumeric::operator>().

|
inline |
Inlined because it's called frequently.
Definition at line 68 of file EnumerationString.h.
Referenced by trManager::ActorBase::AddActorModule(), trManager::EntityBase::AddChild(), trUtil::operator<<(), and trManager::ActorBase::RemoveActorModule().

|
inline |
Inequality test for an EnumerationString.
Inlined because it's called frequently.
| rhs | The right hand side. |
Definition at line 101 of file EnumerationString.h.
References trUtil::operator!=(), and trUtil::operator==().

| bool trUtil::EnumerationString::operator!= | ( | const std::string & | rhs | ) | const |
Overloaded inequality test for this EnumerationString's string value.
| rhs | The right hand side. |
Definition at line 36 of file EnumerationString.cpp.
References Compare().

| bool trUtil::EnumerationString::operator< | ( | const std::string & | rhs | ) | const |
Overloaded less than test for this EnumerationString's string value.
| rhs | The right hand side. |
Definition at line 42 of file EnumerationString.cpp.
References Compare().

|
inline |
Overloaded less than operator.
This checks the memory addresses of the two EnumerationStrings. Inlined because it's called frequently.
| rhs | The second EnumerationString to compare to this one. |
Definition at line 169 of file EnumerationString.h.
|
private |
Private assignment operator to enforce EnumerationString storage by reference.
| parameter1 | The first parameter. |
Definition at line 71 of file EnumerationString.cpp.
|
inline |
Equality test for an EnumerationString.
Since EnumerationString objects are static, and only references to EnumerationStrings may be stored by the user, it is safe and efficient to compare EnumerationString objects based on their memory address. Inlined because it's called frequently.
| rhs | The right hand side. |
Definition at line 85 of file EnumerationString.h.
| bool trUtil::EnumerationString::operator== | ( | const std::string & | rhs | ) | const |
Overloaded string compare operator for the EnumerationString.
This will compare the string to this EnumerationStrings getName() value.
| rhs | . |
Definition at line 30 of file EnumerationString.cpp.
References Compare().

| bool trUtil::EnumerationString::operator> | ( | const std::string & | rhs | ) | const |
Overloaded greater than test for this EnumerationString's string value.
| rhs | The right hand side. |
Definition at line 48 of file EnumerationString.cpp.
References Compare().

|
private |
String representation of the EnumerationString.
Definition at line 221 of file EnumerationString.h.
Referenced by Compare().