DART  6.10.1
dart::dynamics::TemplateBodyNodePtr< BodyNodeT > Class Template Reference

TemplateBodyNodePtr is a templated class that enables users to create a reference-counting BodyNodePtr. More...

#include <BodyNodePtr.hpp>

Public Member Functions

 TemplateBodyNodePtr ()
 Default constructor. More...
 
 TemplateBodyNodePtr (BodyNodeT *_ptr)
 Typical constructor. More...
 
 TemplateBodyNodePtr (const TemplateBodyNodePtr &_bnp)
 User defined copy-constructor. More...
 
template<class OtherBodyNodeT >
 TemplateBodyNodePtr (const TemplateBodyNodePtr< OtherBodyNodeT > &_bnp)
 Templated constructor for copying other BodyNodePtrs. More...
 
 ~TemplateBodyNodePtr ()
 Destructor. Releases the BodyNode reference before being destroyed. More...
 
TemplateBodyNodePtroperator= (const TemplateBodyNodePtr &bnp)
 User defined assignment operator. More...
 
template<class OtherBodyNodeT >
TemplateBodyNodePtroperator= (const TemplateBodyNodePtr< OtherBodyNodeT > &_bnp)
 Change the BodyNode that this BodyNodePtr references. More...
 
TemplateBodyNodePtroperator= (BodyNodeT *_ptr)
 Assignment operator. More...
 
 operator BodyNodeT * () const
 Implicit conversion. More...
 
BodyNodeT & operator* () const
 Dereferencing operator. More...
 
BodyNodeT * operator-> () const
 Dereferencing operation. More...
 
BodyNodeT * get () const
 Get the raw BodyNode pointer. More...
 
void set (BodyNodeT *_ptr)
 Set the BodyNode for this BodyNodePtr. More...
 

Private Attributes

BodyNodeT * mPtr
 Raw pointer for the BodyNode that this BodyNodePtr references. More...
 

Detailed Description

template<class BodyNodeT>
class dart::dynamics::TemplateBodyNodePtr< BodyNodeT >

TemplateBodyNodePtr is a templated class that enables users to create a reference-counting BodyNodePtr.

Holding onto a BodyNodePtr will ensure that the BodyNode (and by extension, its Skeleton) does not get deleted. This remains true even if the BodyNode is moved into another Skeleton.

Constructor & Destructor Documentation

◆ TemplateBodyNodePtr() [1/4]

template<class BodyNodeT >
dart::dynamics::TemplateBodyNodePtr< BodyNodeT >::TemplateBodyNodePtr ( )
inline

Default constructor.

◆ TemplateBodyNodePtr() [2/4]

template<class BodyNodeT >
dart::dynamics::TemplateBodyNodePtr< BodyNodeT >::TemplateBodyNodePtr ( BodyNodeT *  _ptr)
inline

Typical constructor.

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

◆ TemplateBodyNodePtr() [3/4]

template<class BodyNodeT >
dart::dynamics::TemplateBodyNodePtr< BodyNodeT >::TemplateBodyNodePtr ( const TemplateBodyNodePtr< BodyNodeT > &  _bnp)
inline

User defined copy-constructor.

◆ TemplateBodyNodePtr() [4/4]

template<class BodyNodeT >
template<class OtherBodyNodeT >
dart::dynamics::TemplateBodyNodePtr< BodyNodeT >::TemplateBodyNodePtr ( const TemplateBodyNodePtr< OtherBodyNodeT > &  _bnp)
inline

Templated constructor for copying other BodyNodePtrs.

◆ ~TemplateBodyNodePtr()

template<class BodyNodeT >
dart::dynamics::TemplateBodyNodePtr< BodyNodeT >::~TemplateBodyNodePtr ( )
inline

Destructor. Releases the BodyNode reference before being destroyed.

Member Function Documentation

◆ get()

template<class BodyNodeT >
BodyNodeT* dart::dynamics::TemplateBodyNodePtr< BodyNodeT >::get ( ) const
inline

Get the raw BodyNode pointer.

◆ operator BodyNodeT *()

template<class BodyNodeT >
dart::dynamics::TemplateBodyNodePtr< BodyNodeT >::operator BodyNodeT * ( ) const
inline

Implicit conversion.

◆ operator*()

template<class BodyNodeT >
BodyNodeT& dart::dynamics::TemplateBodyNodePtr< BodyNodeT >::operator* ( ) const
inline

Dereferencing operator.

◆ operator->()

template<class BodyNodeT >
BodyNodeT* dart::dynamics::TemplateBodyNodePtr< BodyNodeT >::operator-> ( ) const
inline

Dereferencing operation.

◆ operator=() [1/3]

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

Assignment operator.

◆ operator=() [2/3]

template<class BodyNodeT >
TemplateBodyNodePtr& dart::dynamics::TemplateBodyNodePtr< BodyNodeT >::operator= ( const TemplateBodyNodePtr< BodyNodeT > &  bnp)
inline

User defined assignment operator.

◆ operator=() [3/3]

template<class BodyNodeT >
template<class OtherBodyNodeT >
TemplateBodyNodePtr& dart::dynamics::TemplateBodyNodePtr< BodyNodeT >::operator= ( const TemplateBodyNodePtr< OtherBodyNodeT > &  _bnp)
inline

Change the BodyNode that this BodyNodePtr references.

◆ set()

template<class BodyNodeT >
void dart::dynamics::TemplateBodyNodePtr< BodyNodeT >::set ( BodyNodeT *  _ptr)
inline

Set the BodyNode for this BodyNodePtr.

Member Data Documentation

◆ mPtr

template<class BodyNodeT >
BodyNodeT* dart::dynamics::TemplateBodyNodePtr< BodyNodeT >::mPtr
private

Raw pointer for the BodyNode that this BodyNodePtr references.