TrueReality  v0.1.1912
trUtil::EnumerationPointer< T > Class Template Reference

EnumerationString Pointer class holds a reference to a passed in Enumeration. More...

#include <EnumerationString.h>

Inheritance diagram for trUtil::EnumerationPointer< T >:

Public Types

using element_type = T
 Type of the element. More...
 

Public Member Functions

 EnumerationPointer ()
 A constructor that creates and empty pointer. More...
 
 EnumerationPointer (T *ptr)
 A constructor that creates a pointer from a passed in EnumerationString. More...
 
 EnumerationPointer (const EnumerationPointer &rp)
 A constructor that creates a pointer from another EnumerationString Pointer. More...
 
template<class Other >
 EnumerationPointer (const EnumerationPointer< Other > &rp)
 A templated pointer constructor that can create an EnumerationString pointer from an EnumerationString pointer of a different type. More...
 
 ~EnumerationPointer ()
 Destructor. More...
 
 operator T* () const
 
 operator T & () const
 
EnumerationPointeroperator= (const EnumerationPointer &rp)
 Assignment by reference operator. More...
 
template<class Other >
EnumerationPointeroperator= (const EnumerationPointer< Other > &rp)
 Assignment by reference operator. More...
 
EnumerationPointeroperator= (T *ptr)
 Assignment from a pointer operator. More...
 
EnumerationPointeroperator= (T &enumRef)
 Assignment from a reference operator. More...
 
bool operator== (const EnumerationPointer &rp) const
 Comparison between two EnumerationPointers. More...
 
bool operator== (const T *ptr) const
 Comparison between EnumerationPointers and a pointer. More...
 
bool operator!= (const EnumerationPointer &rp) const
 Comparison between two EnumerationPointers. More...
 
bool operator!= (const T *ptr) const
 Comparison between EnumerationPointers and a pointer. More...
 
bool operator< (const EnumerationPointer &rp) const
 Overloaded less than test for this EnumerationString pointers's string value. More...
 
bool operator> (const EnumerationPointer &rp) const
 Overloaded greater than test for this EnumerationString pointers's string value. More...
 
T & operator* () const
 Pointer operator that returns a reference. More...
 
T * operator-> () const
 Pointer method access operator. More...
 
T * get () const
 Pointer access operator. More...
 
bool operator! () const
 The NOT operator. More...
 
bool valid () const
 Returns FALSE if the pointer is nullptr. More...
 
void swap (EnumerationPointer &rp)
 Swaps the internal object with the passed in. More...
 

Private Attributes

T * mEnum
 The enum. More...
 

Friends

bool operator== (const T *ptr, const EnumerationPointer &rp)
 Comparison between EnumerationPointer and a pointer. More...
 
bool operator!= (const T *ptr, const EnumerationPointer &rp)
 Comparison between EnumerationPointer and a pointer. More...
 

Detailed Description

template<typename T>
class trUtil::EnumerationPointer< T >

EnumerationString Pointer class holds a reference to a passed in Enumeration.

This is a container class for TR Enumerations.

Definition at line 313 of file EnumerationString.h.

Member Typedef Documentation

◆ element_type

template<typename T>
using trUtil::EnumerationPointer< T >::element_type = T

Type of the element.

Definition at line 317 of file EnumerationString.h.

Constructor & Destructor Documentation

◆ EnumerationPointer() [1/4]

template<typename T>
trUtil::EnumerationPointer< T >::EnumerationPointer ( )
inline

A constructor that creates and empty pointer.

Definition at line 324 of file EnumerationString.h.

◆ EnumerationPointer() [2/4]

template<typename T>
trUtil::EnumerationPointer< T >::EnumerationPointer ( T *  ptr)
inline

A constructor that creates a pointer from a passed in EnumerationString.

Parameters
[in,out]ptrIf non-null, the pointer.

Definition at line 335 of file EnumerationString.h.

◆ EnumerationPointer() [3/4]

template<typename T>
trUtil::EnumerationPointer< T >::EnumerationPointer ( const EnumerationPointer< T > &  rp)
inline

A constructor that creates a pointer from another EnumerationString Pointer.

Parameters
rpThe rp.

Definition at line 346 of file EnumerationString.h.

◆ EnumerationPointer() [4/4]

template<typename T>
template<class Other >
template< class Other > trUtil::EnumerationPointer< T >::EnumerationPointer ( const EnumerationPointer< Other > &  rp)
inline

A templated pointer constructor that can create an EnumerationString pointer from an EnumerationString pointer of a different type.

Template Parameters
OtherType of the other.
Parameters
rpThe rp.

Definition at line 359 of file EnumerationString.h.

◆ ~EnumerationPointer()

template<typename T>
trUtil::EnumerationPointer< T >::~EnumerationPointer ( )
inline

Destructor.

Definition at line 368 of file EnumerationString.h.

Member Function Documentation

◆ get()

template<typename T>
T * trUtil::EnumerationPointer< T >::get ( ) const
inline

Pointer access operator.

Returns
Null if it fails, else a pointer to a T.

Definition at line 607 of file EnumerationString.h.

◆ operator T &()

template<typename T>
trUtil::EnumerationPointer< T >::operator T& ( ) const
inline

Definition at line 392 of file EnumerationString.h.

◆ operator T*()

template<typename T>
trUtil::EnumerationPointer< T >::operator T* ( ) const
inline

Definition at line 380 of file EnumerationString.h.

◆ operator!()

template<typename T>
bool trUtil::EnumerationPointer< T >::operator! ( ) const
inline

The NOT operator.

Returns
The logical inverse of this value.

Definition at line 619 of file EnumerationString.h.

◆ operator!=() [1/2]

template<typename T>
bool trUtil::EnumerationPointer< T >::operator!= ( const EnumerationPointer< T > &  rp) const
inline

Comparison between two EnumerationPointers.

Parameters
rpThe rp.
Returns
True if the parameters are not considered equivalent.

Definition at line 514 of file EnumerationString.h.

◆ operator!=() [2/2]

template<typename T>
bool trUtil::EnumerationPointer< T >::operator!= ( const T *  ptr) const
inline

Comparison between EnumerationPointers and a pointer.

Parameters
ptrThe pointer.
Returns
True if the parameters are not considered equivalent.

Definition at line 528 of file EnumerationString.h.

◆ operator*()

template<typename T>
T & trUtil::EnumerationPointer< T >::operator* ( ) const
inline

Pointer operator that returns a reference.

Returns
The result of the operation.

Definition at line 583 of file EnumerationString.h.

◆ operator->()

template<typename T>
T * trUtil::EnumerationPointer< T >::operator-> ( ) const
inline

Pointer method access operator.

Returns
The dereferenced object.

Definition at line 595 of file EnumerationString.h.

◆ operator<()

template<typename T>
bool trUtil::EnumerationPointer< T >::operator< ( const EnumerationPointer< T > &  rp) const
inline

Overloaded less than test for this EnumerationString pointers's string value.

Parameters
rpThe rp.
Returns
True if the first parameter is less than the second.

Definition at line 557 of file EnumerationString.h.

◆ operator=() [1/4]

template<typename T>
EnumerationPointer & trUtil::EnumerationPointer< T >::operator= ( const EnumerationPointer< T > &  rp)
inline

Assignment by reference operator.

Parameters
rpThe rp.
Returns
A shallow copy of this object.

Definition at line 406 of file EnumerationString.h.

◆ operator=() [2/4]

template<typename T>
template<class Other >
template< class Other > EnumerationPointer & trUtil::EnumerationPointer< T >::operator= ( const EnumerationPointer< Other > &  rp)
inline

Assignment by reference operator.

Template Parameters
OtherType of the other.
Parameters
rpThe rp.
Returns
The result of the operation.

this.

Definition at line 422 of file EnumerationString.h.

◆ operator=() [3/4]

template<typename T>
EnumerationPointer & trUtil::EnumerationPointer< T >::operator= ( T *  ptr)
inline

Assignment from a pointer operator.

Parameters
[in,out]ptrIf non-null, the pointer.
Returns
A shallow copy of this object.

Definition at line 439 of file EnumerationString.h.

◆ operator=() [4/4]

template<typename T>
EnumerationPointer & trUtil::EnumerationPointer< T >::operator= ( T &  enumRef)
inline

Assignment from a reference operator.

Parameters
[in,out]enumRefThe enum reference.
Returns
A shallow copy of this object.

Definition at line 455 of file EnumerationString.h.

◆ operator==() [1/2]

template<typename T>
bool trUtil::EnumerationPointer< T >::operator== ( const EnumerationPointer< T > &  rp) const
inline

Comparison between two EnumerationPointers.

Parameters
rpThe rp.
Returns
True if the parameters are considered equivalent.

Definition at line 471 of file EnumerationString.h.

◆ operator==() [2/2]

template<typename T>
bool trUtil::EnumerationPointer< T >::operator== ( const T *  ptr) const
inline

Comparison between EnumerationPointers and a pointer.

Parameters
ptrThe pointer.
Returns
True if the parameters are considered equivalent.

Definition at line 485 of file EnumerationString.h.

◆ operator>()

template<typename T>
bool trUtil::EnumerationPointer< T >::operator> ( const EnumerationPointer< T > &  rp) const
inline

Overloaded greater than test for this EnumerationString pointers's string value.

Parameters
rpThe rp.
Returns
True if the first parameter is greater than to the second.

Definition at line 571 of file EnumerationString.h.

◆ swap()

template<typename T>
void trUtil::EnumerationPointer< T >::swap ( EnumerationPointer< T > &  rp)
inline

Swaps the internal object with the passed in.

Parameters
[in,out]rpThe rp.

Definition at line 643 of file EnumerationString.h.

◆ valid()

template<typename T>
bool trUtil::EnumerationPointer< T >::valid ( ) const
inline

Returns FALSE if the pointer is nullptr.

Returns
True if it succeeds, false if it fails.

Definition at line 631 of file EnumerationString.h.

Friends And Related Function Documentation

◆ operator!=

template<typename T>
bool operator!= ( const T *  ptr,
const EnumerationPointer< T > &  rp 
)
friend

Comparison between EnumerationPointer and a pointer.

Parameters
ptrThe first instance to compare.
rpThe second instance to compare.
Returns
True if the parameters are not considered equivalent.

Definition at line 543 of file EnumerationString.h.

◆ operator==

template<typename T>
bool operator== ( const T *  ptr,
const EnumerationPointer< T > &  rp 
)
friend

Comparison between EnumerationPointer and a pointer.

Parameters
ptrThe first instance to compare.
rpThe second instance to compare.
Returns
True if the parameters are considered equivalent.

Definition at line 500 of file EnumerationString.h.

Member Data Documentation

◆ mEnum


The documentation for this class was generated from the following file: