|
AGXDynamics
2.31.1.0
|
Templated value. More...
#include <Value.h>
Inheritance diagram for agxData::ValueT< T >: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 | |
| ValueT (const agx::Name &name) | |
| ValueT (const T &value=T()) | |
| ValueT (const agx::Name &name, const T &value) | |
| virtual | ~ValueT () |
| 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 |
| 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 (agx::TiXmlElement *eValue) override |
| virtual void | configure (TiXmlElement *) |
| agx::String | fullName () const |
| agx::String | fullPath () const |
| agx::String | fullPath (const agx::Object *root) const |
| 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 |
| virtual agx::Object * | getResourceImpl (const agx::Path &path, agx::Model *model) |
| 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 |
| operator const T & () const | |
| ValueT< T > & | operator= (const ValueT< T > &value) |
| ValueT< T > & | operator= (const T &value) |
| 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... | |
| void | set (Value *other) |
| void | set (ValueRef &other) |
| void | set (const ValueRef &other) |
| void | set (const T &value) |
| 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... | |
| void | signal (const T &value) |
| 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 (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 Value * | load (agx::TiXmlElement *eValue, agx::Device *device) |
| static Object * | load (TiXmlElement *eObject, 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 T2 > | |
| static bool | ValidateCast (const agx::Referenced *object) |
Public Attributes | |
| Event | updateEvent |
| Triggered when the value is updated. More... | |
Protected Member Functions | |
| void | allocateObserverVector () const |
| virtual bool | bind (Object *object) |
| void | deleteUsingDeleteHandler () const |
| void | forceRemove () |
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 |
Templated value.
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
| agxData::ValueT< T >::ValueT | ( | const agx::Name & | name | ) |
| agxData::ValueT< T >::ValueT | ( | const T & | value = T() | ) |
Definition at line 420 of file Value.h.
References agxData::ValueT< T >::set().
| agxData::ValueT< T >::ValueT | ( | const agx::Name & | name, |
| const T & | value | ||
| ) |
Definition at line 414 of file Value.h.
References agxData::ValueT< T >::set().
|
virtual |
|
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(), and agx::InternalData::getOrCreate().
|
inherited |
|
inherited |
Safe subclass casting, return nullptr if template type does not match.
Referenced by agxUtil::CollectBodiesAndWiresVisitor::visit().
|
inherited |
Set bind path which will auto-bind when resolved.
Explicit binding, also disables auto-binding.
|
protectedvirtualinherited |
|
overridevirtualinherited |
Reimplemented from agx::Object.
Reimplemented in agx::Pointer.
|
staticinherited |
|
inherited |
|
overridevirtualinherited |
|
inlinevirtualinherited |
|
protectedinherited |
|
protectedinherited |
Referenced by agxData::Val< UInt >::~Val().
|
inherited |
Referenced by agx::ScalarParameter::get(), agx::ArrayParameter::get(), agxData::Buffer::getArray(), and agxData::Buffer::getElement().
|
inherited |
|
inherited |
|
staticinherited |
| const T & agxData::ValueT< T >::get | ( | ) | const |
Definition at line 448 of file Value.h.
References agxAssertN, and agxData::Value::ptr().
Referenced by agx::Kernel::getNumWorkItems(), agxData::ValueT< T >::operator=(), and agxData::Val< UInt >::operator=().
|
staticinherited |
|
inherited |
Referenced by agx::Object::getAutoScopedResource().
|
inherited |
|
inherited |
Definition at line 428 of file Object.h.
References agx::Object::getAutoScopedResource(), and agx::Referenced::is().
|
inherited |
|
inherited |
Definition at line 383 of file Value.h.
References agxData::Value::m_binding.
|
inherited |
Definition at line 384 of file Value.h.
References agxData::Value::m_binding.
|
inherited |
Definition at line 391 of file Value.h.
References agxData::Value::m_bindPath.
|
inherited |
Definition at line 373 of file Object.h.
Referenced by agxData::Value::get(), and agx::Model::getNamespace().
|
inherited |
|
inherited |
|
virtualinherited |
|
staticprotectedinherited |
|
staticinherited |
Should rebinding be allowed? Right now a global setting.
|
inherited |
Definition at line 381 of file Value.h.
References agxData::Value::m_format.
Referenced by agxData::ValueT< T >::ValidateCast().
|
inherited |
Definition at line 382 of file Value.h.
References agxData::Value::m_format.
|
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::Value::get(), agxData::EntityStorage::get(), agxData::FormatBinding< T >::getFormat(), and agxData::EntityPtr::operator()().
|
inherited |
|
inherited |
|
inherited |
Referenced by agxData::EntityStorage::dereferenceMultipliedAttribute(), agx::ScalarParameter::get(), agx::ArrayParameter::get(), agx::PointerParameter::get(), agxData::EntityInstance::verifyIndex(), and agxData::EntityPtr::verifyIndex().
|
inherited |
| root | A node along the parent path from this object. |
|
inherited |
|
inherited |
Referenced by agx::Object::getResource().
|
inherited |
|
inherited |
Definition at line 414 of file Object.h.
References agx::Object::getResource(), and agx::Referenced::is().
|
inherited |
|
virtualinherited |
|
inherited |
Referenced by agxData::Value::signal().
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
Definition at line 376 of file Value.h.
References agxData::Value::m_format.
|
inherited |
|
inherited |
|
inherited |
Subclass test.
Referenced by agx::Object::getAutoScopedResource(), agxData::Buffer::getElement(), and agx::Object::getResource().
|
inherited |
|
inherited |
Definition at line 386 of file Value.h.
References agxData::Value::m_value, and agxData::Data::ptr().
Referenced by agxData::Value::get().
|
staticinherited |
|
staticinherited |
Definition at line 393 of file Object.h.
Referenced by agx::Object::load().
|
staticinherited |
Definition at line 379 of file Object.h.
References agx::Object::load().
|
staticinherited |
Definition at line 386 of file Object.h.
References agx::Object::load().
|
staticinherited |
|
staticinherited |
| agxData::ValueT< T >::operator const T & | ( | ) | const |
| ValueT< T > & agxData::ValueT< T >::operator= | ( | const ValueT< T > & | value | ) |
Definition at line 455 of file Value.h.
References agxData::ValueT< T >::get().
| ValueT< T > & agxData::ValueT< T >::operator= | ( | const T & | value | ) |
|
inherited |
|
inlinevirtualinherited |
Reimplemented in agx::Component.
|
inherited |
Definition at line 322 of file Value.h.
References agxData::Value::m_value, and agxData::Data::ptr().
Referenced by agxData::ValueT< T >::get().
|
inherited |
Definition at line 321 of file Value.h.
References agxData::Value::m_value, and agxData::Data::ptr().
|
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.
Referenced by agxData::Val< UInt >::Val().
|
inherited |
|
overridevirtualinherited |
|
inlinevirtualinherited |
Reimplemented in agx::Clock.
Explicitly set the value, removes active binding and disables autobinding.
Referenced by agxData::Value::set(), agxData::ValueT< T >::set(), and agxData::Value::signal().
Definition at line 340 of file Value.h.
References agxData::Value::set().
Definition at line 345 of file Value.h.
References agx::ref_ptr< T >::get(), and agxData::Value::set().
Definition at line 350 of file Value.h.
References agx::ref_ptr< T >::get(), and agxData::Value::set().
| void agxData::ValueT< T >::set | ( | const T & | value | ) |
Definition at line 435 of file Value.h.
References agxData::Value::set().
Referenced by agxData::Val< UInt >::operator=(), and agxData::ValueT< T >::ValueT().
|
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 |
Referenced by agxData::Value::set().
|
inherited |
Set the object model (handled automatically).
| void agxData::ValueT< T >::signal | ( | const T & | value | ) |
Definition at line 441 of file Value.h.
References agxData::Value::signal().
|
overridevirtualinherited |
Reimplemented in agx::Component.
|
inherited |
|
inlineinherited |
Definition at line 333 of file Value.h.
References agxData::Value::m_format, agxData::Value::m_value, agxData::Data::ptr(), and agxData::transform().
Referenced by agxOSG::CameraSynchronization::operator()().
|
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.
|
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.
|
static |
Definition at line 400 of file Value.h.
References agxData::Value::getFormat().
|
protectedinherited |
|
protectedinherited |
Definition at line 212 of file Value.h.
Referenced by agxData::Value::getBinding().
|
protectedinherited |
|
protectedinherited |
Definition at line 211 of file Value.h.
Referenced by agxData::Value::getBindPath().
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
Definition at line 215 of file Value.h.
Referenced by agxData::Value::get(), agxData::Value::getFormat(), agxData::Value::getType(), agxData::Value::set(), and agxData::Value::transform().
|
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.
|
protectedinherited |
Definition at line 214 of file Value.h.
Referenced by agxData::Value::get(), agxData::Value::isValid(), agxData::Value::ptr(), and agxData::Value::transform().
|
inherited |