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


Public Types | |
| using | BaseClass = EnumerationString |
| / Adds an easy and swappable access to the base class. More... | |
Public Member Functions | |
| unsigned int | GetID () const |
| Returns the Numeric value of the Enum. More... | |
| bool | operator== (const unsigned int &id) const |
| Equality test for an EnumerationNumeric. More... | |
| bool | operator!= (const unsigned int &id) const |
| Inequality test for an EnumerationNumeric. More... | |
| bool | operator> (const unsigned int &id) const |
| Greater than test for an EnumerationNumeric. More... | |
| bool | operator< (const unsigned int &id) const |
| Less than test for an EnumerationNumeric. More... | |
| bool | operator> (const EnumerationNumeric &e) const |
| Greater than test for an EnumerationNumeric. More... | |
| bool | operator< (const EnumerationNumeric &e) const |
| Less than test for an EnumerationNumeric. More... | |
| bool | operator== (const EnumerationNumeric &e) const |
| Equality test for an EnumerationNumeric. More... | |
| bool | operator!= (const EnumerationNumeric &e) const |
| Inequality test for an EnumerationNumeric. More... | |
| bool | operator== (const std::string &rhs) const |
| Overloaded string compare operator for the EnumerationNumeric. More... | |
| bool | operator!= (const std::string &rhs) const |
| Overloaded inequality test for this EnumerationNumeric's string value. More... | |
| bool | operator< (const std::string &rhs) const |
| Overloaded less than test for this EnumerationNumeric's string value. More... | |
| bool | operator> (const std::string &rhs) const |
| Overloaded greater than test for this EnumerationNumeric's string value. More... | |
Public Member Functions inherited from trUtil::EnumerationString | |
| 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 | |
| EnumerationNumeric (const std::string &name, unsigned int orderId) | |
| ctor Protected to prevent creation of an instance. More... | |
| ~EnumerationNumeric () | |
| dtor. More... | |
Protected Member Functions inherited from trUtil::EnumerationString | |
| 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 | |
| EnumerationNumeric & | operator= (const EnumerationNumeric &) |
| Private assignment operator to enforce EnumerationNumeric storage by reference. More... | |
| EnumerationNumeric (const EnumerationNumeric &) | |
| Private copy constructor to enforce EnumerationNumeric storage by reference. More... | |
Private Attributes | |
| unsigned int | mID |
| The identifier. More... | |
This class represents a type-safe Enumeration pattern.
It allows one to also enumerate an Enumeration thus looking up values in a list fashion. Unlike EnumerationString, EnumerationNumeric also stores an integer value with each Enum.
Definition at line 45 of file EnumerationNumeric.h.
/ Adds an easy and swappable access to the base class.
Definition at line 49 of file EnumerationNumeric.h.
|
protected |
ctor Protected to prevent creation of an instance.
| name | The name. |
| orderId | Identifier for the order. |
Definition at line 27 of file EnumerationNumeric.cpp.
|
protected |
dtor.
Definition at line 62 of file EnumerationNumeric.cpp.
|
private |
Private copy constructor to enforce EnumerationNumeric storage by reference.
| parameter1 | The first parameter. |
| unsigned int trUtil::EnumerationNumeric::GetID | ( | ) | const |
Returns the Numeric value of the Enum.
Definition at line 67 of file EnumerationNumeric.cpp.
References mID.
Referenced by trManager::DirectorBase::CompareComponentPriority(), and trUtil::operator<<().

|
inline |
Inequality test for an EnumerationNumeric.
This comparison option takes in an unsigned integer. Inlined because it's called frequently.
| id | The identifier. |
Definition at line 85 of file EnumerationNumeric.h.
|
inline |
Inequality test for an EnumerationNumeric.
This comparison option takes in an EnumerationNumeric. Inlined because it's called frequently.
| e | The EnumerationNumeric to process. |
Definition at line 175 of file EnumerationNumeric.h.
References trUtil::operator!=(), and trUtil::operator==().

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

|
inline |
Less than test for an EnumerationNumeric.
This comparison option takes in an unsigned integer. Inlined because it's called frequently.
| id | The identifier. |
Definition at line 115 of file EnumerationNumeric.h.
|
inline |
Less than test for an EnumerationNumeric.
This comparison option takes in an EnumerationNumeric. Inlined because it's called frequently.
| e | The EnumerationNumeric to process. |
Definition at line 145 of file EnumerationNumeric.h.
References mID.
| bool trUtil::EnumerationNumeric::operator< | ( | const std::string & | rhs | ) | const |
Overloaded less than test for this EnumerationNumeric's string value.
| rhs | The right hand side. |
Definition at line 50 of file EnumerationNumeric.cpp.
References trUtil::EnumerationString::Compare().

|
private |
Private assignment operator to enforce EnumerationNumeric storage by reference.
| parameter1 | The first parameter. |
Definition at line 32 of file EnumerationNumeric.cpp.
|
inline |
Equality test for an EnumerationNumeric.
This comparison option takes in an unsigned integer. Inlined because it's called frequently.
| id | The identifier. |
Definition at line 70 of file EnumerationNumeric.h.
|
inline |
Equality test for an EnumerationNumeric.
This comparison option takes in an EnumerationNumeric. Inlined because it's called frequently.
| e | The EnumerationNumeric to process. |
Definition at line 160 of file EnumerationNumeric.h.
| bool trUtil::EnumerationNumeric::operator== | ( | const std::string & | rhs | ) | const |
Overloaded string compare operator for the EnumerationNumeric.
This will compare the string to this EnumerationNumeric getName() value.
| rhs | . |
Definition at line 38 of file EnumerationNumeric.cpp.
References trUtil::EnumerationString::Compare().

|
inline |
Greater than test for an EnumerationNumeric.
This comparison option takes in an unsigned integer. Inlined because it's called frequently.
| id | The identifier. |
Definition at line 100 of file EnumerationNumeric.h.
|
inline |
Greater than test for an EnumerationNumeric.
This comparison option takes in an EnumerationNumeric. Inlined because it's called frequently.
| e | The EnumerationNumeric to process. |
Definition at line 130 of file EnumerationNumeric.h.
References mID.
| bool trUtil::EnumerationNumeric::operator> | ( | const std::string & | rhs | ) | const |
Overloaded greater than test for this EnumerationNumeric's string value.
| rhs | The right hand side. |
Definition at line 56 of file EnumerationNumeric.cpp.
References trUtil::EnumerationString::Compare().

|
private |
The identifier.
Definition at line 249 of file EnumerationNumeric.h.
Referenced by GetID(), operator<(), and operator>().