17#ifndef AGXDATA_ENTITYPTR_H
18#define AGXDATA_ENTITYPTR_H
21# pragma warning( disable: 4714 )
37 template <
typename T>
class ScalarAttributeT;
38 template <
typename T>
class PointerAttributeT;
39 template <
typename T>
class VectorAttributeT;
40 template <
typename T>
class HashSetAttributeT;
41 template <
typename T>
class ArrayAttributeT;
42 template <
typename T>
class SharedAttributeT;
74 agxData::EntityData *getData();
75 const agxData::EntityData *getData()
const;
81 const T& dataSet()
const;
114 bool isValid()
const;
119 void verifyIndex()
const;
171 template <
typename T>
174 template <
typename T>
178 template <
typename T>
181 template <
typename T>
185 template <
typename T>
188 template <
typename T>
192 template <
typename T>
195 template <
typename T>
199 template <
typename T>
202 template <
typename T>
206 template <
typename T>
209 template <
typename T>
216 bool operator!()
const;
217 operator bool()
const;
219 bool operator<(
const EntityPtr& rhs )
const;
220 bool operator>(
const EntityPtr& rhs )
const;
222 bool operator==(
const EntityPtr& rhs )
const;
223 bool operator!=(
const EntityPtr& rhs )
const;
225 void print(std::ostream& stream)
const;
228 static void TransformToAscii(
void *targetBuffer,
const void *sourceBuffer,
size_t numElements);
231 template <
typename T>
234 template <
typename T>
235 T& getElement(
const Attribute *attribute)
const;
Type-specific Array used for fast access into the data held by a Buffer.
An abstract attribute description, part of an Entity.
Entity instance provides access to a single instance in an EntityStorage.
An abstract description of a data entity stored using SOA (structure of arrays) pattern in a EntitySt...
Accessor to a entity instance stored in a EntityStorage, to allow SOA (structure of arrays) data to b...
agx::Index calculateIndex() const
Calculate the index using the indirect id.
void print(std::ostream &stream) const
EntityPtr & operator=(const EntityPtr &other)=default
agxData::EntityData * getData()
void copyAttributes(agxData::EntityPtr source)
Copy instance attributes to an existing target instance.
agxData::EntityInstance instance()
static void TransformToAscii(void *targetBuffer, const void *sourceBuffer, size_t numElements)
agxData::EntityStorage * getStorage() const
bool operator>(const EntityPtr &rhs) const
void transfer(agxData::EntityStorage *target)
Transfer instance to another storage.
bool operator<(const EntityPtr &rhs) const
agxData::EntityPtr copy(agxData::EntityStorage *target)
Copy instance to another storage.
EntityPtr & operator=(EntityPtr &&)=default
bool operator==(const EntityPtr &rhs) const
agxData::EntityPtr copy()
Create a copy instance in the same storage.
void destroy()
Remove the entity from the active storage.
void invalidate()
Invalidate the entity pointer.
bool operator!=(const EntityPtr &rhs) const
void init(agxData::EntityStorage *storage, agx::Index id)
Set the target storage and id.
EntityPtr(const agxData::EntityPtr &other)=default
Data storage for a collection of entity instances of a specified EntityModel.
Inheritance with partial specialization due to bug with ref_ptr containers.
Vector containing 'raw' data.
Contains classes for low level data storage for AGX.
agx::VectorPOD< EntityPtr > EntityPtrVector
std::ostream & operator<<(std::ostream &output, const Attribute &attribute)
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
UInt32 hash(const T &key)
AGXCORE_EXPORT const InvalidIndexStruct InvalidIndex