Console functor which wraps a function call into an object instance. More...
#include <ConsoleFunctor.h>
Inherits AZ::ConsoleFunctorBase.
Public Types | |
using | MemberFunctorSignature = typename ConsoleCommandMemberFunctorSignature< _TYPE >::type |
using | RawFunctorSignature = void(*)(_TYPE &, const ConsoleCommandContainer &) |
using | FunctorUnion = AZStd::conditional_t< AZStd::is_same_v< RawFunctorSignature, MemberFunctorSignature >, AZStd::variant< RawFunctorSignature >, AZStd::variant< RawFunctorSignature, MemberFunctorSignature > > |
Public Member Functions | |
ConsoleFunctor (const char *name, const char *desc, ConsoleFunctorFlags flags, const TypeId &typeId, _TYPE &object, FunctorUnion function) | |
ConsoleFunctor (IConsole &console, const char *name, const char *desc, ConsoleFunctorFlags flags, const TypeId &typeId, _TYPE &object, FunctorUnion function) | |
ConsoleFunctor (ConsoleFunctor &&)=default | |
ConsoleFunctor & | operator= (ConsoleFunctor &&)=default |
_TYPE & | GetValue () |
void | operator() (const ConsoleCommandContainer &arguments) override |
bool | GetReplicationString (CVarFixedString &outString) const override |
Public Member Functions inherited from AZ::ConsoleFunctorBase | |
ConsoleFunctorBase (const char *name, const char *desc, ConsoleFunctorFlags flags, const TypeId &typeId) | |
ConsoleFunctorBase (AZ::IConsole &console, const char *name, const char *desc, ConsoleFunctorFlags flags, const TypeId &typeId) | |
ConsoleFunctorBase (ConsoleFunctorBase &&other) | |
ConsoleFunctorBase & | operator= (ConsoleFunctorBase &&other) |
virtual | ~ConsoleFunctorBase () |
Destructor. | |
const char * | GetName () const |
const char * | GetDesc () const |
ConsoleFunctorFlags | GetFlags () const |
const TypeId & | GetTypeId () const |
virtual void | operator() (const ConsoleCommandContainer &arguments)=0 |
virtual bool | GetReplicationString (CVarFixedString &outString) const =0 |
template<typename RETURN_TYPE > | |
GetValueResult | GetValue (RETURN_TYPE &outResult) const |
Additional Inherited Members | |
Static Public Member Functions inherited from AZ::ConsoleFunctorBase | |
static ConsoleFunctorBase *& | GetDeferredHead () |
Used internally to link cvars and functors from various modules to the console as they are loaded. | |
Protected Member Functions inherited from AZ::ConsoleFunctorBase | |
virtual GetValueResult | GetValueAsString (CVarFixedString &outString) const |
void | Link (ConsoleFunctorBase *&head) |
void | Unlink (ConsoleFunctorBase *&head) |
Protected Attributes inherited from AZ::ConsoleFunctorBase | |
const char * | m_name = "" |
const char * | m_desc = "" |
ConsoleFunctorFlags | m_flags = ConsoleFunctorFlags::Null |
TypeId | m_typeId |
IConsole * | m_console = nullptr |
ConsoleFunctorBase * | m_prev = nullptr |
ConsoleFunctorBase * | m_next = nullptr |
bool | m_isDeferred = true |
Static Protected Attributes inherited from AZ::ConsoleFunctorBase | |
static ConsoleFunctorBase * | s_deferredHead |
static bool | s_deferredHeadInvoked |
Console functor which wraps a function call into an object instance.
Console functor specialization for non-member console functions (no instance to invoke on).
|
inline |
Constructors.
name | the string name of the functor, used to identify and invoke the functor through the console interface |
desc | a string help description of the functor |
flags | a set of flags that mutate the behaviour of the functor |
typeId | the TypeId associated with this console functor |
object | reference to the data storage object |
|
inlineoverridevirtual |
For functors that can be replicated (cvars). This will generate a replication string suitable for remote execution
outString | the output string which can be remotely executed |
Implements AZ::ConsoleFunctorBase.
|
inline |
Returns reference typed stored type wrapped stored by ConsoleFunctor.
|
inlineoverridevirtual |
ConsoleFunctorBase overrides
Implements AZ::ConsoleFunctorBase.