Update of /cvsroot/opentnl/tnl/tnl
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25378/tnl
Modified Files:
tnlMethodDispatch.cpp tnlMethodDispatch.h tnlNetObject.h
tnlRPC.h
Log Message:
Made TNLTest not using namespace TNL
Fixed RPC parser code to accept TNL:: prefixes to RPC arguments
Index: tnlRPC.h
===================================================================
RCS file: /cvsroot/opentnl/tnl/tnl/tnlRPC.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** tnlRPC.h 19 Aug 2004 20:51:57 -0000 1.8
--- tnlRPC.h 19 Aug 2004 21:20:15 -0000 1.9
***************
*** 190,194 ****
#define TNL_IMPLEMENT_RPC(className, name, args, groupMask, guaranteeType, eventDirection, rpcVersion) \
extern TNL::MethodArgList RPC##className##name; \
! class RPC_##className##_##name : public RPCEvent { \
public: \
void (FN_CDECL className::*mFuncPtr) args; \
--- 190,194 ----
#define TNL_IMPLEMENT_RPC(className, name, args, groupMask, guaranteeType, eventDirection, rpcVersion) \
extern TNL::MethodArgList RPC##className##name; \
! class RPC_##className##_##name : public TNL::RPCEvent { \
public: \
void (FN_CDECL className::*mFuncPtr) args; \
***************
*** 203,207 ****
void FN_CDECL className::name args { SAVE_PARAMS RPC_##className##_##name *theEvent = new RPC_##className##_##name; theEvent->marshallArguments(); postNetEvent(theEvent); } \
TNL::NetEvent * FN_CDECL className::name##_construct args { SAVE_PARAMS RPC_##className##_##name *theEvent = new RPC_##className##_##name; theEvent->marshallArguments(); return theEvent; } \
! void FN_CDECL className::name##_test args { SAVE_PARAMS RPC_##className##_##name *ev = new RPC_##className##_##name; PacketStream ps; ev->marshallArguments(); ev->pack(this, &ps); ps.setBytePosition(0); ev->unpack(this, &ps); ev->process(this); } \
void FN_CDECL className::name##_remote args
};
--- 203,207 ----
void FN_CDECL className::name args { SAVE_PARAMS RPC_##className##_##name *theEvent = new RPC_##className##_##name; theEvent->marshallArguments(); postNetEvent(theEvent); } \
TNL::NetEvent * FN_CDECL className::name##_construct args { SAVE_PARAMS RPC_##className##_##name *theEvent = new RPC_##className##_##name; theEvent->marshallArguments(); return theEvent; } \
! void FN_CDECL className::name##_test args { SAVE_PARAMS RPC_##className##_##name *ev = new RPC_##className##_##name; TNL::PacketStream ps; ev->marshallArguments(); ev->pack(this, &ps); ps.setBytePosition(0); ev->unpack(this, &ps); ev->process(this); } \
void FN_CDECL className::name##_remote args
};
Index: tnlMethodDispatch.cpp
===================================================================
RCS file: /cvsroot/opentnl/tnl/tnl/tnlMethodDispatch.cpp,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** tnlMethodDispatch.cpp 20 May 2004 23:47:30 -0000 1.13
--- tnlMethodDispatch.cpp 19 Aug 2004 21:20:15 -0000 1.14
***************
*** 149,152 ****
--- 149,162 ----
aptr += 13;
}
+ else if(!strncmp(aptr, "const TNL::Vector<", 18))
+ {
+ info.isVector = true;
+ aptr += 18;
+ }
+
+ // strip off any TNL namespace stuff
+ if(!strncmp(aptr, "TNL::", 5))
+ aptr += 5;
+
U32 len = 0;
// grab the type off the arg list pointer:
Index: tnlMethodDispatch.h
===================================================================
RCS file: /cvsroot/opentnl/tnl/tnl/tnlMethodDispatch.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** tnlMethodDispatch.h 30 May 2004 21:31:19 -0000 1.4
--- tnlMethodDispatch.h 19 Aug 2004 21:20:15 -0000 1.5
***************
*** 148,157 ****
extern void *gBasePtr;
! #define SAVE_PARAMS __asm { lea eax, this }; __asm { mov gBasePtr, eax };
#elif defined(TNL_SUPPORTS_GCC_INLINE_X86_ASM )
extern void *gBasePtr;
! #define SAVE_PARAMS gBasePtr = (void *) ((U8 *) __builtin_frame_address(0) + 8);
#elif defined(TNL_SUPPORTS_GCC_INLINE_PPC_ASM )
--- 148,157 ----
extern void *gBasePtr;
! #define SAVE_PARAMS __asm { lea eax, this }; __asm { mov TNL::gBasePtr, eax };
#elif defined(TNL_SUPPORTS_GCC_INLINE_X86_ASM )
extern void *gBasePtr;
! #define SAVE_PARAMS TNL::gBasePtr = (void *) ((U8 *) __builtin_frame_address(0) + 8);
#elif defined(TNL_SUPPORTS_GCC_INLINE_PPC_ASM )
***************
*** 181,185 ****
"stfs f13, 80(r2) \n" \
"stw r1, 84(r2) \n" \
! : : "r" (gRegisterSaves) : "r2" );
#else
--- 181,185 ----
"stfs f13, 80(r2) \n" \
"stw r1, 84(r2) \n" \
! : : "r" (TNL::gRegisterSaves) : "r2" );
#else
Index: tnlNetObject.h
===================================================================
RCS file: /cvsroot/opentnl/tnl/tnl/tnlNetObject.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** tnlNetObject.h 19 Aug 2004 20:51:57 -0000 1.7
--- tnlNetObject.h 19 Aug 2004 21:20:15 -0000 1.8
***************
*** 410,415 ****
public: typedef void (FN_CDECL className::*RPCFuncPtr) args; \
RPCFuncPtr mFuncPtr; \
! U32 pad; \
! RPCEV_##className##_##name(NetObject *theObject = NULL) : TNL::NetObjectRPCEvent(theObject, &RPC##className##name, guaranteeType, eventDirection) \
{ mFuncPtr = &className::name##_remote; } \
TNL_DECLARE_CLASS( RPCEV_##className##_##name ); \
--- 410,415 ----
public: typedef void (FN_CDECL className::*RPCFuncPtr) args; \
RPCFuncPtr mFuncPtr; \
! TNL::U32 pad; \
! RPCEV_##className##_##name(TNL::NetObject *theObject = NULL) : TNL::NetObjectRPCEvent(theObject, &RPC##className##name, guaranteeType, eventDirection) \
{ mFuncPtr = &className::name##_remote; } \
TNL_DECLARE_CLASS( RPCEV_##className##_##name ); \
|