DART 6.7.3
|
TemplateDegreeOfFreedomPtr is a templated class that enables users to create a reference-counting DegreeOfFreedomPtr. More...
#include <DegreeOfFreedomPtr.hpp>
Public Member Functions | |
TemplateDegreeOfFreedomPtr ()=default | |
Default constructor. | |
TemplateDegreeOfFreedomPtr (DegreeOfFreedomT *_ptr) | |
Typical constructor. | |
template<class OtherDegreeOfFreedomT , class OtherBodyNodeT > | |
TemplateDegreeOfFreedomPtr (const TemplateDegreeOfFreedomPtr< OtherDegreeOfFreedomT, OtherBodyNodeT > &_dofp) | |
Constructor that takes in a strong DegreeOfFreedomPtrs. | |
TemplateDegreeOfFreedomPtr & | operator= (DegreeOfFreedomT *_ptr) |
Assignment operator. | |
template<class OtherDegreeOfFreedomT , class OtherBodyNodeT > | |
TemplateDegreeOfFreedomPtr & | operator= (const TemplateDegreeOfFreedomPtr< OtherDegreeOfFreedomT, OtherBodyNodeT > &_dofp) |
Assignment operator for DegreeOfFreedomPtrs. | |
operator DegreeOfFreedomT * () const | |
Implicit conversion. | |
DegreeOfFreedomT & | operator* () const |
Dereferencing operator. | |
DegreeOfFreedomT * | operator-> () const |
Dereferencing operation. | |
DegreeOfFreedomT * | get () const |
Get the raw DegreeOfFreedom pointer. | |
TemplateBodyNodePtr< BodyNodeT > | getBodyNodePtr () const |
Get the BodyNode that this DegreeOfFreedomPtr is tied to. | |
std::size_t | getLocalIndex () const |
Get the local generalized coordinate index that this DegreeOfFreedomPtr is tied to. | |
void | set (DegreeOfFreedomT *_ptr) |
Set the DegreeOfFreedom for this DegreeOfFreedomPtr. | |
Comparison operators | |
template<class OtherDofT , class OtherBodyNodeT > | |
bool | operator== (const TemplateDegreeOfFreedomPtr< OtherDofT, OtherBodyNodeT > &_rhs) const |
Equality. | |
template<class OtherDofT , class OtherBodyNodeT > | |
bool | operator!= (const TemplateDegreeOfFreedomPtr< OtherDofT, OtherBodyNodeT > &_rhs) const |
Inequality. | |
template<class OtherDofT , class OtherBodyNodeT > | |
bool | operator< (const TemplateDegreeOfFreedomPtr< OtherDofT, OtherBodyNodeT > &_rhs) const |
Less than. | |
template<class OtherDofT , class OtherBodyNodeT > | |
bool | operator> (const TemplateDegreeOfFreedomPtr< OtherDofT, OtherBodyNodeT > &_rhs) const |
Greater than. | |
template<class OtherDofT , class OtherBodyNodeT > | |
bool | operator<= (const TemplateDegreeOfFreedomPtr< OtherDofT, OtherBodyNodeT > &_rhs) const |
Less than or equal to. | |
template<class OtherDofT , class OtherBodyNodeT > | |
bool | operator>= (const TemplateDegreeOfFreedomPtr< OtherDofT, OtherBodyNodeT > &_rhs) const |
Greater than or equal to. | |
Private Attributes | |
TemplateBodyNodePtr< BodyNodeT > | mBodyNodePtr |
Reference-holding pointer to the child BodyNode of this DegreeOfFreedom. | |
std::size_t | mIndex |
Local index of this DegreeOfFreedom within its Joint. | |
Friends | |
template<class , class > | |
class | TemplateDegreeOfFreedomPtr |
TemplateDegreeOfFreedomPtr is a templated class that enables users to create a reference-counting DegreeOfFreedomPtr.
Holding onto a DegreeOfFreedomPtr will ensure that the BodyNode (and by extension, Skeleton) corresponding to a DegreeOfFreedom does not get deleted. However, the DegreeOfFreedom itself will be deleted if the parent Joint of the BodyNode is changed to a Joint type that has a small number of DegreesOfFreedom than the local of the DegreeOfFreedom that this DegreeOfFreedomPtr referred to. In such a case, this will trigger and assertion in debug mode, or have a nullptr value if not in debug mode.
|
default |
Default constructor.
|
inline |
Typical constructor.
_ptr must be a valid pointer (or a nullptr) when passed to this constructor
|
inline |
Constructor that takes in a strong DegreeOfFreedomPtrs.
|
inline |
Get the raw DegreeOfFreedom pointer.
|
inline |
Get the BodyNode that this DegreeOfFreedomPtr is tied to.
|
inline |
Get the local generalized coordinate index that this DegreeOfFreedomPtr is tied to.
|
inline |
Implicit conversion.
|
inline |
Inequality.
|
inline |
Dereferencing operator.
|
inline |
Dereferencing operation.
|
inline |
Less than.
|
inline |
Less than or equal to.
|
inline |
Assignment operator for DegreeOfFreedomPtrs.
|
inline |
Assignment operator.
|
inline |
Equality.
|
inline |
Greater than.
|
inline |
Greater than or equal to.
|
inline |
Set the DegreeOfFreedom for this DegreeOfFreedomPtr.
|
friend |
|
private |
Reference-holding pointer to the child BodyNode of this DegreeOfFreedom.
|
private |
Local index of this DegreeOfFreedom within its Joint.