-
Notifications
You must be signed in to change notification settings - Fork 3
/
DDEServerFactory.cpp
40 lines (30 loc) · 1 KB
/
DDEServerFactory.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
////////////////////////////////////////////////////////////////////////////////
//! \file DDEServerFactory.cpp
//! \brief The DDEServerFactory class definition.
//! \author Chris Oldwood
#include "Common.hpp"
#include "DDEServerFactory.hpp"
namespace DDE
{
//! The factory function.
DDEServerFactory::FactoryFn DDEServerFactory::s_factoryFn = createServer;
////////////////////////////////////////////////////////////////////////////////
//! Create a DDE server instance.
IDDEServerPtr DDEServerFactory::create(DWORD flags)
{
return s_factoryFn(flags);
}
////////////////////////////////////////////////////////////////////////////////
//! Register a custom factory function.
void DDEServerFactory::registerFactory(FactoryFn factoryFn)
{
s_factoryFn = factoryFn;
}
////////////////////////////////////////////////////////////////////////////////
//! The default factory implementation.
IDDEServerPtr DDEServerFactory::createServer(DWORD flags)
{
return IDDEServerPtr(new CDDEServer(flags));
}
//namespace
}