cppexpose  1.0.0.b785e04f23b8
C++ library for type introspection, reflection, and scripting interface
Public Member Functions | Protected Attributes | List of all members
cppexpose::Method Class Reference

Representation of a method of an object. More...

#include <cppexpose/include/cppexpose/reflection/Method.h>

Inheritance diagram for cppexpose::Method:
Inheritance graph
[legend]
Collaboration diagram for cppexpose::Method:
Collaboration graph
[legend]

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...
 
Objectparent () 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...
 
Functionoperator= (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...
 
Objectm_parent
 Parent object. More...
 
- Protected Attributes inherited from cppexpose::Function
std::unique_ptr< AbstractFunctionm_func
 Function implementation. More...
 

Detailed Description

Representation of a method of an object.

Constructor & Destructor Documentation

cppexpose::Method::Method ( std::unique_ptr< AbstractFunction > &&  func,
Object parent = nullptr 
)

Constructor.

Parameters
[in]funcFunction object (can be null)
[in]parentParent object (can be null)
cppexpose::Method::Method ( const std::string &  name,
std::unique_ptr< AbstractFunction > &&  func,
Object parent = nullptr 
)

Constructor.

Parameters
[in]nameFunction name
[in]funcFunction object (can be null)
[in]parentParent object (can be null)
virtual cppexpose::Method::~Method ( )
virtual

Destructor.

Member Function Documentation

const std::string& cppexpose::Method::name ( ) const

Get name.

Returns
Name
Object* cppexpose::Method::parent ( ) const

Get parent object.

Returns
Parent (can be null)

Member Data Documentation

std::string cppexpose::Method::m_name
protected

Name of the method.

Object* cppexpose::Method::m_parent
protected

Parent object.


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