PLearn 0.1
Public Types | Public Member Functions | Protected Attributes
PLearn::FRemoteTrampoline_0< R > Struct Template Reference

Trampolines for functions. More...

#include <RemoteTrampoline.h>

Inheritance diagram for PLearn::FRemoteTrampoline_0< R >:
Inheritance graph
[legend]
Collaboration diagram for PLearn::FRemoteTrampoline_0< R >:
Collaboration graph
[legend]

List of all members.

Public Types

enum  { expected_nargs = 0 }
typedef RemoteTrampoline inherited
typedef R(* 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

Detailed Description

template<class R>
struct PLearn::FRemoteTrampoline_0< R >

Trampolines for functions.

Trampoline for a non-void 0-argument function

Definition at line 911 of file RemoteTrampoline.h.


Member Typedef Documentation

template<class R >
typedef R(* PLearn::FRemoteTrampoline_0< R >::FunctionType)()

Definition at line 915 of file RemoteTrampoline.h.

template<class R >
typedef RemoteTrampoline PLearn::FRemoteTrampoline_0< R >::inherited

Definition at line 913 of file RemoteTrampoline.h.


Member Enumeration Documentation

template<class R >
anonymous enum
Enumerator:
expected_nargs 

Definition at line 914 of file RemoteTrampoline.h.

{ expected_nargs = 0 };

Constructor & Destructor Documentation

template<class R >
PLearn::FRemoteTrampoline_0< R >::FRemoteTrampoline_0 ( const string &  functionname,
const RemoteMethodDoc doc,
FunctionType  m,
const flag_t flgs = 0 
) [inline]

Definition at line 917 of file RemoteTrampoline.h.

        : inherited(functionname, (doc,
                                 RTYPE_DOC(R)),
                    flgs),
          m_function(m)
    { }

Member Function Documentation

template<class R >
virtual void PLearn::FRemoteTrampoline_0< R >::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 925 of file RemoteTrampoline.h.

References PLearn::RemoteTrampoline::checkNargs(), PLearn::RemoteTrampoline_0< T, R >::expected_nargs, PLearn::RemoteTrampoline::sendRemoteMethodResult(), and TRAMPOLINE_TYPE.

Here is the call graph for this function:


Member Data Documentation

template<class R >
FunctionType PLearn::FRemoteTrampoline_0< R >::m_function [protected]

Definition at line 943 of file RemoteTrampoline.h.


The documentation for this struct was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines