|
AGXDynamics
2.31.1.0
|
Array parameter. More...
#include <Parameter.h>
Inheritance diagram for agx::ArrayParameter: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 | |
| ArrayParameter (const agx::Name &name, agxData::Type *type, UInt8 accessMode=agxData::READ, const Path &bindPath=Path()) | |
| ArrayParameter (const agx::Name &name, agxData::Type *type, UInt8 accessMode, agxData::Buffer *binding) | |
| ArrayParameter (const agx::Name &name, agxData::Format *format, UInt8 accessMode=agxData::READ, const Path &bindPath=Path()) | |
| ArrayParameter (const agx::Name &name, agxData::Format *format, UInt8 accessMode, agxData::Buffer *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 > | |
| agxData::Array< T > & | get () |
| Access the data of the current buffer binding. More... | |
| template<typename T > | |
| const agxData::Array< 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 |
| agxData::Buffer * | getBuffer () |
| const agxData::Buffer * | getBuffer () 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 |
| GlobalResultBuffer * | getGlobalResult () |
| const GlobalResultBuffer * | getGlobalResult () const |
| UInt | getGlobalResultMode () const |
| agx::UInt32 | getId () const |
| const agx::Name & | getImplementationName () const |
| size_t | getIndex () const |
| size_t | getLocalSize () 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 |
| size_t | getNumElements () 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 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 |
| agxData::Type * | getType () override |
| const agxData::Type * | getType () const override |
| virtual bool | hasGlobalResult () const override |
| 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 |
| 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... | |
| virtual void | setContext (agx::Object *context) |
| void | setGlobalResultMode (UInt mode) |
| Set the global result mode. More... | |
| void | setId (UInt32 id) |
| void | setLocalSize (size_t numElements) |
| Create a local memory allocation. More... | |
| 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 | 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 |
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 ArrayParameter * | 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 | ~ArrayParameter () |
| virtual void | _bind (Object *binding) override |
| void | allocateObserverVector () const |
| void | deleteUsingDeleteHandler () const |
| virtual void | prepareGlobalResultSorting (size_t numJobs) 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 | |
| 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 |
Array parameter.
Definition at line 328 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::ArrayParameter::ArrayParameter | ( | const agx::Name & | name, |
| agxData::Type * | type, | ||
| UInt8 | accessMode = agxData::READ, |
||
| const Path & | bindPath = Path() |
||
| ) |
| agx::ArrayParameter::ArrayParameter | ( | const agx::Name & | name, |
| agxData::Type * | type, | ||
| UInt8 | accessMode, | ||
| agxData::Buffer * | binding | ||
| ) |
| agx::ArrayParameter::ArrayParameter | ( | const agx::Name & | name, |
| agxData::Format * | format, | ||
| UInt8 | accessMode = agxData::READ, |
||
| const Path & | bindPath = Path() |
||
| ) |
| agx::ArrayParameter::ArrayParameter | ( | const agx::Name & | name, |
| agxData::Format * | format, | ||
| UInt8 | accessMode, | ||
| agxData::Buffer * | 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 |
| agxData::Array< T > & agx::ArrayParameter::get | ( | ) |
Access the data of the current buffer binding.
Definition at line 771 of file Parameter.h.
References agxAssertN.
| const agxData::Array< T > & agx::ArrayParameter::get | ( | ) | const |
Definition at line 780 of file Parameter.h.
|
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.
| agxData::Buffer * agx::ArrayParameter::getBuffer | ( | ) |
Definition at line 765 of file Parameter.h.
| const agxData::Buffer * agx::ArrayParameter::getBuffer | ( | ) | const |
Definition at line 766 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.
| GlobalResultBuffer * agx::ArrayParameter::getGlobalResult | ( | ) |
Definition at line 791 of file Parameter.h.
| const GlobalResultBuffer * agx::ArrayParameter::getGlobalResult | ( | ) | const |
Definition at line 792 of file Parameter.h.
| UInt agx::ArrayParameter::getGlobalResultMode | ( | ) | const |
Definition at line 794 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.
| size_t agx::ArrayParameter::getLocalSize | ( | ) | const |
Definition at line 782 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 |
| size_t agx::ArrayParameter::getNumElements | ( | ) | const |
Definition at line 784 of file Parameter.h.
References agxAssert.
|
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 |
|
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.
|
overridevirtual |
Reimplemented from agx::Parameter.
Definition at line 767 of file Parameter.h.
|
overridevirtual |
Reimplemented from agx::Parameter.
Definition at line 768 of file Parameter.h.
|
overridevirtual |
Reimplemented from agx::Parameter.
|
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 |
|
overrideprotectedvirtual |
Reimplemented from agx::Parameter.
|
inlinevirtualinherited |
Reimplemented in agx::Component.
|
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.
|
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.
| void agx::ArrayParameter::setLocalSize | ( | size_t | numElements | ) |
Create a local memory allocation.
Eg. __local in OpenCL.
|
inherited |
Set the object model (handled automatically).
|
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 |
|
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.