cppexpose
1.0.0.b785e04f23b8
C++ library for type introspection, reflection, and scripting interface
|
Representation of a method of an object. More...
#include <cppexpose/include/cppexpose/reflection/Method.h>
Public Member Functions | |
Method (std::unique_ptr< AbstractFunction > &&func, Object *parent=nullptr) | |
Constructor. More... | |
Method (const std::string &name, std::unique_ptr< AbstractFunction > &&func, Object *parent=nullptr) | |
Constructor. More... | |
virtual | ~Method () |
Destructor. More... | |
const std::string & | name () const |
Get name. More... | |
Object * | parent () const |
Get parent object. More... | |
Public Member Functions inherited from cppexpose::Function | |
Function (std::unique_ptr< AbstractFunction > &&func=nullptr) | |
Constructor. More... | |
Function (const Function &other) | |
Copy constructor. More... | |
virtual | ~Function () |
Destructor. More... | |
Function & | operator= (const Function &other) |
Copy operator. More... | |
bool | isEmpty () const |
Check if function is empty. More... | |
Variant | call (const std::vector< Variant > &args) |
Call function. More... | |
Protected Attributes | |
std::string | m_name |
Name of the method. More... | |
Object * | m_parent |
Parent object. More... | |
Protected Attributes inherited from cppexpose::Function | |
std::unique_ptr< AbstractFunction > | m_func |
Function implementation. More... | |
Representation of a method of an object.
cppexpose::Method::Method | ( | std::unique_ptr< AbstractFunction > && | func, |
Object * | parent = nullptr |
||
) |
Constructor.
[in] | func | Function object (can be null) |
[in] | parent | Parent object (can be null) |
cppexpose::Method::Method | ( | const std::string & | name, |
std::unique_ptr< AbstractFunction > && | func, | ||
Object * | parent = nullptr |
||
) |
|
virtual |
Destructor.
const std::string& cppexpose::Method::name | ( | ) | const |
Get name.
Object* cppexpose::Method::parent | ( | ) | const |
Get parent object.
|
protected |
Name of the method.
|
protected |
Parent object.