src/inVRs/Modules/3DPhysics/SynchronisationMacros.h File Reference
Defines | |
| #define | DECLARE_SERVER_METHOD1(_method, _argType1) |
| #define | SERVER_METHOD1(_class, _method, _argType1) |
| #define | DECLARE_SERVER_METHOD2(_method, _argType1, _argType2) |
| #define | SERVER_METHOD2(_class, _method, _argType1, _argType2) |
| #define | DECLARE_SERVER_METHOD3(_method, _argType1, _argType2, _argType3) |
| #define | SERVER_METHOD3(_class, _method, _argType1, _argType2, _argType3) |
| #define | DECLARE_SERVER_METHOD4(_method, _argType1, _argType2, _argType3, _argType4) |
| #define | SERVER_METHOD4(_class, _method, _argType1, _argType2, _argType3, _argType4) |
Define Documentation
| #define DECLARE_SERVER_METHOD1 | ( | _method, | |||
| _argType1 | ) |
Value:
protected: \ void _method ## _sync(_argType1); \ void _method ## _server(_argType1); \ public: \ void _method
| #define DECLARE_SERVER_METHOD2 | ( | _method, | |||
| _argType1, | |||||
| _argType2 | ) |
Value:
protected: \ void _method ## _sync(_argType1, _argType2); \ void _method ## _server(_argType1, _argType2); \ public: \ void _method
| #define DECLARE_SERVER_METHOD3 | ( | _method, | |||
| _argType1, | |||||
| _argType2, | |||||
| _argType3 | ) |
Value:
protected: \ void _method ## _sync(_argType1, _argType2, _argType3); \ void _method ## _server(_argType1, _argType2, _argType3); \ public: \ void _method
| #define DECLARE_SERVER_METHOD4 | ( | _method, | |||
| _argType1, | |||||
| _argType2, | |||||
| _argType3, | |||||
| _argType4 | ) |
Value:
protected: \ void _method ## _sync(_argType1, _argType2, _argType3, _argType4); \ void _method ## _server(_argType1, _argType2, _argType3, _argType4); \ public: \ void _method
| #define SERVER_METHOD1 | ( | _class, | |||
| _method, | |||||
| _argType1 | ) |
Value:
void _class::_method(_argType1 _arg1) { \ if (Physics::isServer()) \ _class::_method ## _server(_arg1); \ else \ _class::_method ## _sync(_arg1); \ } \ void _class::_method ## _sync(_argType1 _arg1) { \ NetMessage* msg = RPCObjectInterface::createSyncMessage(); \ msgFunctions::encode(FUNCTION_ ## _method, msg); \ msgFunctions::encode(_arg1, msg); \ Physics::syncToServer(msg); \ delete msg; \ } \ void _class::_method ## _server
| #define SERVER_METHOD2 | ( | _class, | |||
| _method, | |||||
| _argType1, | |||||
| _argType2 | ) |
Value:
void _class::_method(_argType1 _arg1, _argType2 _arg2) { \ if (Physics::isServer()) \ _class::_method ## _server(_arg1, _arg2); \ else \ _class::_method ## _sync(_arg1, _arg2); \ } \ void _class::_method ## _sync(_argType1 _arg1, _argType2 _arg2) { \ NetMessage* msg = RPCObjectInterface::createSyncMessage(); \ msgFunctions::encode(FUNCTION_ ## _method, msg); \ msgFunctions::encode(_arg1, msg); \ msgFunctions::encode(_arg2, msg); \ Physics::syncToServer(msg); \ delete msg; \ } \ void _class::_method ## _server
| #define SERVER_METHOD3 | ( | _class, | |||
| _method, | |||||
| _argType1, | |||||
| _argType2, | |||||
| _argType3 | ) |
Value:
void _class::_method(_argType1 _arg1, _argType2 _arg2, _argType3 _arg3) { \ if (Physics::isServer()) \ _class::_method ## _server(_arg1, _arg2, _arg3); \ else \ _class::_method ## _sync(_arg1, _arg2, _arg3); \ } \ void _class::_method ## _sync(_argType1 _arg1, _argType2 _arg2, _argType3 _arg3) { \ NetMessage* msg = RPCObjectInterface::createSyncMessage(); \ msgFunctions::encode(FUNCTION_ ## _method, msg); \ msgFunctions::encode(_arg1, msg); \ msgFunctions::encode(_arg2, msg); \ msgFunctions::encode(_arg3, msg); \ Physics::syncToServer(msg); \ delete msg; \ } \ void _class::_method ## _server
| #define SERVER_METHOD4 | ( | _class, | |||
| _method, | |||||
| _argType1, | |||||
| _argType2, | |||||
| _argType3, | |||||
| _argType4 | ) |
Value:
void _class::_method(_argType1 _arg1, _argType2 _arg2, _argType3 _arg3, _argType4 _arg4) { \ if (Physics::isServer()) \ _class::_method ## _server(_arg1, _arg2, _arg3, _arg4); \ else \ _class::_method ## _sync(_arg1, _arg2, _arg3, _arg4); \ } \ void _class::_method ## _sync(_argType1 _arg1, _argType2 _arg2, _argType3 _arg3, _argType4 _arg4) { \ NetMessage* msg = RPCObjectInterface::createSyncMessage(); \ msgFunctions::encode(FUNCTION_ ## _method, msg); \ msgFunctions::encode(_arg1, msg); \ msgFunctions::encode(_arg2, msg); \ msgFunctions::encode(_arg3, msg); \ msgFunctions::encode(_arg4, msg); \ Physics::syncToServer(msg); \ delete msg; \ } \ void _class::_method ## _server
Generated on Wed Oct 20 16:11:44 2010 for inVRs by
1.5.8