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 global function with the specified arguments and return type. More...
Inherits AZ::Attribute .
Inherited by AZ::AttributeMemberFunction< R(C::*)(Args...) const > , and AZ::AttributeMemberFunction< R(C::*)(Args...)> .
Public Types |
|
typedef | FunctionPtr |
The type of function that the attribute contains.
More...
|
|
Public Member Functions |
|
AttributeFunction ( FunctionPtr f) | |
Initializes an attribute with the provided function pointer.
More...
|
|
virtual R | Invoke (void *instance, Args &&... args) |
Invokes the function using the specified function arguments.
More...
|
|
virtual AZ::Uuid | GetInstanceType () const |
Gets the UUID of the instance type, which is null because the function does not belong to an instance of a class.
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...
|
|
Public Attributes |
|
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... Args>
class AZ::AttributeFunction< R(Args...)>
An attribute that contains a pointer to a global function with the specified arguments and return type.
The function must return a nonvoid result.
- Template Parameters
-
R The return type of the function. Args The types of arguments that are passed to the function.
Member Typedef Documentation
◆ FunctionPtr
typedef R(* AZ::AttributeFunction < R(Args...)>::FunctionPtr) (Args...) |
The type of function that the attribute contains.
Constructor & Destructor Documentation
◆ AttributeFunction()
|
inline explicit |
Initializes an attribute with the provided function pointer.
- Parameters
-
f The function pointer that the attribute will contain.
Member Function Documentation
◆ GetInstanceType()
|
inline virtual |
Gets the UUID of the instance type, which is null because the function does not belong to an instance of a class.
- Returns
- A null UUID.
Reimplemented in AZ::AttributeMemberFunction< R(C::*)(Args...) const > , and AZ::AttributeMemberFunction< R(C::*)(Args...)> .
◆ Invoke()
|
inline virtual |
Invokes the function using the specified function arguments.
- Parameters
-
instance A void pointer, which is not used because the function does not belong to an instance of a class. args The arguments of the function.
- Returns
- The return type of the function.
Reimplemented in AZ::AttributeMemberFunction< R(C::*)(Args...) const > , and AZ::AttributeMemberFunction< R(C::*)(Args...)> .
Member Data Documentation
◆ m_function
FunctionPtr AZ::AttributeFunction < R(Args...)>::m_function |
The function pointer that the attribute contains.
The documentation for this class was generated from the following file:
- C:/lumberyard-root/dev/Code/Framework/AZCore/AZCore/RTTI/ ReflectContext.h