PikaScript
|
Native is the base class for the native functions and objects that can be accessed from PikaScript. More...
#include <PikaScript.h>
Public Member Functions | |
virtual Value | pikaCall (Frame &) |
Process the PikaScript call. More... | |
virtual Value | pikaCall (Frame &) |
Process the PikaScript call. More... | |
Native is the base class for the native functions and objects that can be accessed from PikaScript.
It has a single virtual member function which should process a call to the native. Since natives are owned by the variable space once they are registered (and destroyed when the variable space destructs), they often act as simple bridges to other C++ functions and objects.
The easiest way to register a native is by calling one of the Frame::registerNative() member functions (typically on the "root frame"). You will find a couple of template functions there that allows you to register functors directly. They will create the necessary Native classes for you in the background.
Definition at line 459 of file PikaScript.h.
|
inlinevirtual |
Process the PikaScript call.
Arguments can be retrieved by getting $0
, $1
etc from frame
(via Frame::get() or Frame::getOptional()). If the function should not return a value, return Value()
(which constructs a void
value).
Definition at line 460 of file PikaScript.h.
|
inlinevirtual |
Process the PikaScript call.
Arguments can be retrieved by getting $0
, $1
etc from frame
(via Frame::get() or Frame::getOptional()). If the function should not return a value, return Value()
(which constructs a void
value).
Definition at line 460 of file PikaScript.h.