DART  6.10.1
dart::dynamics::TemplateJointPtr< JointT, BodyNodeT > Class Template Reference

TemplateJointPtr is a templated class that enables users to create a strong reference-counting JointPtr. More...

#include <JointPtr.hpp>

Public Types

typedef JointT element_type
 

Public Member Functions

 TemplateJointPtr ()=default
 Default constructor. More...
 
 TemplateJointPtr (JointT *_ptr)
 Typical constructor. More...
 
template<class OtherJointT , class OtherBodyNodeT >
 TemplateJointPtr (const TemplateJointPtr< OtherJointT, OtherBodyNodeT > &_jptr)
 Constructor that takes in a strong JointPtr. More...
 
TemplateJointPtroperator= (JointT *_ptr)
 Assignment operator. More...
 
template<class OtherJointT , class OtherBodyNodeT >
TemplateJointPtroperator= (const TemplateJointPtr< OtherJointT, OtherBodyNodeT > &_jptr)
 Assignment operator for JointPtrs. More...
 
 operator JointT * () const
 Implicit conversion. More...
 
JointT & operator* () const
 Dereferencing operator. More...
 
JointT * operator-> () const
 Dereferencing operation. More...
 
JointT * get () const
 Get the raw Joint pointer. More...
 
TemplateBodyNodePtr< BodyNodeT > getBodyNodePtr () const
 Get the BodyNode that this JointPtr is tied to. More...
 
void set (JointT *_ptr)
 Set the Joint for this JointPtr. More...
 
Comparison operators
template<class OtherJointT , class OtherBodyNodeT >
bool operator== (const TemplateJointPtr< OtherJointT, OtherBodyNodeT > &_rhs) const
 Equality. More...
 
template<class OtherJointT , class OtherBodyNodeT >
bool operator!= (const TemplateJointPtr< OtherJointT, OtherBodyNodeT > &_rhs) const
 Inequality. More...
 
template<class OtherJointT , class OtherBodyNodeT >
bool operator< (const TemplateJointPtr< OtherJointT, OtherBodyNodeT > &_rhs) const
 Less than. More...
 
template<class OtherJointT , class OtherBodyNodeT >
bool operator> (const TemplateJointPtr< OtherJointT, OtherBodyNodeT > &_rhs) const
 Greater than. More...
 
template<class OtherJointT , class OtherBodyNodeT >
bool operator<= (const TemplateJointPtr< OtherJointT, OtherBodyNodeT > &_rhs) const
 Less than or equal to. More...
 
template<class OtherJointT , class OtherBodyNodeT >
bool operator>= (const TemplateJointPtr< OtherJointT, OtherBodyNodeT > &_rhs) const
 Greater than or equal to. More...
 

Private Attributes

TemplateBodyNodePtr< BodyNodeT > mBodyNodePtr
 Reference-holding pointer to the child BodyNode of this Joint. More...
 

Friends

template<class , class >
class TemplateJointPtr
 

Detailed Description

template<class JointT, class BodyNodeT>
class dart::dynamics::TemplateJointPtr< JointT, BodyNodeT >

TemplateJointPtr is a templated class that enables users to create a strong reference-counting JointPtr.

Holding onto a JointPtr will ensure that the child BodyNode (and by extension, Skeleton) corresponding to a Joint does not get deleted. If the child BodyNode of this Joint replaces its parent Joint, then this smart pointer will reference the new parent Joint, because the old one will have been deleted.

Member Typedef Documentation

◆ element_type

template<class JointT , class BodyNodeT >
typedef JointT dart::dynamics::TemplateJointPtr< JointT, BodyNodeT >::element_type

Constructor & Destructor Documentation

◆ TemplateJointPtr() [1/3]

template<class JointT , class BodyNodeT >
dart::dynamics::TemplateJointPtr< JointT, BodyNodeT >::TemplateJointPtr ( )
default

Default constructor.

◆ TemplateJointPtr() [2/3]

template<class JointT , class BodyNodeT >
dart::dynamics::TemplateJointPtr< JointT, BodyNodeT >::TemplateJointPtr ( JointT *  _ptr)
inline

Typical constructor.

_ptr must be a valid pointer (or a nullptr) when passed to this constructor

◆ TemplateJointPtr() [3/3]

template<class JointT , class BodyNodeT >
template<class OtherJointT , class OtherBodyNodeT >
dart::dynamics::TemplateJointPtr< JointT, BodyNodeT >::TemplateJointPtr ( const TemplateJointPtr< OtherJointT, OtherBodyNodeT > &  _jptr)
inline

Constructor that takes in a strong JointPtr.

Member Function Documentation

◆ get()

template<class JointT , class BodyNodeT >
JointT* dart::dynamics::TemplateJointPtr< JointT, BodyNodeT >::get ( ) const
inline

Get the raw Joint pointer.

◆ getBodyNodePtr()

template<class JointT , class BodyNodeT >
TemplateBodyNodePtr<BodyNodeT> dart::dynamics::TemplateJointPtr< JointT, BodyNodeT >::getBodyNodePtr ( ) const
inline

Get the BodyNode that this JointPtr is tied to.

◆ operator JointT *()

template<class JointT , class BodyNodeT >
dart::dynamics::TemplateJointPtr< JointT, BodyNodeT >::operator JointT * ( ) const
inline

Implicit conversion.

◆ operator!=()

template<class JointT , class BodyNodeT >
template<class OtherJointT , class OtherBodyNodeT >
bool dart::dynamics::TemplateJointPtr< JointT, BodyNodeT >::operator!= ( const TemplateJointPtr< OtherJointT, OtherBodyNodeT > &  _rhs) const
inline

Inequality.

◆ operator*()

template<class JointT , class BodyNodeT >
JointT& dart::dynamics::TemplateJointPtr< JointT, BodyNodeT >::operator* ( ) const
inline

Dereferencing operator.

◆ operator->()

template<class JointT , class BodyNodeT >
JointT* dart::dynamics::TemplateJointPtr< JointT, BodyNodeT >::operator-> ( ) const
inline

Dereferencing operation.

◆ operator<()

template<class JointT , class BodyNodeT >
template<class OtherJointT , class OtherBodyNodeT >
bool dart::dynamics::TemplateJointPtr< JointT, BodyNodeT >::operator< ( const TemplateJointPtr< OtherJointT, OtherBodyNodeT > &  _rhs) const
inline

Less than.

◆ operator<=()

template<class JointT , class BodyNodeT >
template<class OtherJointT , class OtherBodyNodeT >
bool dart::dynamics::TemplateJointPtr< JointT, BodyNodeT >::operator<= ( const TemplateJointPtr< OtherJointT, OtherBodyNodeT > &  _rhs) const
inline

Less than or equal to.

◆ operator=() [1/2]

template<class JointT , class BodyNodeT >
template<class OtherJointT , class OtherBodyNodeT >
TemplateJointPtr& dart::dynamics::TemplateJointPtr< JointT, BodyNodeT >::operator= ( const TemplateJointPtr< OtherJointT, OtherBodyNodeT > &  _jptr)
inline

Assignment operator for JointPtrs.

◆ operator=() [2/2]

template<class JointT , class BodyNodeT >
TemplateJointPtr& dart::dynamics::TemplateJointPtr< JointT, BodyNodeT >::operator= ( JointT *  _ptr)
inline

Assignment operator.

◆ operator==()

template<class JointT , class BodyNodeT >
template<class OtherJointT , class OtherBodyNodeT >
bool dart::dynamics::TemplateJointPtr< JointT, BodyNodeT >::operator== ( const TemplateJointPtr< OtherJointT, OtherBodyNodeT > &  _rhs) const
inline

Equality.

◆ operator>()

template<class JointT , class BodyNodeT >
template<class OtherJointT , class OtherBodyNodeT >
bool dart::dynamics::TemplateJointPtr< JointT, BodyNodeT >::operator> ( const TemplateJointPtr< OtherJointT, OtherBodyNodeT > &  _rhs) const
inline

Greater than.

◆ operator>=()

template<class JointT , class BodyNodeT >
template<class OtherJointT , class OtherBodyNodeT >
bool dart::dynamics::TemplateJointPtr< JointT, BodyNodeT >::operator>= ( const TemplateJointPtr< OtherJointT, OtherBodyNodeT > &  _rhs) const
inline

Greater than or equal to.

◆ set()

template<class JointT , class BodyNodeT >
void dart::dynamics::TemplateJointPtr< JointT, BodyNodeT >::set ( JointT *  _ptr)
inline

Set the Joint for this JointPtr.

Friends And Related Function Documentation

◆ TemplateJointPtr

template<class JointT , class BodyNodeT >
template<class , class >
friend class TemplateJointPtr
friend

Member Data Documentation

◆ mBodyNodePtr

template<class JointT , class BodyNodeT >
TemplateBodyNodePtr<BodyNodeT> dart::dynamics::TemplateJointPtr< JointT, BodyNodeT >::mBodyNodePtr
private

Reference-holding pointer to the child BodyNode of this Joint.