SA-MP/raknet/RakNetworkFactory.cpp
RD42 118153f727 [raknet] Update RakNetworkFactory
This commit implements:
* GetRakClientInterface()
* DestroyRakClientInterface()
* DestroyRakServerInterface()
* DestroyRakPeerInterface()
2023-12-16 23:25:47 +08:00

38 lines
789 B
C++

#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;
}
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;
}