|
AGXDynamics
2.31.1.0
|
Scalar parameter. More...
#include <Parameter.h>
Inheritance diagram for agx::ScalarParameter:Public Types | |
| typedef Event1< Parameter * > | 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 |
| enum | MetaType { SCALAR, ARRAY, POINTER, ENTITY_DATA, ENTITY_PTR, ENTITY_INSTANCE, UNRESOLVED } |
| Specify which kind of parameter. More... | |
Public Member Functions | |
| ScalarParameter (const agx::Name &name, agxData::Format *format, UInt8 accessMode=agxData::READ, const String &expression="") | |
| ScalarParameter (const agx::Name &name, agxData::Format *format, UInt8 accessMode, agxData::Value *binding) | |
| 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 (agx::Object *binding) |
| Set explicit binding. More... | |
| void | bind (const agx::Path &path) |
| Set parameter bind path. More... | |
| virtual void | buildNavigationTree (agxJson::Value &eNode) const |
| virtual void | commit () override |
| virtual void | configure (TiXmlElement *eParameter) override |
| agx::String | fullName () const |
| agx::String | fullPath () const |
| agx::String | fullPath (const agx::Object *root) const |
| template<typename T > | |
| const T & | get () const |
| UInt8 | getAccessMode () 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 |
| agx::Object * | getBinding () |
| const agx::Object * | 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 |
| agxData::Format * | getFormat () |
| const agxData::Format * | getFormat () const |
| agx::UInt32 | getId () const |
| const agx::Name & | getImplementationName () const |
| size_t | getIndex () const |
| MetaType | getMetaType () const |
| const agx::String & | getMetaTypeName () 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 |
| Real | getReal () |
| 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 Object * | getResourceImpl (const Path &path, agx::Model *model) override |
| agx::Object * | getRootContext () |
| const agx::Object * | getRootContext () const |
| agx::Task * | getTask () |
| const agx::Task * | getTask () const |
| virtual agxData::Type * | getType () |
| virtual const agxData::Type * | getType () const |
| agxData::Value * | getValue () |
| const agxData::Value * | getValue () const |
| virtual bool | hasGlobalResult () const |
| bool | hasListener (EventListener *listener) |
| bool | hasParent (const agx::Object *node) const |
| template<typename T > | |
| bool | is () const |
| Subclass test. More... | |
| bool | isRequired () const |
| bool | isUnique () const |
| virtual bool | isValid () const override |
| bool | needCommit () |
| bool | needUpdate () |
| virtual void | printSubtree () const |
| void * | ptr () |
| virtual void | rebind () override |
| 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 (TiXmlElement *) const |
| void | set (agx::Object *binding) |
| Set the parameter, alias for bind. More... | |
| void | set (agxData::Value *value) |
| Set the parameter value. More... | |
| template<typename T > | |
| void | set (const T &value) |
| virtual void | setContext (agx::Object *context) |
| void | setExpression (const String &expression) |
| Set the parameter using an expression. More... | |
| 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 | setReal (Real value) |
| void | setRequired (bool flag) |
| Set if the parameter is required, default is true. More... | |
| virtual void | snapshot (TiXmlNode *, const String &) const |
| void | unbind () |
| Remove current binding and bind path. 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... | |
| virtual void | update () override |
| template<typename T > | |
| void | write (const T &value, const Task *owner) |
| Only for internal use from the task containing this Parameter. More... | |
Static Public Member Functions | |
| static agx::Model * | ClassModel () |
| 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 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 ScalarParameter * | load (TiXmlElement *eParameter, Device *device) |
| 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 | bindEvent |
| Event | unbindEvent |
| Event | updateEvent |
Protected Member Functions | |
| virtual | ~ScalarParameter () |
| virtual void | _bind (Object *binding) override |
| void | allocateObserverVector () const |
| void | deleteUsingDeleteHandler () const |
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 | |
| const UInt8 | m_accessMode |
| ObjectObserver | m_binding |
| Path | m_bindPath |
| agxData::FormatRef | m_format |
| size_t | m_index |
| UInt8 | m_metaType |
| Mutex | m_mutex |
| bool | m_needCommit |
| bool | m_needUpdate |
| ObserverContainer | m_observers |
| AtomicValue | m_refCount |
| bool | m_required |
| Task * | m_task |
Scalar parameter.
Definition at line 255 of file Parameter.h.
|
inherited |
Definition at line 66 of file Parameter.h.
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
Specify which kind of parameter.
| Enumerator | |
|---|---|
| SCALAR | |
| ARRAY | |
| POINTER | |
| ENTITY_DATA | |
| ENTITY_PTR | |
| ENTITY_INSTANCE | |
| UNRESOLVED | |
Definition at line 72 of file Parameter.h.
| agx::ScalarParameter::ScalarParameter | ( | const agx::Name & | name, |
| agxData::Format * | format, | ||
| UInt8 | accessMode = agxData::READ, |
||
| const String & | expression = "" |
||
| ) |
| agx::ScalarParameter::ScalarParameter | ( | const agx::Name & | name, |
| agxData::Format * | format, | ||
| UInt8 | accessMode, | ||
| agxData::Value * | binding | ||
| ) |
|
protectedvirtual |
Implements agx::Parameter.
|
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 |
|
inherited |
Set explicit binding.
|
virtualinherited |
Reimplemented in agxData::Buffer, agxData::Value, agx::Model, agx::Component, and agx::Pointer.
|
static |
|
overridevirtual |
Implements agx::Parameter.
|
overridevirtual |
Reimplemented from agx::Object.
|
protectedinherited |
|
inherited |
|
inherited |
|
inherited |
|
staticinherited |
| const T & agx::ScalarParameter::get | ( | ) | const |
Definition at line 717 of file Parameter.h.
References agxAssertN.
|
inherited |
Definition at line 702 of file Parameter.h.
|
inherited |
|
inherited |
|
inherited |
Definition at line 428 of file Object.h.
References agx::Referenced::is().
|
inherited |
|
inherited |
Definition at line 704 of file Parameter.h.
|
inherited |
Definition at line 705 of file Parameter.h.
|
inherited |
Definition at line 703 of file Parameter.h.
|
inherited |
|
inherited |
|
inherited |
|
staticprotectedinherited |
|
staticinherited |
Should rebinding be allowed? Right now a global setting.
|
inherited |
Definition at line 700 of file Parameter.h.
|
inherited |
Definition at line 701 of file Parameter.h.
|
inherited |
Definition at line 370 of file Object.h.
Referenced by agxData::EntityStorage::indexToId().
|
inherited |
|
inherited |
Definition at line 697 of file Parameter.h.
|
inherited |
Definition at line 698 of file Parameter.h.
|
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. |
| Real agx::ScalarParameter::getReal | ( | ) |
Definition at line 758 of file Parameter.h.
|
inherited |
|
inherited |
|
inherited |
|
inherited |
Definition at line 414 of file Object.h.
References agx::Referenced::is().
|
inherited |
|
overridevirtual |
Reimplemented from agx::Parameter.
|
inherited |
|
inherited |
|
inherited |
Definition at line 695 of file Parameter.h.
|
inherited |
Definition at line 696 of file Parameter.h.
|
virtualinherited |
Reimplemented in agx::ArrayParameter, and agx::UnresolvedParameter.
Definition at line 706 of file Parameter.h.
|
virtualinherited |
Reimplemented in agx::ArrayParameter, and agx::UnresolvedParameter.
Definition at line 707 of file Parameter.h.
| agxData::Value * agx::ScalarParameter::getValue | ( | ) |
Definition at line 713 of file Parameter.h.
| const agxData::Value * agx::ScalarParameter::getValue | ( | ) | const |
Definition at line 714 of file Parameter.h.
|
virtualinherited |
Reimplemented in agx::EntityDataParameter, and agx::ArrayParameter.
|
inherited |
|
inherited |
|
inherited |
Subclass test.
Referenced by agx::Object::getAutoScopedResource(), agxData::EntityStorage::getInstances(), and agx::Object::getResource().
|
inherited |
Definition at line 699 of file Parameter.h.
|
overridevirtual |
Implements agx::Parameter.
|
staticinherited |
|
staticinherited |
|
staticinherited |
|
static |
|
inherited |
Definition at line 709 of file Parameter.h.
|
inherited |
Definition at line 708 of file Parameter.h.
|
staticinherited |
|
inlinevirtualinherited |
Reimplemented in agx::Component.
| void * agx::ScalarParameter::ptr | ( | ) |
Definition at line 747 of file Parameter.h.
|
overridevirtualinherited |
Reimplemented from agx::Object.
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 |
|
inlinevirtualinherited |
Reimplemented in agx::Clock.
|
inherited |
Set the parameter, alias for bind.
| void agx::ScalarParameter::set | ( | agxData::Value * | value | ) |
Set the parameter value.
| void agx::ScalarParameter::set | ( | const T & | value | ) |
Definition at line 725 of file Parameter.h.
|
virtualinherited |
Reimplemented in agx::Task, and agxData::FunctionValue.
|
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.
Set the parameter using an expression.
|
inherited |
Set the object model (handled automatically).
Definition at line 753 of file Parameter.h.
|
inherited |
Set if the parameter is required, default is true.
Reimplemented in agx::Component.
Definition at line 106 of file Object.h.
References agx::getModel(), and agx::root().
|
inherited |
Remove current binding and bind path.
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.
|
overridevirtual |
Implements agx::Parameter.
|
staticinherited |
Only for internal use from the task containing this Parameter.
Definition at line 737 of file Parameter.h.
References agxAssert.
|
inherited |
Definition at line 67 of file Parameter.h.
|
protectedinherited |
Definition at line 203 of file Parameter.h.
|
protectedinherited |
Definition at line 202 of file Parameter.h.
|
protectedinherited |
Definition at line 201 of file Parameter.h.
|
protectedinherited |
Definition at line 200 of file Parameter.h.
|
protectedinherited |
Definition at line 199 of file Parameter.h.
|
protectedinherited |
Definition at line 205 of file Parameter.h.
|
mutableprotectedinherited |
Definition at line 240 of file Referenced.h.
|
protectedinherited |
Definition at line 207 of file Parameter.h.
|
protectedinherited |
Definition at line 206 of file Parameter.h.
|
mutableprotectedinherited |
Definition at line 239 of file Referenced.h.
|
mutableprotectedinherited |
Definition at line 241 of file Referenced.h.
|
protectedinherited |
Definition at line 204 of file Parameter.h.
|
protectedinherited |
Definition at line 198 of file Parameter.h.
|
inherited |
Definition at line 68 of file Parameter.h.
|
inherited |
Definition at line 69 of file Parameter.h.