|
AGXDynamics
2.31.1.0
|
A pointer to an agx::Object. More...
#include <Pointer.h>
Inheritance diagram for agx::Pointer:Public Types | |
| typedef agx::Event1< Value * > | Event |
| typedef agx::observer_ptr< const Event > | EventConstObserver |
| typedef agx::ref_ptr< const Event > | EventConstRef |
| typedef agx::observer_ptr< Event > | EventObserver |
| typedef agx::ref_ptr< Event > | EventRef |
Public Member Functions | |
| Pointer (const agx::Name &name, const agx::String &autoBindPath="") | |
| Pointer (const agx::Name &name, agx::Object *target, const agx::String &autoBindPath="") | |
| void | addListener (EventListener *listener) |
| AGX_DECLARE_VECTOR_TYPES (Event) | |
| template<typename T > | |
| T * | as () |
| Subclass casting. More... | |
| template<typename T > | |
| const T * | as () const |
| template<typename T > | |
| T * | asSafe () |
| Safe subclass casting, return nullptr if template type does not match. More... | |
| template<typename T > | |
| const T * | asSafe () const |
| virtual bool | bind (agx::Object *object) override |
| Bind the pointer to an object. More... | |
| void | bind (const agx::Path &path) |
| Set bind path which will auto-bind when resolved. More... | |
| void | bind (Value *binding) |
| Explicit binding, also disables auto-binding. More... | |
| virtual void | buildNavigationTree (agxJson::Value &eNode) const override |
| Value * | clone () const |
| virtual void | configure (TiXmlElement *ePointer) override |
| virtual void | configure (agx::TiXmlElement *eValue) override |
| agx::String | fullName () const |
| agx::String | fullPath () const |
| agx::String | fullPath (const agx::Object *root) const |
| Object * | get () |
| const Object * | get () const |
| template<typename T > | |
| T * | get () |
| template<typename T > | |
| const T * | get () const |
| agx::Object * | getAutoScopedResource (const agx::Path &path, agx::Model *model=nullptr) |
| const agx::Object * | getAutoScopedResource (const agx::Path &path, agx::Model *model=nullptr) const |
| template<typename T > | |
| T * | getAutoScopedResource (const agx::Path &path) |
| template<typename T > | |
| const T * | getAutoScopedResource (const agx::Path &path) const |
| Value * | getBinding () |
| const Value * | getBinding () const |
| const agx::Path & | getBindPath () const |
| agx::Object * | getContext () |
| const agx::Object * | getContext () const |
| template<typename T > | |
| T * | getContext () |
| template<typename T > | |
| const T * | getContext () const |
| virtual agxData::Data * | getData () |
| agxData::Format * | getFormat () |
| const agxData::Format * | getFormat () const |
| agx::UInt32 | getId () const |
| const agx::Name & | getImplementationName () const |
| agx::Model * | getModel () |
| const agx::Model * | getModel () const |
| const agx::Name & | getName () const |
| agx::Object * | getNextSibling () |
| const agx::Object * | getNextSibling () const |
| agx::Path | getPath () const |
| agx::Path | getPath (const agx::Object *root) const |
| int | getReferenceCount () const |
| agx::Object * | getResource (const agx::Path &path, agx::Model *model=nullptr) |
| const agx::Object * | getResource (const agx::Path &path, agx::Model *model=nullptr) const |
| template<typename T > | |
| T * | getResource (const agx::Path &path) |
| template<typename T > | |
| const T * | getResource (const agx::Path &path) const |
| Value * | getRootBinding () |
| const Value * | getRootBinding () const |
| agx::Object * | getRootContext () |
| const agx::Object * | getRootContext () const |
| agxData::Type * | getType () |
| const agxData::Type * | getType () const |
| bool | hasListener (EventListener *listener) |
| bool | hasParent (const agx::Object *node) const |
| template<typename T > | |
| bool | is () const |
| Subclass test. More... | |
| bool | isTypeCompatible (const Value *other) |
| bool | isUnique () const |
| bool | isValid () const |
| void | print () const |
| virtual void | printSubtree () const |
| const void * | ptr () const |
| void * | ptr () |
| virtual void | rebind () override |
| Rebind with the current auto-bind path. More... | |
| void | reference (void *ptr=nullptr) const |
| Explicitly increment the reference count by one, indicating that this object has another pointer which is referencing it. More... | |
| void | removeListener (EventListener *listener) |
| virtual void | save (agx::TiXmlElement *eParent) const override |
| virtual void | save (TiXmlElement *) const |
| void | set (const Value *other) |
| Explicitly set the value, removes active binding and disables autobinding. More... | |
| template<typename T > | |
| void | set (const T &value) |
| void | set (Value *other) |
| void | set (ValueRef &other) |
| void | set (const ValueRef &other) |
| virtual void | setContext (agx::Object *context) |
| void | setDefaultValue () |
| Set the default value of the format. More... | |
| void | setExpression (const agx::String &expression) |
| Configure value using an expression. More... | |
| void | setFormat (agxData::Format *format) |
| void | setId (UInt32 id) |
| void | setModel (agx::Model *model) |
| Set the object model (handled automatically). More... | |
| void | setName (const agx::Name &name) |
| Set the name of the object. More... | |
| template<typename T > | |
| void | signal (const T &value) |
| Wrapper for this->getRootBinding()->set() More... | |
| virtual void | snapshot (agx::TiXmlNode *eParent, const agx::String &directory) const override |
| virtual void | snapshot (TiXmlNode *, const String &) const |
| agx::String | toString () const |
| template<typename T > | |
| T | transform () const |
| void | unbind () |
| Unbind the pointer. More... | |
| void | unbind (bool removeAutoBindPath=true) |
| Unbind, also disables auto-binding. More... | |
| void | unreference (void *ptr=nullptr) const |
| Decrement the reference count by one, indicating that a pointer to this object is referencing it. More... | |
| void | unreference_nodelete () const |
| Decrement the reference count by one, indicating that a pointer to this object is referencing it. More... | |
Static Public Member Functions | |
| static agx::Model * | ClassModel () |
| static void | copy (Value *target, const Value *source) |
| static agx::String | generateName (const agx::String &bindPath) |
| static const HashSet< Object * > & | getActiveObjects () |
| static bool | getEnableRebind () |
| Should rebinding be allowed? Right now a global setting. More... | |
| static Pointer * | load (TiXmlElement *ePointer, Device *device) |
| static Value * | load (agx::TiXmlElement *eValue, agx::Device *device) |
| static Object * | load (const String &path, Device *device, const String &type="", size_t instance=0) |
| static Object * | load (const String &path, Device *device, const String &type, const String &attribute, const String &value) |
| static void | load (const String &path, Device *device, ObjectPtrVector &loadedObjects) |
| static TiXmlDocument | openDocument (const String &path) |
| static void | setEnableRebind (bool flag) |
| Sets if rebinding of objects should be allowed (Right now a global setting). More... | |
| template<typename T > | |
| static bool | ValidateCast (const Referenced *object) |
Public Attributes | |
| Event | updateEvent |
| Triggered when the value is updated. More... | |
Protected Member Functions | |
| virtual | ~Pointer () |
| void | allocateObserverVector () const |
| virtual bool | bind (Object *object) |
| void | deleteUsingDeleteHandler () const |
| virtual void | destroyCallback (agx::Object *object) override |
| void | forceRemove () |
| virtual Object * | getResourceImpl (const Path &path, agx::Model *model) override |
Static Protected Member Functions | |
| static DeleteHandler * | getDeleteHandler () |
| static void | setDeleteHandler (DeleteHandler *handler) |
| Internal: Set a DeleteHandler to which deletion of all referenced counted objects will be delegated to. More... | |
Protected Attributes | |
| agx::UInt32 | m_allocationIndex |
| ValueRef | m_binding |
| EventListener | m_bindingListener |
| agx::Path | m_bindPath |
| ValuePtrVector | m_children |
| EventDispatch | m_eventDispatch |
| FormatRef | m_format |
| Mutex | m_mutex |
| ObserverContainer | m_observers |
| AtomicValue | m_refCount |
| bool | m_restartIteration |
| AbstractScalar | m_value |
A pointer to an agx::Object.
The pointer itself is an object and can have a name and be inserted into the system hierarchy.
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
| agx::Pointer::Pointer | ( | const agx::Name & | name, |
| const agx::String & | autoBindPath = "" |
||
| ) |
| agx::Pointer::Pointer | ( | const agx::Name & | name, |
| agx::Object * | target, | ||
| const agx::String & | autoBindPath = "" |
||
| ) |
|
protectedvirtual |
|
inherited |
|
inherited |
|
protectedinherited |
|
inherited |
Subclass casting.
Template type must match actual type, dynamic_cast assertion will fail otherwise.
Referenced by agx::InternalData::get(), agxVehicle::Track::getNode(), agx::InternalData::getOrCreate(), and agx::InternalData::hasData().
|
inherited |
|
inherited |
Safe subclass casting, return nullptr if template type does not match.
Referenced by agxUtil::CollectBodiesAndWiresVisitor::visit().
|
inherited |
|
overridevirtual |
Bind the pointer to an object.
Set bind path which will auto-bind when resolved.
Explicit binding, also disables auto-binding.
|
protectedvirtualinherited |
|
overridevirtual |
Reimplemented from agxData::Value.
|
static |
|
inherited |
|
overridevirtual |
Reimplemented from agx::Object.
|
overridevirtualinherited |
|
protectedinherited |
|
overrideprotectedvirtual |
|
protectedinherited |
|
inherited |
|
inherited |
|
inherited |
|
staticinherited |
| Object * agx::Pointer::get | ( | ) |
| const T * agx::Pointer::get | ( | ) | const |
|
inherited |
|
inherited |
|
inherited |
Definition at line 428 of file Object.h.
References agx::Referenced::is().
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
virtualinherited |
|
staticprotectedinherited |
|
staticinherited |
Should rebinding be allowed? Right now a global setting.
|
inherited |
Definition at line 381 of file Value.h.
Referenced by agxData::ValueT< agx::Real >::ValidateCast().
|
inherited |
|
inherited |
Definition at line 370 of file Object.h.
Referenced by agxData::EntityStorage::indexToId().
|
inherited |
|
inherited |
|
inherited |
Definition at line 369 of file Object.h.
Referenced by agxData::EntityStorage::get(), agxData::FormatBinding< T >::getFormat(), and agxData::EntityPtr::operator()().
|
inherited |
|
inherited |
|
inherited |
Referenced by agxData::EntityStorage::dereferenceMultipliedAttribute(), and agxData::EntityInstance::verifyIndex().
|
inherited |
| root | A node along the parent path from this object. |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
Definition at line 414 of file Object.h.
References agx::Referenced::is().
|
inherited |
|
overrideprotectedvirtual |
Reimplemented from agx::Object.
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
Subclass test.
Referenced by agx::Object::getAutoScopedResource(), agxData::EntityStorage::getInstances(), and agx::Object::getResource().
|
inherited |
|
inherited |
|
staticinherited |
|
staticinherited |
|
staticinherited |
|
staticinherited |
|
staticinherited |
|
inherited |
|
inlinevirtualinherited |
Reimplemented in agx::Component.
|
inherited |
|
overridevirtualinherited |
Rebind with the current auto-bind path.
Reimplemented from agx::Object.
Reimplemented in agxData::FunctionValue.
Explicitly increment the reference count by one, indicating that this object has another pointer which is referencing it.
This method should be used with care, always balanced with the same number of calls to unreference.
|
inherited |
|
overridevirtualinherited |
|
inlinevirtualinherited |
Reimplemented in agx::Clock.
Explicitly set the value, removes active binding and disables autobinding.
|
inherited |
Definition at line 356 of file Value.h.
References agxAssert, and agxCore::isShutdown().
Definition at line 345 of file Value.h.
References agx::ref_ptr< T >::get().
Definition at line 350 of file Value.h.
References agx::ref_ptr< T >::get().
|
virtualinherited |
Reimplemented in agx::Task, and agxData::FunctionValue.
|
inherited |
Set the default value of the format.
|
staticprotectedinherited |
Internal: Set a DeleteHandler to which deletion of all referenced counted objects will be delegated to.
|
staticinherited |
Sets if rebinding of objects should be allowed (Right now a global setting).
Allowing it when adding larger parts to the system tree might hit performance, so it might be smarter to disable it first, then add, and then enable again.
|
inherited |
Configure value using an expression.
Internal use only, deprecated syntax.
|
inherited |
|
inherited |
Set the object model (handled automatically).
|
inherited |
Wrapper for this->getRootBinding()->set()
|
overridevirtualinherited |
Reimplemented in agx::Component.
Definition at line 106 of file Object.h.
References agx::getModel(), and agx::root().
|
inherited |
|
inlineinherited |
Definition at line 333 of file Value.h.
References agxData::transform().
Referenced by agxOSG::CameraSynchronization::operator()().
| void agx::Pointer::unbind | ( | ) |
Unbind the pointer.
|
inherited |
Unbind, also disables auto-binding.
Decrement the reference count by one, indicating that a pointer to this object is referencing it.
If the reference count goes to zero, it is assumed that this object is no longer referenced and is automatically deleted.
This method should be used with care, always balanced with the same number of calls to reference.
Referenced by agxData::EntityRef< ContactMaterialPtr >::~EntityRef().
|
inherited |
Decrement the reference count by one, indicating that a pointer to this object is referencing it.
However, do not delete it, even if ref count goes to 0. Warning, unref_nodelete() should only be called if the user knows exactly who will be responsible for, one should prefer unref() over unref_nodelete() as the later can lead to memory leaks.
|
staticinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
mutableprotectedinherited |
Definition at line 240 of file Referenced.h.
|
mutableprotectedinherited |
Definition at line 239 of file Referenced.h.
|
mutableprotectedinherited |
Definition at line 241 of file Referenced.h.
|
inherited |