AbstractServerActionFactory.cpp

Go to the documentation of this file.
00001 // Copyright CERN 2012 - Developed in collaboration with GSI
00002 
00003 #include <fesa-core/Server/AbstractServerActionFactory.h>
00004 
00005 #include <fesa-core/Server/AbstractServerAction.h>
00006 #include <fesa-core/Server/SetDiagnosticSetting.h>
00007 #include <fesa-core/Server/GetDiagnosticSetting.h>
00008 
00009 namespace fesa
00010 {
00011 
00012 AbstractServerActionFactory::AbstractServerActionFactory(const AbstractServiceLocator* serviceLocator, const std::map<std::string, const AbstractServiceLocator*> serviceLocatorRelatedClasses) :
00013     serviceLocator_(serviceLocator),
00014     serviceLocatorRelatedClasses_(serviceLocatorRelatedClasses)
00015 {
00016 }
00017 
00018 AbstractServerActionFactory::~AbstractServerActionFactory()
00019 {
00020 }
00021 
00022 AbstractServerAction* AbstractServerActionFactory::createServerAction(ServerActionConfig& serverActionConfig)
00023 {
00024 
00025     if (serverActionConfig.name_ == "SetDiagnosticSetting")
00026         return new SetDiagnosticSetting(serverActionConfig, serviceLocator_, serviceLocatorRelatedClasses_);
00027     if (serverActionConfig.name_ == "GetDiagnosticSetting")
00028         return new GetDiagnosticSetting(serverActionConfig, serviceLocator_, serviceLocatorRelatedClasses_);
00029     else
00030         return createCustomServerAction(serverActionConfig);
00031 
00032 }
00033 
00034 } // fesa

Generated on 18 Jan 2013 for Fesa by  doxygen 1.6.1