lib

Kross::Api::Function1< INSTANCE, P1 > Class Template Reference

#include <function.h>

Inheritance diagram for Kross::Api::Function1< INSTANCE, P1 >:

Kross::Api::Function

List of all members.


Detailed Description

template<class INSTANCE, typename P1>
class Kross::Api::Function1< INSTANCE, P1 >

Specialization of the Function0 which takes as additional parameter a const-value.

This const-value will be hidden for the scripting backend and is only passed through on function-call.

So, this class could be as example used to point to a function like;

and then we are able to point to the function with something like
 this->addFunction("myfunctionname",
     new Kross::Api::Function1< MYCLASS, int >(
         this, // pointer to an instance of MYCLASS
         &MYCLASS::myfunction, // the method which should be wrapped
         17 // the const-value we like to pass to the function.
         ) );
The defined integer myinteger which has the value 17 will be passed transparently to myfunc. The scripting-backend won't know that there exists such an additional integer at all. So, it's hidden and the user aka the scripting code won't be able to manipulate that additional value.

Definition at line 96 of file function.h.


Public Member Functions

 Function1 (INSTANCE *instance, Method method, P1 p1)
Object::Ptr call (List::Ptr args)

Member Function Documentation

template<class INSTANCE, typename P1>
Object::Ptr Kross::Api::Function1< INSTANCE, P1 >::call ( List::Ptr   )  [inline, virtual]

Each function needs to implement the call-method which will be executed if the function itself should be executed.

Implements Kross::Api::Function.

Definition at line 106 of file function.h.


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