Menu
Lumberyard
C++ API Reference (Version 1.10)

AZ::AttributeMemberData< T C::* > Class Template Reference

An attribute that points to class member data of a specified class type. More...

Inherits AZ::AttributeData< T >.

Public Types

typedef  DataPtr
 The type of data that the attribute contains. More...
 

Public Member Functions

 AttributeMemberData (DataPtr p)
 Initializes an attribute with the provided member data pointer. More...
 
const T & Get (void *instance) const override
 Gets the pointer to the class member data that the attribute contains. More...
 
- Public Member Functions inherited from AZ::AttributeData< T >
template<class U >
 AttributeData (U data)
 Initializes an attribute with the provided data. 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 C>
class AZ::AttributeMemberData< T C::* >

An attribute that points to class member data of a specified class type.

This type uses the object instance to access member data. Because you provide an object instance to the AttributeData::Get() function, there is typically no reason to cast to this class using azrtti_cast.

Template Parameters
TThe data type of the class member to put in the attribute.
CThe type of class that has the class member.

Member Typedef Documentation

◆ DataPtr

template<class T , class C >
typedef T C::* AZ::AttributeMemberData< T C::* >::DataPtr

The type of data that the attribute contains.

Constructor & Destructor Documentation

◆ AttributeMemberData()

template<class T , class C >
AZ::AttributeMemberData< T C::* >::AttributeMemberData ( DataPtr  p)
inlineexplicit

Initializes an attribute with the provided member data pointer.

Member Function Documentation

◆ Get()

template<class T , class C >
const T& AZ::AttributeMemberData< T C::* >::Get ( void *  instance) const
inlineoverridevirtual

Gets the pointer to the class member data that the attribute contains.

Parameters
instanceA pointer to the instance of the class to which the member data belongs.
Returns
A pointer to the member data that the attribute contains.

Reimplemented from AZ::AttributeData< T >.


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