cppexpose
1.0.0.b785e04f23b8
C++ library for type introspection, reflection, and scripting interface
|
Representation of a const member function. More...
#include <cppexpose/include/cppexpose/function/ConstMemberFunction.h>
Public Types | |
typedef RET(T::* | Func) (Arguments...) const |
Typed function pointer for a member function of class T. More... | |
Public Member Functions | |
ConstMemberFunction (const T *obj, Func func) | |
Constructor. More... | |
virtual | ~ConstMemberFunction () |
Destructor. More... | |
virtual std::unique_ptr< AbstractFunction > | clone () override |
Create a copy of the function object. More... | |
virtual Variant | call (const std::vector< Variant > &args) override |
Call function. More... | |
Public Member Functions inherited from cppexpose::AbstractFunction | |
AbstractFunction () | |
Constructor. More... | |
virtual | ~AbstractFunction () |
Destructor. More... | |
Protected Member Functions | |
template<size_t... I> | |
Variant | callMethod (helper::Seq< I... >, const std::vector< Variant > &args) |
Protected Attributes | |
const T * | m_obj |
Pointer to instance of class T. More... | |
Func | m_func |
Function object (for non-const function) More... | |
Representation of a const member function.
typedef RET(T::* cppexpose::ConstMemberFunction< T, RET, Arguments >::Func) (Arguments...) const |
Typed function pointer for a member function of class T.
cppexpose::ConstMemberFunction< T, RET, Arguments >::ConstMemberFunction | ( | const T * | obj, |
Func | func | ||
) |
Constructor.
[in] | obj | Pointer to object |
[in] | func | Pointer to member function |
|
virtual |
Destructor.
|
overridevirtual |
Create a copy of the function object.
Implements cppexpose::AbstractFunction.
References cppexpose::ConstMemberFunction< T, RET, Arguments >::m_func, and cppexpose::ConstMemberFunction< T, RET, Arguments >::m_obj.
|
overridevirtual |
Call function.
[in] | args | List of arguments as Variants |
Implements cppexpose::AbstractFunction.
References cppexpose::ConstMemberFunction< T, RET, Arguments >::callMethod().
|
protected |
|
protected |
Pointer to instance of class T.
Referenced by cppexpose::ConstMemberFunction< T, RET, Arguments >::callMethod(), and cppexpose::ConstMemberFunction< T, RET, Arguments >::clone().
|
protected |
Function object (for non-const function)
Referenced by cppexpose::ConstMemberFunction< T, RET, Arguments >::callMethod(), and cppexpose::ConstMemberFunction< T, RET, Arguments >::clone().