DART
6.7.3
|
TemplateNodePtr is a templated class that enables users to create a strong reference-counting NodePtr. More...
#include <NodePtr.hpp>
Public Types | |
using | element_type = NodeT |
Public Member Functions | |
TemplateNodePtr () | |
Default constructor. More... | |
TemplateNodePtr (NodeT *_ptr) | |
Typical constructor. More... | |
template<class OtherNodeT , class OtherBodyNodeT > | |
TemplateNodePtr (const TemplateNodePtr< OtherNodeT, OtherBodyNodeT > &_ptr) | |
Constructor that takes in a strong NodePtr. More... | |
TemplateNodePtr & | operator= (NodeT *_ptr) |
Assignment operator. More... | |
template<class OtherNodeT , class OtherBodyNodeT > | |
TemplateNodePtr & | operator= (const TemplateNodePtr< OtherNodeT, OtherBodyNodeT > &_ptr) |
Assignment operator for NodePtrs. More... | |
operator NodeT * () const | |
Implicit conversion. More... | |
NodeT & | operator* () const |
Dereferencing operator. More... | |
NodeT * | operator-> () const |
Dereferencing operation. More... | |
NodeT * | get () const |
Get the raw Node pointer. More... | |
void | set (NodeT *_ptr) |
Set the Node for this NodePtr. More... | |
Protected Attributes | |
NodeT * | mNode |
Node that this NodePtr refers to. More... | |
std::shared_ptr< NodeDestructor > | mDestructor |
Hold onto a shared_ptr to the Node's Destructor to make sure the Node stays alive. More... | |
TemplateBodyNodePtr< BodyNodeT > | mBodyNodePtr |
Hold onto a BodyNodePtr to the Node's associated BodyNode to make sure that the BodyNode stays alive. More... | |
Friends | |
template<class , class > | |
class | TemplateNodePtr |
TemplateNodePtr is a templated class that enables users to create a strong reference-counting NodePtr.
Holding onto a NodePtr will ensure that the BodyNode associated with a Node does not get deleted, and it will also ensure that the Node itself does not get deleted. This templated class can be applied to any class that inherits from dart::dynamics::Node.
using dart::dynamics::TemplateNodePtr< NodeT, BodyNodeT >::element_type = NodeT |
|
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 strong NodePtr.
|
inline |
Get the raw Node pointer.
|
inline |
Implicit conversion.
|
inline |
Dereferencing operator.
|
inline |
Dereferencing operation.
|
inline |
Assignment operator for NodePtrs.
|
inline |
Assignment operator.
|
inline |
Set the Node for this NodePtr.
|
friend |
|
protected |
|
protected |
|
protected |
Node that this NodePtr refers to.