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();
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;
195 SharedBufferVector m_sharedBuffers;
196 SharedStorageVector m_sharedStorages;
197 EntityStorage *m_defaultStorage;
198 bool m_useInstanceTable;
199 bool m_hasConstructor;
206 Loader(
const char *modelPath);
207 virtual EntityModel *load() = 0;
211 template <
typename T>
229 AGX_FORCE_INLINE const EntityModel::SharedStorageVector& EntityModel::getSharedStorages()
const {
return m_sharedStorages; }
242 #undef AGX_ENTITY_NAMESPACE
virtual void initAttributeAccessors()
virtual void shutdownCleanup()
Representation of a path, a list of name components.
static bool getThreadSafe()
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
const AttributePtrVector & getAttributes() const
A model is an abstract representation of the class of an agx::Object.
EntityModel * getSource()
#define AGX_TYPE_BINDING(_Type, _Name)
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.
bool hasConstructor() const
StorageEvent storageCreationEvent
Loader(const char *modelPath)
An abstract attribute description, part of an Entity.
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.