PLearn 0.1
Public Types | Public Member Functions | Protected Attributes
PLearn::RemoteTrampoline_5< T, R, A1, A2, A3, A4, A5 > Struct Template Reference

Trampoline for a non-void non-const 5-argument method. More...

#include <RemoteTrampoline.h>

Inheritance diagram for PLearn::RemoteTrampoline_5< T, R, A1, A2, A3, A4, A5 >:
Inheritance graph
[legend]
Collaboration diagram for PLearn::RemoteTrampoline_5< T, R, A1, A2, A3, A4, A5 >:
Collaboration graph
[legend]

List of all members.

Public Types

enum  { expected_nargs = 5 }
typedef RemoteTrampoline inherited
typedef R(T::* MethodType )(A1, A2, A3, A4, A5)

Public Member Functions

 RemoteTrampoline_5 (const string &methodname, const RemoteMethodDoc &doc, MethodType m, const flag_t &flgs=0)
virtual void call (Object *instance, int nargs, PStream &io) const
 Perform the act of binding arguments on a stream with an object instance.

Protected Attributes

MethodType m_method

Detailed Description

template<class T, class R, class A1, class A2, class A3, class A4, class A5>
struct PLearn::RemoteTrampoline_5< T, R, A1, A2, A3, A4, A5 >

Trampoline for a non-void non-const 5-argument method.

Definition at line 694 of file RemoteTrampoline.h.


Member Typedef Documentation

template<class T , class R , class A1 , class A2 , class A3 , class A4 , class A5 >
typedef RemoteTrampoline PLearn::RemoteTrampoline_5< T, R, A1, A2, A3, A4, A5 >::inherited

Definition at line 696 of file RemoteTrampoline.h.

template<class T , class R , class A1 , class A2 , class A3 , class A4 , class A5 >
typedef R(T::* PLearn::RemoteTrampoline_5< T, R, A1, A2, A3, A4, A5 >::MethodType)(A1, A2, A3, A4, A5)

Definition at line 698 of file RemoteTrampoline.h.


Member Enumeration Documentation

template<class T , class R , class A1 , class A2 , class A3 , class A4 , class A5 >
anonymous enum
Enumerator:
expected_nargs 

Definition at line 697 of file RemoteTrampoline.h.

{ expected_nargs = 5 };

Constructor & Destructor Documentation

template<class T , class R , class A1 , class A2 , class A3 , class A4 , class A5 >
PLearn::RemoteTrampoline_5< T, R, A1, A2, A3, A4, A5 >::RemoteTrampoline_5 ( const string &  methodname,
const RemoteMethodDoc doc,
MethodType  m,
const flag_t flgs = 0 
) [inline]

Definition at line 700 of file RemoteTrampoline.h.

        : inherited(methodname, (doc,
                                 RTYPE_DOC(R),
                                 ATYPE_DOC(A1), ATYPE_DOC(A2), ATYPE_DOC(A3),
                                 ATYPE_DOC(A4), ATYPE_DOC(A5)),
                    flgs),
          m_method(m)
    { }

Member Function Documentation

template<class T , class R , class A1 , class A2 , class A3 , class A4 , class A5 >
virtual void PLearn::RemoteTrampoline_5< T, R, A1, A2, A3, A4, A5 >::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 710 of file RemoteTrampoline.h.

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

    {
        checkNargs(nargs, expected_nargs);
        TRAMPOLINE_TYPE(A1) a1;  io >> a1;
        TRAMPOLINE_TYPE(A2) a2;  io >> a2;
        TRAMPOLINE_TYPE(A3) a3;  io >> a3;
        TRAMPOLINE_TYPE(A4) a4;  io >> a4;
        TRAMPOLINE_TYPE(A5) a5;  io >> a5;
        TRAMPOLINE_TYPE(R) r = (as<T>(instance)->*m_method)(a1,a2,a3,a4,a5);
        sendRemoteMethodResult(io, r);
    }

Here is the call graph for this function:


Member Data Documentation

template<class T , class R , class A1 , class A2 , class A3 , class A4 , class A5 >
MethodType PLearn::RemoteTrampoline_5< T, R, A1, A2, A3, A4, A5 >::m_method [protected]

Definition at line 737 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