![]() |
VR-Forces Developer's Guide
|
The DtSimObjectReferenceTemplate is a shared pointer that can be used amongst many object for access to the underlying DtStateDataWrapper subclass. The operators will assert if the object is not valid, or, you can check the isValid() method before calling if you are unsure. An object will be invalid if it has been deleted.

Static Public Member Functions | |
| static DtSimObjectReferenceTemplate | nullReference () |
Protected Attributes | |
| std::shared_ptr< const DtStateDataWrapper > | mySimObject |
|
inline |
Default-constructs a null (invalid) reference.
| makVrf::DtSimObjectReferenceTemplate< T_BaseClass >::DtSimObjectReferenceTemplate | ( | const DtSimObjectReferenceTemplate< T_BaseClass > & | o | ) |
Copy constructor; shares ownership of the underlying object.
| o | Reference to copy from. |
| makVrf::DtSimObjectReferenceTemplate< T_BaseClass >::DtSimObjectReferenceTemplate | ( | const DtStateDataWrapper * | o | ) |
Constructs a reference wrapping the given state-data object.
| o | Raw pointer to the DtStateDataWrapper to observe. |
|
virtual |
Destructor.
| DtSimObjectReferenceTemplate& makVrf::DtSimObjectReferenceTemplate< T_BaseClass >::operator= | ( | const DtStateDataWrapper * | rhs | ) |
Assigns a new raw state-data pointer to this reference.
| rhs | Raw pointer to the DtStateDataWrapper to observe. |
| DtSimObjectReferenceTemplate& makVrf::DtSimObjectReferenceTemplate< T_BaseClass >::operator= | ( | const DtSimObjectReferenceTemplate< T_BaseClass > & | rhs | ) |
Copy-assigns another reference; shares ownership of the underlying object.
| rhs | Reference to assign from. |
| const T_BaseClass* makVrf::DtSimObjectReferenceTemplate< T_BaseClass >::operator-> | ( | ) | const |
Member-access operator; asserts if the reference is not valid.
| const T_BaseClass* makVrf::DtSimObjectReferenceTemplate< T_BaseClass >::operator* | ( | ) | const |
Dereference operator; asserts if the reference is not valid.
|
inline |
Implicit conversion to a const T_BaseClass pointer.
References makVrf::DtSimObjectReferenceTemplate< T_BaseClass >::mySimObject.
| const DtUUID& makVrf::DtSimObjectReferenceTemplate< T_BaseClass >::uuid | ( | ) | const |
Returns the UUID of the referenced object, or a null UUID if invalid.
Referenced by std::hash< DtSimObjectReference >::operator()(), and std::hash< makVrf::DtSimObjectReference >::operator()().
| DtEntityType makVrf::DtSimObjectReferenceTemplate< T_BaseClass >::entityType | ( | ) | const |
Returns the DtEntityType of the referenced object, or a null DtEntityType if invalid.
| void makVrf::DtSimObjectReferenceTemplate< T_BaseClass >::reset | ( | ) |
Resets this reference to a null (invalid) state.
|
static |
Returns a null (invalid) reference suitable for default initialisation.
| bool makVrf::DtSimObjectReferenceTemplate< T_BaseClass >::operator< | ( | const DtSimObjectReferenceTemplate< T_BaseClass > & | rhs | ) | const |
Less-than comparison by UUID.
| rhs | Reference to compare against. |
Referenced by makVrf::DtSimObjectReferenceTemplate< DtSimObject >::operator>().
|
inline |
Greater-than comparison by UUID.
| rhs | Reference to compare against. |
| bool makVrf::DtSimObjectReferenceTemplate< T_BaseClass >::operator== | ( | const DtSimObjectReferenceTemplate< T_BaseClass > & | rhs | ) | const |
Equality comparison by UUID.
| rhs | Reference to compare against. |
Referenced by makVrf::DtSimObjectReferenceTemplate< DtSimObject >::operator>().
| bool makVrf::DtSimObjectReferenceTemplate< T_BaseClass >::operator< | ( | const DtUUID & | rhs | ) | const |
Less-than comparison against a UUID.
| rhs | UUID to compare against. |
|
inline |
Greater-than comparison against a UUID.
| rhs | UUID to compare against. |
| bool makVrf::DtSimObjectReferenceTemplate< T_BaseClass >::operator== | ( | const DtUUID & | rhs | ) | const |
Equality comparison against a UUID.
| rhs | UUID to compare against. |
| bool makVrf::DtSimObjectReferenceTemplate< T_BaseClass >::operator== | ( | const T_BaseClass * | rhs | ) | const |
Equality comparison against a raw pointer.
| rhs | Raw pointer to compare against. |
| makVrf::DtSimObjectReferenceTemplate< T_BaseClass >::operator DtUUID | ( | ) | const |
Implicit conversion to DtUUID; returns a null UUID if not valid.
| DtString makVrf::DtSimObjectReferenceTemplate< T_BaseClass >::objectName | ( | ) | const |
Returns the human-readable name of the referenced object.
| bool makVrf::DtSimObjectReferenceTemplate< T_BaseClass >::isValid | ( | ) | const |
Do not call the ->checkValidity() method to echk object validity as that could cause a crash if the object has been deleted. Only ever call the .isValid() member.
Referenced by makVrf::DtSetStatePropertyDialog::setupProperties().
| bool makVrf::DtSimObjectReferenceTemplate< T_BaseClass >::isDeleted | ( | ) | const |
Returns true if the underlying object has been deleted from the simulation.
|
protected |
Shared pointer to the underlying state-data object; null for an invalid reference.
Referenced by makVrf::DtSimObjectReferenceTemplate< T_BaseClass >::operator const T_BaseClass *().