lib

Kross::Api::ProxyFunction< INSTANCE, METHOD, RET, ARG1, ARG2, ARG3, ARG4 > Class Template Reference

#include <proxy.h>

Inheritance diagram for Kross::Api::ProxyFunction< INSTANCE, METHOD, RET, ARG1, ARG2, ARG3, ARG4 >:

Kross::Api::Function List of all members.

Detailed Description

template<class INSTANCE, typename METHOD, class RET = ProxyValue<Kross::Api::Object,void>, class ARG1 = ProxyValue<Kross::Api::Object,void>, class ARG2 = ProxyValue<Kross::Api::Object,void>, class ARG3 = ProxyValue<Kross::Api::Object,void>, class ARG4 = ProxyValue<Kross::Api::Object,void>>
class Kross::Api::ProxyFunction< INSTANCE, METHOD, RET, ARG1, ARG2, ARG3, ARG4 >

The ProxyFunction template-class is used to publish any C/C++ method (not only slots) of a struct or class instance as a a Kross::Api::Function to Kross.

With this class we don't need to have a method-wrapper for each single function what a) should reduce the code needed for wrappers and b) is more typesafe cause the connection to the C/C++ method is done on compiletime.

Definition at line 71 of file proxy.h.


Public Member Functions

 ProxyFunction (INSTANCE *instance, const METHOD &method)
Object::Ptr call (List::Ptr args)

Friends

struct ProxyFunctionCaller

Constructor & Destructor Documentation

template<class INSTANCE, typename METHOD, class RET = ProxyValue<Kross::Api::Object,void>, class ARG1 = ProxyValue<Kross::Api::Object,void>, class ARG2 = ProxyValue<Kross::Api::Object,void>, class ARG3 = ProxyValue<Kross::Api::Object,void>, class ARG4 = ProxyValue<Kross::Api::Object,void>>
Kross::Api::ProxyFunction< INSTANCE, METHOD, RET, ARG1, ARG2, ARG3, ARG4 >::ProxyFunction INSTANCE *  instance,
const METHOD &  method
[inline]
 

Constructor.

Parameters:
instance The objectinstance to which the method belongs to.
method The method-pointer.

Definition at line 111 of file proxy.h.


Member Function Documentation

template<class INSTANCE, typename METHOD, class RET = ProxyValue<Kross::Api::Object,void>, class ARG1 = ProxyValue<Kross::Api::Object,void>, class ARG2 = ProxyValue<Kross::Api::Object,void>, class ARG3 = ProxyValue<Kross::Api::Object,void>, class ARG4 = ProxyValue<Kross::Api::Object,void>>
Object::Ptr Kross::Api::ProxyFunction< INSTANCE, METHOD, RET, ARG1, ARG2, ARG3, ARG4 >::call List::Ptr  args  )  [inline, virtual]
 

This method got called if the wrapped method should be executed.

Parameters:
args The optional list of arguments passed to the execution-call.
Returns:
The returnvalue of the functioncall. It will be NULL if the functioncall doesn't provide us a returnvalue (e.g. if the function has void as returnvalue).

Implements Kross::Api::Function.

Definition at line 123 of file proxy.h.


The documentation for this class was generated from the following file:
KDE Home | KDE Accessibility Home | Description of Access Keys