|
VR-Engage
2.2
|
This class provides a foundation for objects that need to be managed by shared pointers. It includes self-referencing mechanisms, type information, and naming functionality.
#include <baseClass.h>
Public Types | |
| using | Ptr = DtSpObject* |
| using | Sptr = std::shared_ptr<DtSpObject> |
| using | Wptr = std::weak_ptr<DtSpObject> |
Public Member Functions | |
| DtSpObject () | |
| virtual | ~DtSpObject () |
| Sptr | self () |
| virtual std::string | type () const =0 |
| virtual void | setName (const std::string &name) |
| virtual std::string | name () const |
Static Public Member Functions | |
| template<class AS_T> | |
| static std::shared_ptr< AS_T > | cast (Sptr p) |
| template<class AS_T> | |
| static std::shared_ptr< AS_T > | unsafe_cast (Sptr p) |
Protected Attributes | |
| std::string | myName |
Private Attributes | |
| Wptr | mySelf |
| using makVre::DtSpObject::Ptr = DtSpObject* |
Raw pointer type alias.
| using makVre::DtSpObject::Sptr = std::shared_ptr<DtSpObject> |
Shared pointer type alias.
| using makVre::DtSpObject::Wptr = std::weak_ptr<DtSpObject> |
Weak pointer type alias.
|
inline |
Default constructor.
|
inlinevirtual |
Virtual destructor.
|
inline |
Gets a shared pointer to this object.
If the weak reference to self is expired, creates a new shared pointer; otherwise returns the existing shared pointer
References mySelf.
|
inlinestatic |
Safely casts a base shared pointer to a derived type.
| p | The base shared pointer to cast |
Referenced by makVre::DtCigiPublisherTemplate< CIGI_T, SELF_T, SUPER_T, DATA_CREATOR_T >::verifySharedType().
|
inlinestatic |
Performs an unsafe static cast of a shared pointer.
Use only when you are certain the object is of the target type
| p | The base shared pointer to cast |
|
pure virtual |
Gets the type of this object.
Implemented in makVre::DtSpSubClass< SELF_T, SUPER_T >, makVre::DtSpSubClass< DtCigiDataBase >, makVre::DtSpSubClass< DtCigiDataTemplate< CIGI_T, FRIEND_T >, DtCigiDataBase >, makVre::DtSpSubClass< DtCigiEntityPublisherBase, DtCigiPublisherBase >, makVre::DtSpSubClass< DtCigiEntityUnpublisher, DtCigiPublisherBase >, makVre::DtSpSubClass< DtCigiEntityUnpublisherV4, DtCigiEntityUnpublisher >, makVre::DtSpSubClass< DtCigiFxPositionPublisher, DtCigiPublisherBase >, makVre::DtSpSubClass< DtCigiFxPositionPublisherV4, DtCigiFxPositionPublisher >, makVre::DtSpSubClass< DtCigiFxPublisher, DtCigiEntityPublisherBase >, makVre::DtSpSubClass< DtCigiFxPublisherV4, DtCigiFxPublisher >, makVre::DtSpSubClass< DtCigiFxVelocityPublisher, DtCigiPublisherBase >, makVre::DtSpSubClass< DtCigiFxVelocityPublisherV4, DtCigiFxVelocityPublisher >, makVre::DtSpSubClass< DtCigiHost >, makVre::DtSpSubClass< DtCigiIgControlPublisher, DtCigiPublisherBase >, makVre::DtSpSubClass< DtCigiIgControlPublisherV4, DtCigiIgControlPublisher >, makVre::DtSpSubClass< DtCigiListenerBase, DtCigiObjectBase >, makVre::DtSpSubClass< DtCigiObjectBase >, makVre::DtSpSubClass< DtCigiPublisherBase, DtCigiObjectBase >, makVre::DtSpSubClass< DtCigiPublisherBase, DtTreeClass< DtCigiPublisherBase, DtCigiObjectBase > >, makVre::DtSpSubClass< DtCigiPublisherGroup, DtCigiPublisherBase >, makVre::DtSpSubClass< DtCigiSession >, makVre::DtSpSubClass< DtCigiSimEntityArtPartPublisher, DtCigiSimEntityComponentPublisherBase >, makVre::DtSpSubClass< DtCigiSimEntityArtPartPublisherV4, DtCigiSimEntityArtPartPublisher >, makVre::DtSpSubClass< DtCigiSimEntityComponentPublisherBase, DtCigiPublisherBase >, makVre::DtSpSubClass< DtCigiSimEntityPositionPublisher, DtCigiSimEntityComponentPublisherBase >, makVre::DtSpSubClass< DtCigiSimEntityPositionPublisherV4, DtCigiSimEntityPositionPublisher >, makVre::DtSpSubClass< DtCigiSimEntityPublisher, DtCigiSimObjectPublisherBase >, makVre::DtSpSubClass< DtCigiSimEntityPublisherV4, DtCigiSimEntityPublisher >, makVre::DtSpSubClass< DtCigiSimEntityVelocityPublisher, DtCigiSimEntityComponentPublisherBase >, makVre::DtSpSubClass< DtCigiSimEntityVelocityPublisherV4, DtCigiSimEntityVelocityPublisher >, makVre::DtSpSubClass< DtCigiSimObjectPublisherBase, DtCigiEntityPublisherBase >, makVre::DtSpSubClass< DtCigiStartOfFrameListener, DtCigiListenerBase >, makVre::DtSpSubClass< DtCigiStartOfFrameListenerV4, DtCigiStartOfFrameListener >, makVre::DtSpSubClass< DtCigiTimePublisher, DtCigiPublisherBase >, makVre::DtSpSubClass< DtCigiTimePublisherV4, DtCigiTimePublisher >, makVre::DtSpSubClass< DtCigiViewControlPublisher, DtCigiPublisherBase >, makVre::DtSpSubClass< DtCigiViewControlPublisherV4, DtCigiViewControlPublisher >, makVre::DtSpSubClass< DtCigiViewDefinitionPublisher, DtCigiPublisherBase >, makVre::DtSpSubClass< DtCigiViewDefinitionPublisherV4, DtCigiViewDefinitionPublisher >, makVre::DtSpSubClass< SELF_T, DtCigiListenerBase >, makVre::DtSpSubClass< SELF_T, DtCigiPublisherBase >, and makVre::DtSpSubClass< SELF_T, DtSpObject >.
|
inlinevirtual |
|
inlinevirtual |
Gets the name of this object.
References myName.
Referenced by makVre::DtCigiPublisherBase::addNewChild(), makVre::DtTreeClass< SELF_T, SUPER_T >::findChild(), setName(), makVre::DtSpSubClass< SELF_T, SUPER_T >::Type(), and makVre::DtSpSubClass< SELF_T, SUPER_T >::type().
|
protected |
|
private |
Weak pointer to self for shared_ptr management.
Referenced by self().