cppexpose  1.0.0.b785e04f23b8
C++ library for type introspection, reflection, and scripting interface
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
cppexpose::StaticFunction< RET, Arguments > Class Template Reference

Representation of a static function. More...

#include <cppexpose/include/cppexpose/function/StaticFunction.h>

Inheritance diagram for cppexpose::StaticFunction< RET, Arguments >:
Inheritance graph
[legend]
Collaboration diagram for cppexpose::StaticFunction< RET, Arguments >:
Collaboration graph
[legend]

Public Types

typedef RET(* Func) (Arguments...)
 Typed function pointer for a static function. More...
 

Public Member Functions

 StaticFunction (Func func)
 Constructor. More...
 
virtual ~StaticFunction ()
 Destructor. More...
 
virtual std::unique_ptr< AbstractFunctionclone () 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 callFunction (helper::Seq< I... >, const std::vector< Variant > &args)
 

Protected Attributes

Func m_func
 Function object. More...
 

Detailed Description

template<typename RET, typename... Arguments>
class cppexpose::StaticFunction< RET, Arguments >

Representation of a static function.

Member Typedef Documentation

template<typename RET , typename... Arguments>
typedef RET(* cppexpose::StaticFunction< RET, Arguments >::Func) (Arguments...)

Typed function pointer for a static function.

Constructor & Destructor Documentation

template<typename RET , typename... Arguments>
cppexpose::StaticFunction< RET, Arguments >::StaticFunction ( Func  func)

Constructor.

Parameters
[in]funcPointer to static function
template<typename RET , typename... Arguments>
cppexpose::StaticFunction< RET, Arguments >::~StaticFunction ( )
virtual

Destructor.

Member Function Documentation

template<typename RET , typename... Arguments>
std::unique_ptr< AbstractFunction > cppexpose::StaticFunction< RET, Arguments >::clone ( )
overridevirtual

Create a copy of the function object.

Returns
New function object pointing to the same function. Has to be deleted by the caller.

Implements cppexpose::AbstractFunction.

References cppexpose::StaticFunction< RET, Arguments >::m_func.

template<typename RET , typename... Arguments>
Variant cppexpose::StaticFunction< RET, Arguments >::call ( const std::vector< Variant > &  args)
overridevirtual

Call function.

Parameters
[in]argsList of arguments as Variants
Returns
New function object pointing to the same function. Has to be deleted by the caller.

Implements cppexpose::AbstractFunction.

References cppexpose::StaticFunction< RET, Arguments >::callFunction().

template<typename RET , typename... Arguments>
template<size_t... I>
Variant cppexpose::StaticFunction< RET, Arguments >::callFunction ( helper::Seq< I... >  ,
const std::vector< Variant > &  args 
)
protected

Member Data Documentation

template<typename RET , typename... Arguments>
Func cppexpose::StaticFunction< RET, Arguments >::m_func
protected

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