AGX Dynamics 2.42.3.0
Loading...
Searching...
No Matches
agxData::Attribute Class Reference

An abstract attribute description, part of an Entity. More...

#include <Attribute.h>

+ Inheritance diagram for agxData::Attribute:

Public Member Functions

 Attribute (const agx::Name &name, agxData::Type *type, agxData::Format *defaultFormat=nullptr, agxData::Value *defaultValue=nullptr, agxData::Value *numElements=nullptr)
 Constructor.
 
agx::String fullName () const
 
agxData::Format * getDefaultFormat ()
 
const agxData::Format * getDefaultFormat () const
 
agxData::Value * getDefaultValue ()
 
const agxData::Value * getDefaultValue () const
 
EntityModel * getEntity () const
 
agx::Index getId () const
 
agxData::Value * getNumElements ()
 
const agxData::Value * getNumElements () const
 
agxData::Type * getType ()
 
const agxData::Type * getType () const
 
void setDefaultFormat (agxData::Format *format)
 
void setDefaultValue (agxData::Value *value)
 
- Public Member Functions inherited from agx::Object
 Object (const Name &name=Name(), Model *model=Object::ClassModel())
 
void addListener (EventListener *listener)
 
virtual void buildNavigationTree (agxJson::Value &eNode) const
 
virtual void configure (TiXmlElement *)
 
agx::String fullName () const
 
agx::String fullPath () const
 
agx::String fullPath (const agx::Object *root) const
 
template<typename T >
T * getAutoScopedResource (const agx::Path &path)
 
template<typename T >
const T * getAutoScopedResource (const agx::Path &path) 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
 
agx::Object * getContext ()
 
template<typename T >
T * getContext ()
 
const agx::Object * getContext () const
 
template<typename T >
const T * getContext () const
 
agx::UInt32 getId () const
 
const agx::Name & getImplementationName () 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
 
template<typename T >
T * getResource (const agx::Path &path)
 
template<typename T >
const T * getResource (const agx::Path &path) 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
 
virtual agx::Object * getResourceImpl (const agx::Path &path, agx::Model *model)
 
agx::Object * getRootContext ()
 
const agx::Object * getRootContext () const
 
bool hasListener (EventListener *listener)
 
bool hasParent (const agx::Object *node) const
 
bool isUnique () const
 
virtual void printSubtree () const
 
virtual void rebind ()
 
void removeListener (EventListener *listener)
 
virtual void save (TiXmlElement *) const
 
virtual void setContext (agx::Object *context)
 
void setId (UInt32 id)
 
void setModel (agx::Model *model)
 Set the object model (handled automatically).
 
void setName (const agx::Name &name)
 Set the name of the object.
 
virtual void snapshot (TiXmlNode *, const String &) const
 
- Public Member Functions inherited from agx::Referenced
 Referenced ()
 Default constructor.
 
 Referenced (const Referenced &)
 
template<typename T >
T * as ()
 Subclass casting.
 
template<typename T >
const T * as () const
 
template<typename T >
T * asSafe ()
 Safe subclass casting, return nullptr if template type does not match.
 
template<typename T >
const T * asSafe () const
 
int getReferenceCount () const
 
template<typename T >
bool is () const
 Subclass test.
 
Referenced & operator= (const Referenced &)
 Assignment operator. Will increment the number of references to the referenced object.
 
void reference (void *ptr=nullptr) const
 Explicitly increment the reference count by one, indicating that this object has another pointer which is referencing it.
 
void unreference (void *ptr=nullptr) const
 Decrement the reference count by one, indicating that a pointer to this object is referencing it.
 
void unreference_nodelete () const
 Decrement the reference count by one, indicating that a pointer to this object is referencing it.
 

Static Public Member Functions

static agx::Model * ClassModel ()
 
- Static Public Member Functions inherited from agx::Object
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.
 
static Object * load (const String &path, Device *device, const String &type, const String &attribute, const String &value)
 
template<typename T >
static T * load (const String &path, Device *device, const String &type, const String &attribute, const String &value)
 
static Object * load (const String &path, Device *device, const String &type="", size_t instance=0)
 
template<typename T >
static T * load (const String &path, Device *device, const String &type="", size_t instance=0)
 
static void load (const String &path, Device *device, ObjectPtrVector &loadedObjects)
 
static Object * load (TiXmlElement *eObject, Device *device)
 
template<typename T >
static T * load (TiXmlElement *eObject, 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).
 
- Static Public Member Functions inherited from agx::Referenced
template<typename T >
static bool ValidateCast (const Referenced *object)
 

Protected Member Functions

 Attribute ()
 
virtual ~Attribute ()
 
void setEntity (EntityModel *entity)
 
void setId (agx::Index id)
 
- Protected Member Functions inherited from agx::Object
virtual ~Object ()
 
- Protected Member Functions inherited from agx::Referenced
virtual ~Referenced ()
 Destructor.
 
void allocateObserverVector () const
 
void deleteUsingDeleteHandler () const
 

Additional Inherited Members

- Public Types inherited from agx::Object
typedef agx::observer_ptr< const Event > EventConstObserver
 
typedef agx::ref_ptr< const Event > EventConstRef
 
typedef agx::observer_ptr< Event > EventObserver
 
typedef agx::Vector< EventObserver > EventObserverVector
 
typedef agx::VectorPOD< Event * > EventPtrVector
 
typedef agx::ref_ptr< Event > EventRef
 
typedef agx::Vector< EventRef > EventRefVector
 
- Static Protected Member Functions inherited from agx::Referenced
static DeleteHandler * getDeleteHandler ()
 
static void setDeleteHandler (DeleteHandler *handler)
 Internal: Set a DeleteHandler to which deletion of all referenced counted objects will be delegated to.
 
- Protected Attributes inherited from agx::Referenced
Mutex m_mutex
 
ObserverContainer m_observers
 
AtomicValue m_refCount
 

Detailed Description

An abstract attribute description, part of an Entity.

Definition at line 57 of file Attribute.h.

Constructor & Destructor Documentation

◆ Attribute() [1/2]

agxData::Attribute::Attribute ( const agx::Name &  name,
agxData::Type *  type,
agxData::Format *  defaultFormat = nullptr,
agxData::Value *  defaultValue = nullptr,
agxData::Value *  numElements = nullptr 
)

Constructor.

Parameters
nameThe name of the attribute.
typeThe data type of the attribute.

References agxData::getType().

◆ ~Attribute()

virtual agxData::Attribute::~Attribute ( )
protectedvirtual

◆ Attribute() [2/2]

agxData::Attribute::Attribute ( )
inlineprotected

Definition at line 116 of file Attribute.h.

Member Function Documentation

◆ ClassModel()

static agx::Model * agxData::Attribute::ClassModel ( )
static

◆ fullName()

agx::String agxData::Attribute::fullName ( ) const
Returns
The full name, "entityagx::Name.attributeagx::Name"

References agxData::getEntity().

◆ getDefaultFormat() [1/2]

Format * agxData::Attribute::getDefaultFormat ( )
Returns
the default data format for the attribute.

Definition at line 368 of file Attribute.h.

◆ getDefaultFormat() [2/2]

const Format * agxData::Attribute::getDefaultFormat ( ) const

Definition at line 369 of file Attribute.h.

◆ getDefaultValue() [1/2]

agxData::Value * agxData::Attribute::getDefaultValue ( )
Returns
The data initializer.

Definition at line 372 of file Attribute.h.

◆ getDefaultValue() [2/2]

const agxData::Value * agxData::Attribute::getDefaultValue ( ) const

Definition at line 373 of file Attribute.h.

◆ getEntity()

EntityModel * agxData::Attribute::getEntity ( ) const
Returns
The entity which the attribute is part of. nullptr if not an entity attribute.

Definition at line 374 of file Attribute.h.

◆ getId()

agx::Index agxData::Attribute::getId ( ) const
Returns
the id of this attribute (unique in the pools which the attribute is part of)

Definition at line 365 of file Attribute.h.

Referenced by agxData::EntityStorage::getBuffer(), and agxData::EntityStorage::getPermutationBuffer().

◆ getNumElements() [1/2]

agxData::Value * agxData::Attribute::getNumElements ( )
Returns
The number of elements per attribute instance, default is 1.

Definition at line 370 of file Attribute.h.

◆ getNumElements() [2/2]

const agxData::Value * agxData::Attribute::getNumElements ( ) const

Definition at line 371 of file Attribute.h.

◆ getType() [1/2]

Type * agxData::Attribute::getType ( )
Returns
the data type of the attribute.

Definition at line 366 of file Attribute.h.

◆ getType() [2/2]

const Type * agxData::Attribute::getType ( ) const

Definition at line 367 of file Attribute.h.

◆ setDefaultFormat()

void agxData::Attribute::setDefaultFormat ( agxData::Format *  format)

◆ setDefaultValue()

void agxData::Attribute::setDefaultValue ( agxData::Value *  value)

◆ setEntity()

void agxData::Attribute::setEntity ( EntityModel *  entity)
protected

◆ setId()

void agxData::Attribute::setId ( agx::Index  id)
protected

The documentation for this class was generated from the following file: