SA-MP/raknet/RakNetworkFactory.cpp

148 lines
3.8 KiB
C++
Raw Normal View History

/// \file
///
/// 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.rakkarsoft.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.
2023-11-17 23:54:20 +08:00
#include "LogCommandParser.h"
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"
#include "ConsoleServer.h"
#include "PacketLogger.h"
#include "RakNetCommandParser.h"
#include "ReplicaManager.h"
#include "RakNetTransport.h"
#include "TelnetTransport.h"
#include "PacketConsoleLogger.h"
#include "PacketFileLogger.h"
#include "Router.h"
#include "ConnectionGraph.h"
2023-11-18 00:00:52 +08:00
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;
}
ConsoleServer* RakNetworkFactory::GetConsoleServer( void )
{
return new ConsoleServer;
}
ReplicaManager* RakNetworkFactory::GetReplicaManager( void )
{
return new ReplicaManager;
}
LogCommandParser* RakNetworkFactory::GetLogCommandParser( void )
{
return new LogCommandParser;
}
PacketLogger* RakNetworkFactory::GetPacketLogger( void )
{
return new PacketLogger;
}
RakNetCommandParser* RakNetworkFactory::GetRakNetCommandParser( void )
{
return new RakNetCommandParser;
}
RakNetTransport* RakNetworkFactory::GetRakNetTransport( void )
{
return new RakNetTransport;
}
TelnetTransport* RakNetworkFactory::GetTelnetTransport( void )
{
return new TelnetTransport;
}
PacketConsoleLogger* RakNetworkFactory::GetPacketConsoleLogger( void )
{
return new PacketConsoleLogger;
}
PacketFileLogger* RakNetworkFactory::GetPacketFileLogger( void )
{
return new PacketFileLogger;
}
Router* RakNetworkFactory::GetRouter( void )
{
return new Router;
}
ConnectionGraph* RakNetworkFactory::GetConnectionGraph( void )
{
return new ConnectionGraph;
}
void RakNetworkFactory::DestroyRakClientInterface( RakClientInterface* i )
{
delete ( RakClient* ) i;
}
void RakNetworkFactory::DestroyRakServerInterface( RakServerInterface* i )
{
delete ( RakServer* ) i;
}
void RakNetworkFactory::DestroyRakPeerInterface( RakPeerInterface* i )
{
delete ( RakPeer* ) i;
}
void RakNetworkFactory::DestroyConsoleServer( ConsoleServer* i)
{
delete ( ConsoleServer* ) i;
}
void RakNetworkFactory::DestroyReplicaManager( ReplicaManager* i)
{
delete ( ReplicaManager* ) i;
}
void RakNetworkFactory::DestroyLogCommandParser( LogCommandParser* i)
{
delete ( LogCommandParser* ) i;
}
void RakNetworkFactory::DestroyPacketLogger( PacketLogger* i)
{
delete ( PacketLogger* ) i;
}
void RakNetworkFactory::DestroyRakNetCommandParser( RakNetCommandParser* i )
{
delete ( RakNetCommandParser* ) i;
}
void RakNetworkFactory::DestroyRakNetTransport( RakNetTransport* i )
{
delete ( RakNetTransport* ) i;
}
void RakNetworkFactory::DestroyTelnetTransport( TelnetTransport* i )
{
delete ( TelnetTransport* ) i;
}
void RakNetworkFactory::DestroyPacketConsoleLogger( PacketConsoleLogger* i )
{
delete ( PacketConsoleLogger* ) i;
}
void RakNetworkFactory::DestroyPacketFileLogger( PacketFileLogger* i )
{
delete ( PacketFileLogger* ) i;
}
void RakNetworkFactory::DestroyRouter( Router* i )
{
delete ( Router* ) i;
}
void RakNetworkFactory::DestroyConnectionGraph( ConnectionGraph* i )
{
delete ( ConnectionGraph* ) i;
}