00001 // Copyright CERN 2012 - Developed in collaboration with GSI 00002 00003 #include <fesa-core/RealTime/AbstractRTActionFactory.h> 00004 00005 #include <fesa-core/RealTime/RTDiagnosticSetting.h> 00006 00007 00008 namespace fesa 00009 { 00010 00011 AbstractRTActionFactory::AbstractRTActionFactory(const AbstractServiceLocator* serviceLocator, const std::map<std::string, const AbstractServiceLocator*> serviceLocatorRelatedClasses) : 00012 serviceLocator_(serviceLocator), serviceLocatorRelatedClasses_(serviceLocatorRelatedClasses) 00013 { 00014 00015 } 00016 00017 AbstractRTActionFactory::~AbstractRTActionFactory() 00018 { 00019 00020 } 00021 00022 AbstractRTAction* AbstractRTActionFactory::createRTAction(const std::string& actionName, 00023 RTActionConfig& rtActionConfig) 00024 { 00025 00026 if (actionName == "RTDiagnosticSetting") 00027 return new RTDiagnosticSetting(rtActionConfig, serviceLocator_, serviceLocatorRelatedClasses_); 00028 else 00029 return createCustomRTAction(actionName, rtActionConfig); 00030 00031 } 00032 00033 } // fesa