Open 3D Engine AzCore API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
AZ::AttributeData< T > Class Template Reference

#include <ReflectContext.h>

Inherits AZ::Attribute.

Inherited by AZ::AttributeMemberData< T C::* >.

Public Member Functions

 AZ_RTTI ((AttributeData, "{24248937-86FB-406C-8DD5-023B10BD0B60}", T), Attribute)
 
 AZ_CLASS_ALLOCATOR (AttributeData< T >, SystemAllocator)
 
template<class U >
 AttributeData (U &&data)
 
virtual const T & Get (const void *instance) const
 
T & operator= (T &data)
 
T & operator= (const T &data)
 
AZ::Dom::Value GetAsDomValue (void *instance) override
 
- Public Member Functions inherited from AZ::Attribute
 AZ_TYPE_INFO_WITH_NAME_DECL (Attribute)
 
 AZ_RTTI_NO_TYPE_INFO_DECL ()
 
void SetContextData (void *contextData, ContextDeleter destroyer)
 
void * GetContextData () const
 
virtual bool IsInvokable () const
 Returns true if this attribute is an invokable function or method.
 
virtual AttributeUniquePtr GetVoidInstanceAttributeInvocable ()
 
virtual bool CanDomInvoke (const AZ::Dom::Value &arguments) const
 
virtual AZ::Dom::Value DomInvoke (void *instance, const AZ::Dom::Value &arguments)
 
virtual AZ::Dom::Value GetAsDomValue (void *instance)
 

Additional Inherited Members

- Public Types inherited from AZ::Attribute
using ContextDeleter = void(*)(void *contextData)
 
- Static Public Member Functions inherited from AZ::Attribute
static const char * GetTypeName ()
 
static AZ::Name GetTypeField ()
 
static AZ::Name GetInstanceField ()
 
static AZ::Name GetAttributeField ()
 
- Public Attributes inherited from AZ::Attribute
bool m_describesChildren = false
 
bool m_childClassOwned = false
 
- Static Protected Attributes inherited from AZ::Attribute
static const AZ::Name s_typeField
 
static const AZ::Name s_instanceField
 
static const AZ::Name s_attributeField
 

Detailed Description

template<class T>
class AZ::AttributeData< T >

Generic attribute by value data container. This is the most common attribute.

Member Function Documentation

◆ GetAsDomValue()

template<class T >
AZ::Dom::Value AZ::AttributeData< T >::GetAsDomValue ( void *  instance)
inlineoverridevirtual

Gets a marshalled Dom::Value representation of this attribute bound to a given instance. By default this is just abbreviated to a marshalled version of the data stored in the attribute, but for invokable attributes, override this method to serializes a pointer to the instance and this attribute

Reimplemented from AZ::Attribute.

Reimplemented in AZ::AttributeMemberData< T C::* >.


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