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::AttributeFunction< R(Args...)> Class Template Reference

Inherits AZ::Attribute.

Inherited by AZ::AttributeMemberFunction< R(C::*)(Args...) const >, and AZ::AttributeMemberFunction< R(C::*)(Args...)>.

Public Types

typedef R(* FunctionPtr) (Args...)
 
- Public Types inherited from AZ::Attribute
using ContextDeleter = void(*)(void *contextData)
 

Public Member Functions

 AZ_RTTI ((AttributeFunction, "{EE535A42-940C-42DE-848D-9C6CE57D8A62}", R(Args...)), Attribute)
 
 AZ_CLASS_ALLOCATOR (AttributeFunction< R(Args...)>, SystemAllocator)
 
 AttributeFunction (FunctionPtr f)
 
virtual R Invoke (void *instance, const Args &... args)
 
virtual AZ::Uuid GetInstanceType () const
 
virtual bool IsInvokable () const
 Returns true if this attribute is an invokable function or method.
 
virtual bool CanDomInvoke (const AZ::Dom::Value &arguments) const
 
virtual AZ::Dom::Value DomInvoke (void *instance, const AZ::Dom::Value &arguments)
 
- 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)
 

Public Attributes

FunctionPtr m_function
 
- Public Attributes inherited from AZ::Attribute
bool m_describesChildren = false
 
bool m_childClassOwned = false
 

Additional Inherited Members

- Static Public Member Functions inherited from AZ::Attribute
static const char * GetTypeName ()
 
static AZ::Name GetTypeField ()
 
static AZ::Name GetInstanceField ()
 
static AZ::Name GetAttributeField ()
 
- 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
 

Member Function Documentation

◆ CanDomInvoke()

template<class R , class... Args>
virtual bool AZ::AttributeFunction< R(Args...)>::CanDomInvoke ( const AZ::Dom::Value arguments) const
inlinevirtual

Returns true if this attribute is invokable, given a set of arguments.

Parameters
argumentsA Dom::Value that must contain an Array of arguments for this invokable attribute.

Reimplemented from AZ::Attribute.

Reimplemented in AZ::AttributeMemberFunction< R(C::*)(Args...)>.

◆ DomInvoke()

template<class R , class... Args>
virtual AZ::Dom::Value AZ::AttributeFunction< R(Args...)>::DomInvoke ( void *  instance,
const AZ::Dom::Value arguments 
)
inlinevirtual

Attempts to execute this attribute given an array of Dom::Values as parameters.

Parameters
argumentsA Dom::Value that must contain an Array of arguments for this invokable attribute.
Returns
A Dom::Value containing the marshalled result of the function call (null if the call returned void)

Reimplemented from AZ::Attribute.

Reimplemented in AZ::AttributeMemberFunction< R(C::*)(Args...)>.

◆ IsInvokable()

template<class R , class... Args>
virtual bool AZ::AttributeFunction< R(Args...)>::IsInvokable ( ) const
inlinevirtual

Returns true if this attribute is an invokable function or method.

Reimplemented from AZ::Attribute.

Reimplemented in AZ::AttributeMemberFunction< R(C::*)(Args...)>.


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