SA-MP/raknet/RakNetworkFactory.cpp

38 lines
789 B
C++
Raw Normal View History

2023-11-17 23:54:20 +08:00
#include "RakNetworkFactory.h"
#include "RakServerInterface.h"
#include "RakClientInterface.h"
2023-11-17 23:54:20 +08:00
#include "RakServer.h"
#include "RakClient.h"
2023-11-18 00:00:52 +08:00
#include "RakPeerInterface.h"
#include "RakPeer.h"
RakClientInterface* RakNetworkFactory::GetRakClientInterface( void )
{
return new RakClient;
}
2023-11-17 23:54:20 +08:00
RakServerInterface* RakNetworkFactory::GetRakServerInterface( void )
{
return new RakServer;
2023-11-18 00:00:52 +08:00
}
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;
}