17 #ifndef AGXDATA_ENTITY_MODEL_H 18 #define AGXDATA_ENTITY_MODEL_H 32 #define AGX_ENTITY_NAMESPACE "" 38 class EntityParameter;
71 virtual void configure(agx::TiXmlElement *eEntity);
80 static void setThreadSafe(
bool flag);
81 static bool getThreadSafe();
105 const AttributePtrVector& getAttributes()
const;
114 void setUseInstanceTable(
bool flag);
115 bool useInstanceTable()
const;
117 void setHasConstructor(
bool flag);
118 bool hasConstructor()
const;
129 size_t getNumBytes();
135 void print(std::ostream& stream)
const;
148 template <
typename T>
159 void propagateNewAttribute(
Attribute *attribute);
181 const SharedBufferVector& getSharedBuffers()
const;
182 const SharedStorageVector& getSharedStorages()
const;
184 void addSharedBuffer(SharedBuffer buffer);
185 void addSharedStorage(SharedStorage storage);
188 static void initDefaultEntity();
190 static bool s_threadSafe;
193 EntityModelPtrVector m_children;
194 AttributePtrVector m_attributes;
195 SharedBufferVector m_sharedBuffers;
196 SharedStorageVector m_sharedStorages;
198 bool m_useInstanceTable;
199 bool m_hasConstructor;
206 Loader(
const char *modelPath);
211 template <
typename T>
227 AGX_FORCE_INLINE const AttributePtrVector& EntityModel::getAttributes()
const {
return m_attributes; }
242 #undef AGX_ENTITY_NAMESPACE virtual void initAttributeAccessors()
virtual void shutdownCleanup()
Representation of a path, a list of name components.
agx::Event1< EntityStorage * > StorageEvent
static ScalarAttributeT< EntityPtr > * instanceAttribute
LoaderT(const char *modelPath)
Data storage for a collection of entity instances of a specified EntityModel.
agx::Vector< EntityModel * > EntityModelPtrVector
A model is an abstract representation of the class of an agx::Object.
#define AGX_TYPE_BINDING(_Type, _Name)
Entity instance provides access to a single instance in an EntityStorage.
Accessor to a entity instance stored in a EntityStorage, to allow SOA (structure of arrays) data to b...
agx::Vector< Attribute * > AttributePtrVector
#define AGX_DECLARE_POINTER_TYPES(type)
agx::HashTable< Attribute *, EntityModel * > EntityDependencyTable
Representation of a name string.
StorageEvent storageCreationEvent
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
An abstract attribute description, part of an Entity.
Contains classes for low level data storage for AGX.
Type
Specifies which path to access.
An abstract description of a data entity stored using SOA (structure of arrays) pattern in a EntitySt...
virtual EntityModel * load()
AGXCORE_EXPORT Component * root()
A namespace is used as a group node in the agx::Model hierarchy.
Inheritance with partial specialization due to bug with ref_ptr containers.
An agx::Device is an abstract representation of a device on which data can be stored and processed...
Specifies paths for where to search for plugin's/runtime libraries.
virtual void construct(agxData::EntityPtr)
AGXCORE_EXPORT bool hasEntity(const agx::Path &path)
AGXCORE_EXPORT EntityModel * getEntity(const agx::Path &path)
Get a entity with a specified path.