DART 6.11.1
|
TemplateWeakDegreeOfFreedomPtr is a templated class that enables users to create a non-reference-holding WeakDegreeOfFreedomPtr. More...
#include <DegreeOfFreedomPtr.hpp>
Public Member Functions | |
TemplateWeakDegreeOfFreedomPtr () | |
Default constructor. | |
TemplateWeakDegreeOfFreedomPtr (DegreeOfFreedomT *_ptr) | |
Typical constructor. | |
template<class OtherDofT , class OtherBodyNodeT > | |
TemplateWeakDegreeOfFreedomPtr (const TemplateWeakDegreeOfFreedomPtr< OtherDofT, OtherBodyNodeT > &_weakPtr) | |
Constructor that takes in a WeakDegreeOfFreedomPtr. | |
template<class OtherDofT , class OtherBodyNodeT > | |
TemplateWeakDegreeOfFreedomPtr (const TemplateDegreeOfFreedomPtr< OtherDofT, OtherBodyNodeT > &_strongPtr) | |
Constructor that takes in a strong DegreeOfFreedomPtr. | |
TemplateWeakDegreeOfFreedomPtr & | operator= (DegreeOfFreedomT *_ptr) |
Assignment operator for raw DegreeOfFreedom pointers. | |
template<class OtherDofT , class OtherBodyNodeT > | |
TemplateWeakDegreeOfFreedomPtr & | operator= (const TemplateWeakDegreeOfFreedomPtr< OtherDofT, OtherBodyNodeT > &_weakPtr) |
Assignemnt operator for WeakDegreeOfFreedomPtrs. | |
template<class OtherDofT , class OtherBodyNodeT > | |
TemplateWeakDegreeOfFreedomPtr & | operator= (const TemplateDegreeOfFreedomPtr< OtherDofT, OtherBodyNodeT > &_strongPtr) |
Assignment operator for strong DegreeOfFreedomPtrs. | |
TemplateDegreeOfFreedomPtr< DegreeOfFreedomT, BodyNodeT > | lock () const |
Locks the DegreeOfFreedom reference to ensure that the referenced DegreeOfFreedom is currently still available. | |
void | set (DegreeOfFreedomT *_ptr) |
Set the DegreeOfFreedom for this WeakDegreeOfFreedomPtr. | |
template<class OtherDofT , class OtherBodyNodeT > | |
void | set (const TemplateWeakDegreeOfFreedomPtr< OtherDofT, OtherBodyNodeT > &_weakPtr) |
Attempt to set the DegreeOfFreedom for this WeakDegreeOfFreedomPtr based on another WeakDegreeOfFreedomPtr. | |
Private Attributes | |
TemplateWeakBodyNodePtr< BodyNodeT > | mWeakBodyNode |
Weak 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 | TemplateWeakDegreeOfFreedomPtr |
TemplateWeakDegreeOfFreedomPtr is a templated class that enables users to create a non-reference-holding WeakDegreeOfFreedomPtr.
Holding onto a WeakDegreeOfFreedomPtr will NOT prevent anything from getting deleted, but you can use lock() to check whether the DegreeOfFreedom still exists. If it does exist, it will return a valid strong DegreeOfFreedomPtr. Otherwise it will return a nullptr DegreeOfFreedomPtr.
|
inline |
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 WeakDegreeOfFreedomPtr.
|
inline |
Constructor that takes in a strong DegreeOfFreedomPtr.
|
inline |
Locks the DegreeOfFreedom reference to ensure that the referenced DegreeOfFreedom is currently still available.
If the DegreeOfFreedom is not available any longer (i.e. has been deleted), then this will return a nullptr.
|
inline |
Assignment operator for strong DegreeOfFreedomPtrs.
|
inline |
Assignemnt operator for WeakDegreeOfFreedomPtrs.
|
inline |
Assignment operator for raw DegreeOfFreedom pointers.
|
inline |
Attempt to set the DegreeOfFreedom for this WeakDegreeOfFreedomPtr based on another WeakDegreeOfFreedomPtr.
|
inline |
Set the DegreeOfFreedom for this WeakDegreeOfFreedomPtr.
|
friend |
|
private |
Local index of this DegreeOfFreedom within its Joint.
|
private |
Weak pointer to the child BodyNode of this DegreeOfFreedom.