Thread: [Opentnl-cvs] tnl/tnl netObject.cpp,1.5,1.6 tnlMethodDispatch.h,1.12,1.13 tnlTypes.h,1.10,1.11
Brought to you by:
mark_frohnmayer,
s_alanet
From: Mark F. <mar...@us...> - 2005-03-27 07:03:46
|
Update of /cvsroot/opentnl/tnl/tnl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28334/tnl Modified Files: netObject.cpp tnlMethodDispatch.h tnlTypes.h Log Message: Updated method dispatch functors so that classes with multiple inheritance can still use the RPC system Added IBM POWER architectiure PPC switch in tnlTypes Index: tnlTypes.h =================================================================== RCS file: /cvsroot/opentnl/tnl/tnl/tnlTypes.h,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** tnlTypes.h 28 Sep 2004 18:45:25 -0000 1.10 --- tnlTypes.h 27 Mar 2005 07:03:30 -0000 1.11 *************** *** 306,310 **** # endif ! #elif defined(__ppc__) # define TNL_CPU_STRING "PowerPC" # define TNL_CPU_PPC --- 306,310 ---- # endif ! #elif defined(__ppc__) || defined(__powerpc__) || defined (PPC) # define TNL_CPU_STRING "PowerPC" # define TNL_CPU_PPC Index: netObject.cpp =================================================================== RCS file: /cvsroot/opentnl/tnl/tnl/netObject.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** netObject.cpp 21 Feb 2005 07:48:14 -0000 1.5 --- netObject.cpp 27 Mar 2005 07:03:28 -0000 1.6 *************** *** 258,265 **** return; - void *thisPointer = (void *) mDestObject.getPointer(); - NetObject::mRPCSourceConnection = (GhostConnection *) ps; ! mFunctor->dispatch(thisPointer); NetObject::mRPCSourceConnection = NULL; --- 258,263 ---- return; NetObject::mRPCSourceConnection = (GhostConnection *) ps; ! mFunctor->dispatch(mDestObject); NetObject::mRPCSourceConnection = NULL; Index: tnlMethodDispatch.h =================================================================== RCS file: /cvsroot/opentnl/tnl/tnl/tnlMethodDispatch.h,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** tnlMethodDispatch.h 22 Feb 2005 18:04:52 -0000 1.12 --- tnlMethodDispatch.h 27 Mar 2005 07:03:30 -0000 1.13 *************** *** 180,184 **** virtual void write(BitStream &stream) = 0; /// Dispatch the function represented by the Functor. ! virtual void dispatch(void *t) = 0; }; --- 180,184 ---- virtual void write(BitStream &stream) = 0; /// Dispatch the function represented by the Functor. ! virtual void dispatch(Object *t) = 0; }; *************** *** 193,197 **** void read(BitStream &stream) {} void write(BitStream &stream) {} ! void dispatch(void *t) { } }; template <class T> --- 193,197 ---- void read(BitStream &stream) {} void write(BitStream &stream) {} ! void dispatch(Object *t) { } }; template <class T> *************** *** 203,207 **** void read(BitStream &stream) {} void write(BitStream &stream) {} ! void dispatch(void *t) { ((T *)t->*ptr)(); } }; template <class T, class A> --- 203,207 ---- void read(BitStream &stream) {} void write(BitStream &stream) {} ! void dispatch(Object *t) { (static_cast<T *>(t)->*ptr)(); } }; template <class T, class A> *************** *** 213,217 **** void read(BitStream &stream) { Types::read(stream, &a); } void write(BitStream &stream) { Types::write(stream, a); } ! void dispatch(void *t) { (((T *)t)->*ptr)(a); } }; template <class T, class A, class B> --- 213,217 ---- void read(BitStream &stream) { Types::read(stream, &a); } void write(BitStream &stream) { Types::write(stream, a); } ! void dispatch(Object *t) { (static_cast<T *>(t)->*ptr)(a); } }; template <class T, class A, class B> *************** *** 223,227 **** void read(BitStream &stream) { Types::read(stream, &a); Types::read(stream, &b); } void write(BitStream &stream) { Types::write(stream, a); Types::write(stream, b); } ! void dispatch(void *t) { (((T *)t)->*ptr)(a, b); } }; --- 223,227 ---- void read(BitStream &stream) { Types::read(stream, &a); Types::read(stream, &b); } void write(BitStream &stream) { Types::write(stream, a); Types::write(stream, b); } ! void dispatch(Object *t) { (static_cast<T *>(t)->*ptr)(a, b); } }; *************** *** 234,238 **** void read(BitStream &stream) { Types::read(stream, &a); Types::read(stream, &b); Types::read(stream, &c); } void write(BitStream &stream) { Types::write(stream, a); Types::write(stream, b); Types::write(stream, c); } ! void dispatch(void *t) { (((T *)t)->*ptr)(a, b, c); } }; --- 234,238 ---- void read(BitStream &stream) { Types::read(stream, &a); Types::read(stream, &b); Types::read(stream, &c); } void write(BitStream &stream) { Types::write(stream, a); Types::write(stream, b); Types::write(stream, c); } ! void dispatch(Object *t) { (static_cast<T *>(t)->*ptr)(a, b, c); } }; *************** *** 245,249 **** void read(BitStream &stream) { Types::read(stream, &a); Types::read(stream, &b); Types::read(stream, &c); Types::read(stream, &d); } void write(BitStream &stream) { Types::write(stream, a); Types::write(stream, b); Types::write(stream, c); Types::write(stream, d); } ! void dispatch(void *t) { (((T *)t)->*ptr)(a, b, c, d); } }; --- 245,249 ---- void read(BitStream &stream) { Types::read(stream, &a); Types::read(stream, &b); Types::read(stream, &c); Types::read(stream, &d); } void write(BitStream &stream) { Types::write(stream, a); Types::write(stream, b); Types::write(stream, c); Types::write(stream, d); } ! void dispatch(Object *t) { (static_cast<T *>(t)->*ptr)(a, b, c, d); } }; *************** *** 256,260 **** void read(BitStream &stream) { Types::read(stream, &a); Types::read(stream, &b); Types::read(stream, &c); Types::read(stream, &d); Types::read(stream, &e); } void write(BitStream &stream) { Types::write(stream, a); Types::write(stream, b); Types::write(stream, c); Types::write(stream, d); Types::write(stream, e); } ! void dispatch(void *t) { (((T *)t)->*ptr)(a, b, c, d, e); } }; --- 256,260 ---- void read(BitStream &stream) { Types::read(stream, &a); Types::read(stream, &b); Types::read(stream, &c); Types::read(stream, &d); Types::read(stream, &e); } void write(BitStream &stream) { Types::write(stream, a); Types::write(stream, b); Types::write(stream, c); Types::write(stream, d); Types::write(stream, e); } ! void dispatch(Object *t) { (static_cast<T *>(t)->*ptr)(a, b, c, d, e); } }; *************** *** 267,271 **** void read(BitStream &stream) { Types::read(stream, &a); Types::read(stream, &b); Types::read(stream, &c); Types::read(stream, &d); Types::read(stream, &e); Types::read(stream, &f); } void write(BitStream &stream) { Types::write(stream, a); Types::write(stream, b); Types::write(stream, c); Types::write(stream, d); Types::write(stream, e); Types::write(stream, f); } ! void dispatch(void *t) { (((T *)t)->*ptr)(a, b, c, d, e, f); } }; --- 267,271 ---- void read(BitStream &stream) { Types::read(stream, &a); Types::read(stream, &b); Types::read(stream, &c); Types::read(stream, &d); Types::read(stream, &e); Types::read(stream, &f); } void write(BitStream &stream) { Types::write(stream, a); Types::write(stream, b); Types::write(stream, c); Types::write(stream, d); Types::write(stream, e); Types::write(stream, f); } ! void dispatch(Object *t) { (static_cast<T *>(t)->*ptr)(a, b, c, d, e, f); } }; *************** *** 278,282 **** void read(BitStream &stream) { Types::read(stream, &a); Types::read(stream, &b); Types::read(stream, &c); Types::read(stream, &d); Types::read(stream, &e); Types::read(stream, &f); Types::read(stream, &g); } void write(BitStream &stream) { Types::write(stream, a); Types::write(stream, b); Types::write(stream, c); Types::write(stream, d); Types::write(stream, e); Types::write(stream, f); Types::write(stream, g); } ! void dispatch(void *t) { (((T *)t)->*ptr)(a, b, c, d, e, f, g); } }; --- 278,282 ---- void read(BitStream &stream) { Types::read(stream, &a); Types::read(stream, &b); Types::read(stream, &c); Types::read(stream, &d); Types::read(stream, &e); Types::read(stream, &f); Types::read(stream, &g); } void write(BitStream &stream) { Types::write(stream, a); Types::write(stream, b); Types::write(stream, c); Types::write(stream, d); Types::write(stream, e); Types::write(stream, f); Types::write(stream, g); } ! void dispatch(Object *t) { (static_cast<T *>(t)->*ptr)(a, b, c, d, e, f, g); } }; *************** *** 289,293 **** void read(BitStream &stream) { Types::read(stream, &a); Types::read(stream, &b); Types::read(stream, &c); Types::read(stream, &d); Types::read(stream, &e); Types::read(stream, &f); Types::read(stream, &g); Types::read(stream, &h); } void write(BitStream &stream) { Types::write(stream, a); Types::write(stream, b); Types::write(stream, c); Types::write(stream, d); Types::write(stream, e); Types::write(stream, f); Types::write(stream, g); Types::write(stream, h); } ! void dispatch(void *t) { (((T *)t)->*ptr)(a, b, c, d, e, f, g, h); } }; --- 289,293 ---- void read(BitStream &stream) { Types::read(stream, &a); Types::read(stream, &b); Types::read(stream, &c); Types::read(stream, &d); Types::read(stream, &e); Types::read(stream, &f); Types::read(stream, &g); Types::read(stream, &h); } void write(BitStream &stream) { Types::write(stream, a); Types::write(stream, b); Types::write(stream, c); Types::write(stream, d); Types::write(stream, e); Types::write(stream, f); Types::write(stream, g); Types::write(stream, h); } ! void dispatch(Object *t) { (static_cast<T *>(t)->*ptr)(a, b, c, d, e, f, g, h); } }; *************** *** 300,304 **** void read(BitStream &stream) { Types::read(stream, &a); Types::read(stream, &b); Types::read(stream, &c); Types::read(stream, &d); Types::read(stream, &e); Types::read(stream, &f); Types::read(stream, &g); Types::read(stream, &h); Types::read(stream, &i); } void write(BitStream &stream) { Types::write(stream, a); Types::write(stream, b); Types::write(stream, c); Types::write(stream, d); Types::write(stream, e); Types::write(stream, f); Types::write(stream, g); Types::write(stream, h); Types::write(stream, i); } ! void dispatch(void *t) { (((T *)t)->*ptr)(a, b, c, d, e, f, g, h, i); } }; --- 300,304 ---- void read(BitStream &stream) { Types::read(stream, &a); Types::read(stream, &b); Types::read(stream, &c); Types::read(stream, &d); Types::read(stream, &e); Types::read(stream, &f); Types::read(stream, &g); Types::read(stream, &h); Types::read(stream, &i); } void write(BitStream &stream) { Types::write(stream, a); Types::write(stream, b); Types::write(stream, c); Types::write(stream, d); Types::write(stream, e); Types::write(stream, f); Types::write(stream, g); Types::write(stream, h); Types::write(stream, i); } ! void dispatch(Object *t) { (static_cast<T *>(t)->*ptr)(a, b, c, d, e, f, g, h, i); } }; *************** *** 311,315 **** void read(BitStream &stream) { Types::read(stream, &a); Types::read(stream, &b); Types::read(stream, &c); Types::read(stream, &d); Types::read(stream, &e); Types::read(stream, &f); Types::read(stream, &g); Types::read(stream, &h); Types::read(stream, &i); Types::read(stream, &j); } void write(BitStream &stream) { Types::write(stream, a); Types::write(stream, b); Types::write(stream, c); Types::write(stream, d); Types::write(stream, e); Types::write(stream, f); Types::write(stream, g); Types::write(stream, h); Types::write(stream, i); Types::write(stream, j); } ! void dispatch(void *t) { (((T *)t)->*ptr)(a, b, c, d, e, f, g, h, i, j); } }; --- 311,315 ---- void read(BitStream &stream) { Types::read(stream, &a); Types::read(stream, &b); Types::read(stream, &c); Types::read(stream, &d); Types::read(stream, &e); Types::read(stream, &f); Types::read(stream, &g); Types::read(stream, &h); Types::read(stream, &i); Types::read(stream, &j); } void write(BitStream &stream) { Types::write(stream, a); Types::write(stream, b); Types::write(stream, c); Types::write(stream, d); Types::write(stream, e); Types::write(stream, f); Types::write(stream, g); Types::write(stream, h); Types::write(stream, i); Types::write(stream, j); } ! void dispatch(Object *t) { (static_cast<T *>(t)->*ptr)(a, b, c, d, e, f, g, h, i, j); } }; |