mirror of
https://github.com/dashr9230/SA-MP.git
synced 2025-01-03 16:13:34 +08:00
[raknet] Update RakNetworkFactory
This commit implements: * GetRakClientInterface() * DestroyRakClientInterface() * DestroyRakServerInterface() * DestroyRakPeerInterface()
This commit is contained in:
parent
68cd566ffc
commit
118153f727
@ -1,13 +1,16 @@
|
|||||||
// TODO: Implement RakNetworkFactory.cpp
|
|
||||||
|
|
||||||
#include "RakNetworkFactory.h"
|
#include "RakNetworkFactory.h"
|
||||||
#include "RakServerInterface.h"
|
#include "RakServerInterface.h"
|
||||||
|
#include "RakClientInterface.h"
|
||||||
#include "RakServer.h"
|
#include "RakServer.h"
|
||||||
|
#include "RakClient.h"
|
||||||
#include "RakPeerInterface.h"
|
#include "RakPeerInterface.h"
|
||||||
#include "RakPeer.h"
|
#include "RakPeer.h"
|
||||||
|
|
||||||
|
RakClientInterface* RakNetworkFactory::GetRakClientInterface( void )
|
||||||
|
{
|
||||||
|
return new RakClient;
|
||||||
|
}
|
||||||
RakServerInterface* RakNetworkFactory::GetRakServerInterface( void )
|
RakServerInterface* RakNetworkFactory::GetRakServerInterface( void )
|
||||||
{
|
{
|
||||||
return new RakServer;
|
return new RakServer;
|
||||||
@ -15,4 +18,20 @@ RakServerInterface* RakNetworkFactory::GetRakServerInterface( void )
|
|||||||
RakPeerInterface* RakNetworkFactory::GetRakPeerInterface( void )
|
RakPeerInterface* RakNetworkFactory::GetRakPeerInterface( void )
|
||||||
{
|
{
|
||||||
return new RakPeer;
|
return new RakPeer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void RakNetworkFactory::DestroyRakClientInterface( RakClientInterface* i )
|
||||||
|
{
|
||||||
|
delete ( RakClient* ) i;
|
||||||
|
}
|
||||||
|
void RakNetworkFactory::DestroyRakServerInterface( RakServerInterface* i )
|
||||||
|
{
|
||||||
|
delete ( RakServer* ) i;
|
||||||
|
}
|
||||||
|
void RakNetworkFactory::DestroyRakPeerInterface( RakPeerInterface* i )
|
||||||
|
{
|
||||||
|
delete ( RakPeer* ) i;
|
||||||
|
}
|
||||||
|
@ -1,11 +1,10 @@
|
|||||||
|
|
||||||
// TODO: Implement RakNetworkFactory.h
|
|
||||||
|
|
||||||
#ifndef __RAK_NETWORK_FACTORY_H
|
#ifndef __RAK_NETWORK_FACTORY_H
|
||||||
#define __RAK_NETWORK_FACTORY_H
|
#define __RAK_NETWORK_FACTORY_H
|
||||||
|
|
||||||
#include "Export.h"
|
#include "Export.h"
|
||||||
|
|
||||||
|
class RakClientInterface;
|
||||||
class RakServerInterface;
|
class RakServerInterface;
|
||||||
class RakPeerInterface;
|
class RakPeerInterface;
|
||||||
|
|
||||||
@ -13,9 +12,13 @@ class RAK_DLL_EXPORT RakNetworkFactory
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
static RakClientInterface* GetRakClientInterface( void );
|
||||||
static RakServerInterface* GetRakServerInterface( void );
|
static RakServerInterface* GetRakServerInterface( void );
|
||||||
static RakPeerInterface* GetRakPeerInterface( void );
|
static RakPeerInterface* GetRakPeerInterface( void );
|
||||||
|
|
||||||
|
static void DestroyRakClientInterface( RakClientInterface* i );
|
||||||
|
static void DestroyRakServerInterface( RakServerInterface* i );
|
||||||
|
static void DestroyRakPeerInterface( RakPeerInterface* i );
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user