#include "NetworkPrereqs.h"
#include <cassert>
#include <cstring>
#include <map>
#include <string>
#include <boost/preprocessor/cat.hpp>
#include <boost/static_assert.hpp>
#include "core/OrxonoxClass.h"
#include "core/Functor.h"
#include "FunctionCallManager.h"
#include "synchronisable/Synchronisable.h"
Namespaces | |
namespace | orxonox |
Classes | |
class | orxonox::NetworkFunctionBase |
struct | orxonox::NetworkFunctionPointer |
class | orxonox::NetworkFunctionStatic |
class | orxonox::NetworkMemberFunction< T > |
class | orxonox::NetworkMemberFunctionBase |
Defines | |
#define | callMemberNetworkFunction(class, function, objectID,...) |
#define | callStaticNetworkFunction(functionPointer,...) |
#define | registerMemberNetworkFunction(class, function) static void* BOOST_PP_CAT( NETWORK_FUNCTION_##class, __LINE__ ) = registerMemberNetworkFunctionFct<class>( &class::function, #class "_" #function); |
#define | registerStaticNetworkFunction(functionPointer) static void* BOOST_PP_CAT( NETWORK_FUNCTION_, __LINE__ ) = registerStaticNetworkFunctionFct( functionPointer, #functionPointer ); |
Functions | |
template<class T> | |
void | orxonox::copyPtr (T ptr, NetworkFunctionPointer &destptr) |
template<class T, class PT> | |
void * | orxonox::registerMemberNetworkFunctionFct (PT ptr, const std::string &name) |
template<class T> | |
void * | orxonox::registerStaticNetworkFunctionFct (T ptr, const std::string &name) |
Variables | |
static const unsigned int | orxonox::MAX_FUNCTION_POINTER_INTS = (MAX_FUNCTION_POINTER_SIZE-1)/4+1 |
static const unsigned int | orxonox::MAX_FUNCTION_POINTER_SIZE = 16 |
#define callMemberNetworkFunction | ( | class, | |||
function, | |||||
objectID, | |||||
... | ) |
Value:
{ \ NetworkFunctionPointer p1; \ copyPtr( &class::function, p1 ); \ FunctionCallManager::addCallMember(NetworkMemberFunctionBase::getFunction(p1)->getNetworkID(), objectID, __VA_ARGS__); \ }
Referenced by orxonox::Test::call2(), orxonox::Pawn::doFire(), orxonox::GametypeInfo::sendAnnounceMessage(), orxonox::GametypeInfo::sendDeathMessage(), and orxonox::GametypeInfo::sendKillMessage().
#define callStaticNetworkFunction | ( | functionPointer, | |||
... | ) |
Value:
{ \ NetworkFunctionPointer p1; \ copyPtr( functionPointer, p1 ); \ FunctionCallManager::addCallStatic(NetworkFunctionStatic::getFunction(p1)->getNetworkID(), __VA_ARGS__); \ }
Referenced by orxonox::Test::call().
#define registerMemberNetworkFunction | ( | class, | |||
function | ) | static void* BOOST_PP_CAT( NETWORK_FUNCTION_##class, __LINE__ ) = registerMemberNetworkFunctionFct<class>( &class::function, #class "_" #function); |
#define registerStaticNetworkFunction | ( | functionPointer | ) | static void* BOOST_PP_CAT( NETWORK_FUNCTION_, __LINE__ ) = registerStaticNetworkFunctionFct( functionPointer, #functionPointer ); |