PLearn 0.1
|
Trampoline for a void 0-argument function. More...
#include <RemoteTrampoline.h>
Public Types | |
enum | { expected_nargs = 0 } |
typedef RemoteTrampoline | inherited |
typedef void(* | FunctionType )() |
Public Member Functions | |
FRemoteTrampoline_0 (const string &functionname, const RemoteMethodDoc &doc, FunctionType m, const flag_t &flgs=0) | |
virtual void | call (Object *nullinstance, int nargs, PStream &io) const |
Perform the act of binding arguments on a stream with an object instance. | |
Protected Attributes | |
FunctionType | m_function |
Trampoline for a void 0-argument function.
Definition at line 950 of file RemoteTrampoline.h.
typedef void(* PLearn::FRemoteTrampoline_0< void >::FunctionType)() |
Definition at line 954 of file RemoteTrampoline.h.
typedef RemoteTrampoline PLearn::FRemoteTrampoline_0< void >::inherited |
Definition at line 952 of file RemoteTrampoline.h.
anonymous enum |
Definition at line 953 of file RemoteTrampoline.h.
{ expected_nargs = 0 };
PLearn::FRemoteTrampoline_0< void >::FRemoteTrampoline_0 | ( | const string & | functionname, |
const RemoteMethodDoc & | doc, | ||
FunctionType | m, | ||
const flag_t & | flgs = 0 |
||
) | [inline] |
Definition at line 956 of file RemoteTrampoline.h.
: inherited(functionname, (doc, RetTypeDoc("void")), flgs), m_function(m) { }
virtual void PLearn::FRemoteTrampoline_0< void >::call | ( | Object * | instance, |
int | nargs, | ||
PStream & | io | ||
) | const [inline, virtual] |
Perform the act of binding arguments on a stream with an object instance.
The actual number of arguments is passed only for error-checking, since the trampoline knows the number of arguments that it is expecting. If this is used to call a global function or a static method that was declared with declareFunction, instead of a regular method declared with declareMethod, then the instance argument is ignored (and should be passed 0 by convention).
Implements PLearn::RemoteTrampoline.
Definition at line 962 of file RemoteTrampoline.h.
References PLearn::RemoteTrampoline::checkNargs(), PLearn::RemoteTrampoline_0< T, R >::expected_nargs, and PLearn::RemoteTrampoline::sendRemoteMethodVoidResult().
{ checkNargs(nargs, expected_nargs); (*m_function)(); sendRemoteMethodVoidResult(io); }
FunctionType PLearn::FRemoteTrampoline_0< void >::m_function [protected] |
Definition at line 980 of file RemoteTrampoline.h.