dart
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
dart::dynamics::SkeletonRefCountingBase Class Reference
Inheritance diagram for dart::dynamics::SkeletonRefCountingBase:
Inheritance graph
[legend]

Public Member Functions

std::shared_ptr< SkeletongetSkeleton ()
 Return the Skeleton this BodyNode belongs to.
 
std::shared_ptr< const SkeletongetSkeleton () const
 Return the (const) Skeleton this BodyNode belongs to.
 

Protected Member Functions

 SkeletonRefCountingBase ()
 Default Constructor.
 

Protected Attributes

std::weak_ptr< SkeletonmSkeleton
 Weak pointer to the Skeleton this BodyNode belongs to.
 
std::atomic< int > mReferenceCount
 Reference count for the number of BodyNodePtrs that are referring to this BodyNode.
 
std::shared_ptr< SkeletonmReferenceSkeleton
 If mReferenceCount is zero, then mReferenceSkeleton will hold a nullptr. More...
 
std::shared_ptr< MutexedWeakSkeletonPtrmLockedSkeleton
 Shared reference to a weak_ptr of this BodyNode's Skeleton, along with a mutex to ensure thread safety. More...
 

Friends

template<class >
class TemplateBodyNodePtr
 
template<class >
class TemplateWeakBodyNodePtr
 

Member Data Documentation

◆ mLockedSkeleton

std::shared_ptr<MutexedWeakSkeletonPtr> dart::dynamics::SkeletonRefCountingBase::mLockedSkeleton
protected

Shared reference to a weak_ptr of this BodyNode's Skeleton, along with a mutex to ensure thread safety.

This is used by WeakBodyNodePtrs to know when this BodyNode has expired.

◆ mReferenceSkeleton

std::shared_ptr<Skeleton> dart::dynamics::SkeletonRefCountingBase::mReferenceSkeleton
mutableprotected

If mReferenceCount is zero, then mReferenceSkeleton will hold a nullptr.

If mReferenceCount is greater than zero, then mReferenceSkeleton will hold a shared_ptr to the Skeleton that this BodyNode belongs to. This is to keep this BodyNode alive, so long as a BodyNodePtr that references it exists.


The documentation for this class was generated from the following files: