DART  6.6.2
dart::dynamics::TemplateWeakInverseKinematicsPtr< InverseKinematicsT, JacobianNodePtrT > Class Template Reference

TemplateWeakInverseKinematicsPtr is a templated class that enables users to create a non-reference-holding WeakInverseKinematicsPtr. More...

#include <InverseKinematicsPtr.hpp>

Public Types

typedef InverseKinematicsT element_type
 

Public Member Functions

 TemplateWeakInverseKinematicsPtr ()=default
 Default constructor. More...
 
template<class PtrType >
 TemplateWeakInverseKinematicsPtr (const PtrType &_ptr)
 Constructor for various pointer types. More...
 
template<class PtrType >
TemplateWeakInverseKinematicsPtroperator= (const PtrType &_ptr)
 Assignment operator for various templated pointer types. More...
 
TemplateInverseKinematicsPtr< InverseKinematicsT, JacobianNodePtrT > lock () const
 Locks the InverseKinematics module to ensure that the referenced module is currently still available. More...
 
template<class OtherIkT , class OtherJacNodePtrT >
void set (const TemplateInverseKinematicsPtr< OtherIkT, OtherJacNodePtrT > &_ptr)
 Set using a strong pointer. More...
 
template<class OtherIkT , class OtherJacNodeT >
void set (const TemplateWeakInverseKinematicsPtr< OtherIkT, OtherJacNodeT > &_ptr)
 Set using a weak pointer. More...
 

Protected Attributes

std::weak_ptr< InverseKinematicsT > mWeakIK
 Weak pointer to the IK module. More...
 
JacobianNodePtrT mWeakJacNode
 Weak pointer to the JacobianNode. More...
 

Friends

template<class , class >
class TemplateWeakInverseKinematicsPtr
 

Detailed Description

template<class InverseKinematicsT, class JacobianNodePtrT>
class dart::dynamics::TemplateWeakInverseKinematicsPtr< InverseKinematicsT, JacobianNodePtrT >

TemplateWeakInverseKinematicsPtr is a templated class that enables users to create a non-reference-holding WeakInverseKinematicsPtr.

Holding onto a WeakInverseKinematicsPtr will NOT prevent anything from getting deleted, but you can use lock() to check whether the InverseKinematics module and its associated JacobianNode still exists.

Member Typedef Documentation

◆ element_type

template<class InverseKinematicsT , class JacobianNodePtrT >
typedef InverseKinematicsT dart::dynamics::TemplateWeakInverseKinematicsPtr< InverseKinematicsT, JacobianNodePtrT >::element_type

Constructor & Destructor Documentation

◆ TemplateWeakInverseKinematicsPtr() [1/2]

template<class InverseKinematicsT , class JacobianNodePtrT >
dart::dynamics::TemplateWeakInverseKinematicsPtr< InverseKinematicsT, JacobianNodePtrT >::TemplateWeakInverseKinematicsPtr ( )
default

Default constructor.

◆ TemplateWeakInverseKinematicsPtr() [2/2]

template<class InverseKinematicsT , class JacobianNodePtrT >
template<class PtrType >
dart::dynamics::TemplateWeakInverseKinematicsPtr< InverseKinematicsT, JacobianNodePtrT >::TemplateWeakInverseKinematicsPtr ( const PtrType &  _ptr)
inline

Constructor for various pointer types.

Member Function Documentation

◆ lock()

template<class InverseKinematicsT , class JacobianNodePtrT >
TemplateInverseKinematicsPtr<InverseKinematicsT, JacobianNodePtrT> dart::dynamics::TemplateWeakInverseKinematicsPtr< InverseKinematicsT, JacobianNodePtrT >::lock ( ) const
inline

Locks the InverseKinematics module to ensure that the referenced module is currently still available.

If the module is not available any longer (i.e. has been deleted), then this will return a nullptr.

◆ operator=()

template<class InverseKinematicsT , class JacobianNodePtrT >
template<class PtrType >
TemplateWeakInverseKinematicsPtr& dart::dynamics::TemplateWeakInverseKinematicsPtr< InverseKinematicsT, JacobianNodePtrT >::operator= ( const PtrType &  _ptr)
inline

Assignment operator for various templated pointer types.

◆ set() [1/2]

template<class InverseKinematicsT , class JacobianNodePtrT >
template<class OtherIkT , class OtherJacNodePtrT >
void dart::dynamics::TemplateWeakInverseKinematicsPtr< InverseKinematicsT, JacobianNodePtrT >::set ( const TemplateInverseKinematicsPtr< OtherIkT, OtherJacNodePtrT > &  _ptr)
inline

Set using a strong pointer.

◆ set() [2/2]

template<class InverseKinematicsT , class JacobianNodePtrT >
template<class OtherIkT , class OtherJacNodeT >
void dart::dynamics::TemplateWeakInverseKinematicsPtr< InverseKinematicsT, JacobianNodePtrT >::set ( const TemplateWeakInverseKinematicsPtr< OtherIkT, OtherJacNodeT > &  _ptr)
inline

Set using a weak pointer.

Friends And Related Function Documentation

◆ TemplateWeakInverseKinematicsPtr

template<class InverseKinematicsT , class JacobianNodePtrT >
template<class , class >
friend class TemplateWeakInverseKinematicsPtr
friend

Member Data Documentation

◆ mWeakIK

template<class InverseKinematicsT , class JacobianNodePtrT >
std::weak_ptr<InverseKinematicsT> dart::dynamics::TemplateWeakInverseKinematicsPtr< InverseKinematicsT, JacobianNodePtrT >::mWeakIK
protected

Weak pointer to the IK module.

◆ mWeakJacNode

template<class InverseKinematicsT , class JacobianNodePtrT >
JacobianNodePtrT dart::dynamics::TemplateWeakInverseKinematicsPtr< InverseKinematicsT, JacobianNodePtrT >::mWeakJacNode
protected

Weak pointer to the JacobianNode.