29 #ifndef _NetworkFunctionIncludes_H__ 30 #define _NetworkFunctionIncludes_H__ 34 #include <boost/preprocessor/cat.hpp> 39 #define registerStaticNetworkFunction( functionPointer ) \ 40 static orxonox::NetworkFunctionBase& BOOST_PP_CAT( NETWORK_FUNCTION_, __UNIQUE_NUMBER__ ) \ 41 = (new orxonox::SI_NF(orxonox::registerStaticNetworkFunctionFct( functionPointer, #functionPointer )))->getFunction() 43 #define registerMemberNetworkFunction( class, function ) \ 44 static orxonox::NetworkFunctionBase& BOOST_PP_CAT( NETWORK_FUNCTION_##class, __UNIQUE_NUMBER__ ) \ 45 = (new orxonox::SI_NF(orxonox::registerMemberNetworkFunctionFct<class>( &class::function, #class "_" #function)))->getFunction() 58 virtual void load()
override;
59 virtual void unload()
override;
62 {
return *this->function_; }
79 template<
class T,
class PT>
114 memcpy(&destptr, &p2,
sizeof(PT));
Definition: NetworkFunction.h:83
void callMemberNetworkFunction(PT ptr, uint32_t objectID, uint32_t clientID, const MultiType &mt1=MultiType::Null, const MultiType &mt2=MultiType::Null, const MultiType &mt3=MultiType::Null, const MultiType &mt4=MultiType::Null, const MultiType &mt5=MultiType::Null)
Definition: NetworkFunctionIncludes.h:101
Shared library macros, enums, constants and forward declarations for the network library ...
Definition: NetworkFunctionIncludes.h:49
Definition: NetworkFunction.h:53
static constexpr Type NETWORK_FUNCTION
Definition: NetworkPrereqs.h:100
::std::string string
Definition: gtest-port.h:756
StaticallyInitializedNetworkFunction SI_NF
Definition: NetworkFunctionIncludes.h:68
NetworkFunctionBase * registerMemberNetworkFunctionFct(PT ptr, const std::string &name)
Definition: NetworkFunctionIncludes.h:80
uint32_t getNetworkIdForPointer(const NetworkFunctionPointer &pointer)
Definition: NetworkFunctionIncludes.cc:49
FunctorMemberPtr< O > createFunctor(R(O::*functionPointer)(Params...), OO *object)
Creates a new FunctorMember with the given function-pointer and an assigned object.
Definition: Functor.h:583
static void addCall(uint32_t functionID, uint32_t objectID, uint32_t peerID, const MultiType &mt1, const MultiType &mt2, const MultiType &mt3, const MultiType &mt4, const MultiType &mt5)
Definition: FunctionCallManager.cc:42
void callStaticNetworkFunction(PT ptr, uint32_t clientID, const MultiType &mt1=MultiType::Null, const MultiType &mt2=MultiType::Null, const MultiType &mt3=MultiType::Null, const MultiType &mt4=MultiType::Null, const MultiType &mt5=MultiType::Null)
Definition: NetworkFunctionIncludes.h:92
void copyPtr(PT ptr, NetworkFunctionPointer &destptr)
Definition: NetworkFunctionIncludes.h:109
Definition: NetworkFunction.h:108
Die Wagnis Klasse hat die folgenden Aufgaben:
Definition: ApplicationPaths.cc:66
#define _NetworkExport
Definition: NetworkPrereqs.h:59
Definition: StaticallyInitializedInstance.h:36
NetworkFunctionBase & getFunction()
Definition: NetworkFunctionIncludes.h:61
The MultiType can hold a value of many possible types and convert them to other types.
Definition: MultiType.h:130
static const MultiType Null
Definition: MultiType.h:304
StaticallyInitializedNetworkFunction(NetworkFunctionBase *function)
Definition: NetworkFunctionIncludes.h:52
NetworkFunctionBase * registerStaticNetworkFunctionFct(PT ptr, const std::string &name)
Definition: NetworkFunctionIncludes.h:71
NetworkFunctionBase * function_
Definition: NetworkFunctionIncludes.h:65
~StaticallyInitializedNetworkFunction()
Definition: NetworkFunctionIncludes.h:56
Definition: NetworkFunction.h:137
static constexpr uint32_t OBJECTID_UNKNOWN
Definition: CorePrereqs.h:71