Menu
Lumberyard
C++ API Reference (Version 1.10)

AZ::AttributeMemberFunction< R(C::*)(Args...) const > Class Template Reference

Open 3D Engine (O3DE), the successor to Lumberyard, is now available in Developer Preview. Download O3DE or visit the AWS Game Tech blog to learn more.

An attribute that contains a pointer to a const class member function with the specified arguments and return type. More...

Inherits AZ::AttributeFunction< R(Args...)> .

Public Types

typedef FunctionPtr
The type of const function that the attribute contains. More...
- Public Types inherited from AZ::AttributeFunction< R(Args...)>
typedef FunctionPtr
The type of function that the attribute contains. More...

Public Member Functions

AttributeMemberFunction ( FunctionPtr f)
Initializes an attribute with the provided function pointer. More...
R Invoke (void *instance, Args &&... args) override
Invokes the function of a class instance using the specified function arguments. More...
AZ::Uuid GetInstanceType () const override
Gets the UUID of the type of instance that the function belongs to. More...
- Public Member Functions inherited from AZ::AttributeFunction< R(Args...)>
AttributeFunction ( FunctionPtr f)
Initializes an attribute with the provided function pointer. 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::AttributeFunction< R(Args...)>
FunctionPtr m_function
The function pointer that the attribute contains. More...
- Public Attributes inherited from AZ::Attribute
bool m_describesChildren
Indicates that this attribute is a container for child attributes. More...

Detailed Description

template<class R, class C, class... Args>
class AZ::AttributeMemberFunction< R(C::*)(Args...) const >

An attribute that contains a pointer to a const class member function with the specified arguments and return type.

The function must return a nonvoid result. You provide the instance of the class when you use the Invoke() function.

Template Parameters
R The return type of the function.
C The type of class that has the class member function.
Args The types of arguments that are passed to the function.

Member Typedef Documentation

FunctionPtr

template<class R , class C , class... Args>
typedef R(C::* AZ::AttributeMemberFunction < R(C::*)(Args...) const >::FunctionPtr) (Args...) const

The type of const function that the attribute contains.

Constructor & Destructor Documentation

AttributeMemberFunction()

template<class R , class C , class... Args>
AZ::AttributeMemberFunction < R(C::*)(Args...) const >:: AttributeMemberFunction ( FunctionPtr f )
inline explicit

Initializes an attribute with the provided function pointer.

Parameters
f The function pointer that the attribute will contain.

Member Function Documentation

GetInstanceType()

template<class R , class C , class... Args>
AZ::Uuid AZ::AttributeMemberFunction < R(C::*)(Args...) const >::GetInstanceType ( ) const
inline override virtual

Gets the UUID of the type of instance that the function belongs to.

Returns
The UUID of the type of instance that the function belongs to.

Reimplemented from AZ::AttributeFunction< R(Args...)> .

Invoke()

template<class R , class C , class... Args>
R AZ::AttributeMemberFunction < R(C::*)(Args...) const >::Invoke ( void * instance ,
Args &&... args
)
inline override virtual

Invokes the function of a class instance using the specified function arguments.

Parameters
instance A pointer to a class instance to use to invoke the function.
args The arguments of the function.
Returns
The return type of the function.

Reimplemented from AZ::AttributeFunction< R(Args...)> .


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