- Main Page
- Modules
- Namespaces
- Classes
- Files
- Directories
- Related Pages

- File List
- File Members

# AutoRPC.h File Reference

Automatically serializing and deserializing RPC system. More advanced RPC, but possibly not cross-platform. More...

`#include "PluginInterface.h"`
`#include "DS_Map.h"`
`#include "PacketPriority.h"`
`#include "RakNetTypes.h"`
`#include "BitStream.h"`
`#include "Gen_RPC8.h"`
`#include "RakString.h"`
`#include "NetworkIDObject.h"`

## Namespaces
namespace | RakNet
## Classes
class | RakNet::AutoRPC
## Defines
#define | ARPC_MAX_STACK_SIZE 65536
| Maximum amount of data that can be passed on the stack in a function call.
#define | ARPC_REGISTER_CPP_FUNCTION(autoRPCInstance, _IDENTIFIER_, _RETURN_, _CLASS_, _FUNCTION_, _PARAMS_) (autoRPCInstance)->RegisterFunction( (_IDENTIFIER_), GenRPC::PMFWrapper<_CLASS_, _RETURN_(AUTO_RPC_CALLSPEC _CLASS_::*) _PARAMS_ >( &_CLASS_::_FUNCTION_), true, -1 )
#define | ARPC_REGISTER_CPP_FUNCTIONX(autoRPCInstance, _IDENTIFIER_, _RETURN_, _CLASS_, _FUNCTION_, _PARAMS_, _PARAM_COUNT_) (autoRPCInstance)->RegisterFunction( (_IDENTIFIER_), GenRPC::PMFWrapper<_CLASS_, _RETURN_(AUTO_RPC_CALLSPEC _CLASS_::*) _PARAMS_>( &_CLASS_::_FUNCTION_), true, _PARAM_COUNT_ )
#define | ARPC_REGISTER_CPP_FUNCTION_N(autoRPCInstance, _IDENTIFIER_, _RETURN_, _CLASS_, _FUNCTION_,...) (autoRPCInstance)->RegisterFunction( (_IDENTIFIER_), GenRPC::PMFWrapper<_CLASS_, _RETURN_(AUTO_RPC_CALLSPEC _CLASS_::*)(__VA_ARGS__)>( &_CLASS_::_FUNCTION_), true, GenRPC::countFuncArgs( &_CLASS_::_FUNCTION_ ) - 1 )
## Enumerations
enum | RakNet::RPCErrorCodes { RakNet::RPC_ERROR_NETWORK_ID_MANAGER_UNAVAILABLE, RakNet::RPC_ERROR_NETWORK_ID_MANAGER_UNAVAILABLE, RakNet::RPC_ERROR_OBJECT_DOES_NOT_EXIST, RakNet::RPC_ERROR_OBJECT_DOES_NOT_EXIST, RakNet::RPC_ERROR_FUNCTION_INDEX_OUT_OF_RANGE, RakNet::RPC_ERROR_FUNCTION_INDEX_OUT_OF_RANGE, RakNet::RPC_ERROR_FUNCTION_NOT_REGISTERED, RakNet::RPC_ERROR_FUNCTION_NOT_REGISTERED, RakNet::RPC_ERROR_FUNCTION_NO_LONGER_REGISTERED, RakNet::RPC_ERROR_FUNCTION_NO_LONGER_REGISTERED, RakNet::RPC_ERROR_CALLING_CPP_AS_C, RakNet::RPC_ERROR_CALLING_CPP_AS_C, RakNet::RPC_ERROR_CALLING_C_AS_CPP, RakNet::RPC_ERROR_CALLING_C_AS_CPP, RakNet::RPC_ERROR_STACK_TOO_SMALL, RakNet::RPC_ERROR_STACK_DESERIALIZATION_FAILED, RakNet::RPC_ERROR_INCORRECT_NUMBER_OF_PARAMETERS, RakNet::RPC_ERROR_NETWORK_ID_MANAGER_UNAVAILABLE, RakNet::RPC_ERROR_NETWORK_ID_MANAGER_UNAVAILABLE, RakNet::RPC_ERROR_OBJECT_DOES_NOT_EXIST, RakNet::RPC_ERROR_OBJECT_DOES_NOT_EXIST, RakNet::RPC_ERROR_FUNCTION_INDEX_OUT_OF_RANGE, RakNet::RPC_ERROR_FUNCTION_INDEX_OUT_OF_RANGE, RakNet::RPC_ERROR_FUNCTION_NOT_REGISTERED, RakNet::RPC_ERROR_FUNCTION_NOT_REGISTERED, RakNet::RPC_ERROR_FUNCTION_NO_LONGER_REGISTERED, RakNet::RPC_ERROR_FUNCTION_NO_LONGER_REGISTERED, RakNet::RPC_ERROR_CALLING_CPP_AS_C, RakNet::RPC_ERROR_CALLING_CPP_AS_C, RakNet::RPC_ERROR_CALLING_C_AS_CPP, RakNet::RPC_ERROR_CALLING_C_AS_CPP }

## Detailed Description

Automatically serializing and deserializing RPC system. More advanced RPC, but possibly not cross-platform.

Note:
  Semi-depreciated. RPC3 found at DependentExtensions/RPC3 has more features and is easier to use. But if you do not want to link with Boost this version still works.

This file is part of RakNet Copyright 2003 Kevin Jenkins.

Usage of RakNet is subject to the appropriate license agreement. Creative Commons Licensees are subject to the license found at http://creativecommons.org/licenses/by-nc/2.5/ Single application licensees are subject to the license found at http://www.jenkinssoftware.com/SingleApplicationLicense.html Custom license users are subject to the terms therein. GPL license users are subject to the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

## Define Documentation

#define ARPC_REGISTER_CPP_FUNCTION | ( | autoRPCInstance,
|  | _IDENTIFIER_,
|  | _RETURN_,
|  | _CLASS_,
|  | _FUNCTION_,
|  | _PARAMS_ |  | ) | (autoRPCInstance)->RegisterFunction( (_IDENTIFIER_), GenRPC::PMFWrapper<_CLASS_, _RETURN_(AUTO_RPC_CALLSPEC _CLASS_::*) _PARAMS_ >( &_CLASS_::_FUNCTION_), true, -1 )

Get a pointer to a function member of a C++ class.

Note:
  Recommended you use ARPC_REGISTER_CPP_FUNCTION0 to ARPC_REGISTER_CPP_FUNCTION9 (below)

  Cannot validate the number of parameters is correctly passed.

  You must use one of these macros, or the code will be broken.

Parameters:

  `[in]` | autoRPCInstance | A pointer to an instance of AutoRPC
  `[in]` | _IDENTIFIER_ | C string identifier to use on the remote system to call the function
  `[in]` | _RETURN_ | Return value of the function
  `[in]` | _CLASS_ | Base-most class of the containing class that contains your function
  `[in]` | _FUNCTION_ | Name of the function
  `[in]` | _PARAMS_ | Parameter list, include parenthesis

#define ARPC_REGISTER_CPP_FUNCTION_N | ( | autoRPCInstance,
|  | _IDENTIFIER_,
|  | _RETURN_,
|  | _CLASS_,
|  | _FUNCTION_,
|  | ... |  | ) | (autoRPCInstance)->RegisterFunction( (_IDENTIFIER_), GenRPC::PMFWrapper<_CLASS_, _RETURN_(AUTO_RPC_CALLSPEC _CLASS_::*)(__VA_ARGS__)>( &_CLASS_::_FUNCTION_), true, GenRPC::countFuncArgs( &_CLASS_::_FUNCTION_ ) - 1 )

Get a pointer to a function member of a C++ class

Parameters:

  `[in]` | autoRPCInstance | A pointer to an instance of AutoRPC
  `[in]` | _IDENTIFIER_ | C string identifier to use on the remote system to call the function
  `[in]` | _RETURN_ | Return value of the function
  `[in]` | _CLASS_ | Base-most class of the containing class that contains your function
  `[in]` | _FUNCTION_ | Name of the function

#define ARPC_REGISTER_CPP_FUNCTIONX | ( | autoRPCInstance,
|  | _IDENTIFIER_,
|  | _RETURN_,
|  | _CLASS_,
|  | _FUNCTION_,
|  | _PARAMS_,
|  | _PARAM_COUNT_ |  | ) | (autoRPCInstance)->RegisterFunction( (_IDENTIFIER_), GenRPC::PMFWrapper<_CLASS_, _RETURN_(AUTO_RPC_CALLSPEC _CLASS_::*) _PARAMS_>( &_CLASS_::_FUNCTION_), true, _PARAM_COUNT_ )

Get a pointer to a function member of a C++ class.

Note:
  Recommended you use ARPC_REGISTER_CPP_FUNCTION0 to ARPC_REGISTER_CPP_FUNCTION9 (below)

  Cannot validate the number of parameters is correctly passed.

  You must use one of these macros, or the code will be broken.

Parameters:

  `[in]` | autoRPCInstance | A pointer to an instance of AutoRPC
  `[in]` | _IDENTIFIER_ | C string identifier to use on the remote system to call the function
  `[in]` | _RETURN_ | Return value of the function
  `[in]` | _CLASS_ | Base-most class of the containing class that contains your function
  `[in]` | _FUNCTION_ | Name of the function
  `[in]` | _PARAMS_ | Parameter list, include parenthesis
  `[in]` | _PARAM_COUNT_ | Number of parameters.