mirror of
https://github.com/debauchee/barrier.git
synced 2024-11-22 15:45:22 +03:00
32 lines
470 B
C++
32 lines
470 B
C++
|
#include "CSocketFactory.h"
|
||
|
#include "BasicTypes.h"
|
||
|
#include <assert.h>
|
||
|
|
||
|
//
|
||
|
// CSocketFactory
|
||
|
//
|
||
|
|
||
|
CSocketFactory* CSocketFactory::s_instance = NULL;
|
||
|
|
||
|
CSocketFactory::CSocketFactory()
|
||
|
{
|
||
|
// do nothing
|
||
|
}
|
||
|
|
||
|
CSocketFactory::~CSocketFactory()
|
||
|
{
|
||
|
// do nothing
|
||
|
}
|
||
|
|
||
|
void CSocketFactory::setInstance(CSocketFactory* factory)
|
||
|
{
|
||
|
delete s_instance;
|
||
|
s_instance = factory;
|
||
|
}
|
||
|
|
||
|
CSocketFactory* CSocketFactory::getInstance()
|
||
|
{
|
||
|
assert(s_instance != NULL);
|
||
|
return s_instance;
|
||
|
}
|