Allow ServerContextImpl to be created w/ specific conf.

This commit is contained in:
Michael Davidsaver
2015-11-23 17:06:58 -05:00
parent b9dd9e8e6c
commit 03e5b0c747
2 changed files with 13 additions and 3 deletions

View File

@@ -51,13 +51,22 @@ ServerContextImpl::ServerContextImpl():
epicsSignalInstallSigPipeIgnore ();
generateGUID();
initializeLogger();
loadConfiguration();
initializeLogger();
}
ServerContextImpl::shared_pointer ServerContextImpl::create()
{
ServerContextImpl::shared_pointer thisPointer(new ServerContextImpl());
thisPointer->loadConfiguration();
return thisPointer;
}
ServerContextImpl::shared_pointer ServerContextImpl::create(
const Configuration::shared_pointer& conf)
{
ServerContextImpl::shared_pointer thisPointer(new ServerContextImpl());
thisPointer->configuration = conf;
thisPointer->loadConfiguration();
return thisPointer;
}

View File

@@ -116,10 +116,11 @@ class epicsShareClass ServerContextImpl :
public:
typedef std::tr1::shared_ptr<ServerContextImpl> shared_pointer;
typedef std::tr1::shared_ptr<const ServerContextImpl> const_shared_pointer;
protected:
private:
ServerContextImpl();
public:
static shared_pointer create();
static shared_pointer create(const Configuration::shared_pointer& conf);
virtual ~ServerContextImpl();