ezEngine  Milestone 7
ezDelegate< R(EZ_LIST(ARG, ARG_COUNT))> Struct Template Reference
Inheritance diagram for ezDelegate< R(EZ_LIST(ARG, ARG_COUNT))>:

Public Member Functions

 EZ_DECLARE_POD_TYPE ()
 
template<typename Method , typename Class >
EZ_FORCE_INLINE ezDelegate (Method method, Class *pInstance)
 Constructs the delegate from a member function type and takes the class instance on which to call the function later.
 
template<typename Method , typename Class >
EZ_FORCE_INLINE ezDelegate (Method method, const Class *pInstance)
 Constructs the delegate from a member function type and takes the (const) class instance on which to call the function later.
 
template<typename Function >
EZ_FORCE_INLINE ezDelegate (Function function)
 Constructs the delegate from a regular C function type.
 
EZ_FORCE_INLINE void operator= (const SelfType &other)
 Copies the data from another delegate.
 
EZ_FORCE_INLINE R operator() (EZ_PAIR_LIST(ARG, arg, ARG_COUNT)) const
 Function call operator. This will call the function that is bound to the delegate, or assert if nothing was bound.
 
EZ_FORCE_INLINE bool operator== (const SelfType &other) const
 Checks whether two delegates are bound to the exact same function, including the class instance.
 
EZ_FORCE_INLINE bool operator!= (const SelfType &other) const
 Checks whether two delegates are bound to the exact same function, including the class instance.
 
EZ_FORCE_INLINE bool IsValid () const
 Returns true when the delegate is bound to a valid non-nullptr function.
 
EZ_FORCE_INLINE void * GetInstance () const
 Returns the class instance that is used to call a member function pointer on.
 

Private Types

enum  { DATA_SIZE = 16 }
 
typedef ezDelegate< R(EZ_LIST(ARG,
ARG_COUNT))> 
SelfType
 
typedef R(* DispatchFunction )(const SelfType &self EZ_COMMA_IF(ARG_COUNT) EZ_LIST(ARG, ARG_COUNT))
 

Static Private Member Functions

template<typename Method , typename Class >
static EZ_FORCE_INLINE R DispatchToMethod (const SelfType &self EZ_COMMA_IF(ARG_COUNT) EZ_PAIR_LIST(ARG, arg, ARG_COUNT))
 
template<typename Method , typename Class >
static EZ_FORCE_INLINE R DispatchToConstMethod (const SelfType &self EZ_COMMA_IF(ARG_COUNT) EZ_PAIR_LIST(ARG, arg, ARG_COUNT))
 
template<typename Function >
static EZ_FORCE_INLINE R DispatchToFunction (const SelfType &self EZ_COMMA_IF(ARG_COUNT) EZ_PAIR_LIST(ARG, arg, ARG_COUNT))
 

Private Attributes

DispatchFunction m_pDispatchFunction
 
ezUInt8 m_Data [DATA_SIZE]
 

Additional Inherited Members

- Protected Attributes inherited from ezDelegateBase
InstancePtr m_pInstance
 

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