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 "RakServerInterface.h"
|
||||
|
||||
#include "RakClientInterface.h"
|
||||
#include "RakServer.h"
|
||||
|
||||
#include "RakClient.h"
|
||||
#include "RakPeerInterface.h"
|
||||
#include "RakPeer.h"
|
||||
|
||||
RakClientInterface* RakNetworkFactory::GetRakClientInterface( void )
|
||||
{
|
||||
return new RakClient;
|
||||
}
|
||||
RakServerInterface* RakNetworkFactory::GetRakServerInterface( void )
|
||||
{
|
||||
return new RakServer;
|
||||
@ -15,4 +18,20 @@ RakServerInterface* RakNetworkFactory::GetRakServerInterface( void )
|
||||
RakPeerInterface* RakNetworkFactory::GetRakPeerInterface( void )
|
||||
{
|
||||
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
|
||||
#define __RAK_NETWORK_FACTORY_H
|
||||
|
||||
#include "Export.h"
|
||||
|
||||
class RakClientInterface;
|
||||
class RakServerInterface;
|
||||
class RakPeerInterface;
|
||||
|
||||
@ -13,9 +12,13 @@ class RAK_DLL_EXPORT RakNetworkFactory
|
||||
{
|
||||
public:
|
||||
|
||||
static RakClientInterface* GetRakClientInterface( void );
|
||||
static RakServerInterface* GetRakServerInterface( void );
|
||||
static RakPeerInterface* GetRakPeerInterface( void );
|
||||
|
||||
static void DestroyRakClientInterface( RakClientInterface* i );
|
||||
static void DestroyRakServerInterface( RakServerInterface* i );
|
||||
static void DestroyRakPeerInterface( RakPeerInterface* i );
|
||||
};
|
||||
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user