31 lines
782 B
C++
31 lines
782 B
C++
#include "session/SessionManagerFactory.hpp"
|
|
#include "session/SessionManagerImpl.hpp"
|
|
#include "session/ACSession.hpp"
|
|
|
|
extern int tkScenario;
|
|
|
|
using namespace std;
|
|
|
|
#if 0
|
|
SessionManager*
|
|
SessionManagerFactory::newInstance(const std::string& propertiesFile)
|
|
throw (ConfigurationException, EPPIOException)
|
|
{
|
|
auto_ptr<SessionManagerProperties> properties(new SessionManagerProperties(propertiesFile));
|
|
properties->load();
|
|
return newInstance(properties.release());
|
|
}
|
|
#endif
|
|
|
|
SessionManager*
|
|
SessionManagerFactory::newInstance(SessionManagerProperties* properties)
|
|
throw (ConfigurationException)
|
|
{
|
|
switch(tkScenario) {
|
|
case 0: return new SessionManagerImpl(properties);
|
|
break;
|
|
case 1: return new ACSession(properties);
|
|
break;
|
|
}
|
|
}
|