Menu
Lumberyard
C++ API Reference (Version 1.10)

AZ::AttributeData< T > Class Template Reference

A generic attribute that contains data that is stored by value. More...

Inherits AZ::Attribute.

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

Public Member Functions

template<class U >
 AttributeData (U data)
 Initializes an attribute with the provided data. More...
 
virtual const T & Get (void *instance) const
 Gets the data from a data attribute. More...
 
- Public Member Functions inherited from AZ::Attribute
 Attribute ()
 Initializes an instance of an attribute. More...
 
virtual ~Attribute ()
 An empty destructor. More...
 
void SetContextData (void *contextData)
 Associates additional data with the attribute. More...
 
void * GetContextData () const
 Gets additional data that is associated with the attribute, if any. More...
 

Additional Inherited Members

- Public Attributes inherited from AZ::Attribute
bool m_describesChildren
 Indicates that this attribute is a container for child attributes. More...
 

Detailed Description

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

A generic attribute that contains data that is stored by value.

This is the most common attribute.

Template Parameters
TThe data type.

Constructor & Destructor Documentation

◆ AttributeData()

template<class T >
template<class U >
AZ::AttributeData< T >::AttributeData ( data)
inlineexplicit

Initializes an attribute with the provided data.

Template Parameters
TThe type of AttributeData class to use.
UThe type of data to put in the attribute.
Parameters
dataThe data that the attribute will contain.

Member Function Documentation

◆ Get()

template<class T >
virtual const T& AZ::AttributeData< T >::Get ( void *  instance) const
inlinevirtual

Gets the data from a data attribute.

Parameters
instanceA void pointer, which is not used because the data does not belong to an instance of a class.
Returns
A reference to the data that the attribute contains.

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


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