DABC (Data Acquisition Backbone Core)  2.9.9
Factory.cxx
Go to the documentation of this file.
1 // $Id: Factory.cxx 3862 2018-05-11 10:06:18Z linev $
2 
3 /************************************************************
4  * The Data Acquisition Backbone Core (DABC) *
5  ************************************************************
6  * Copyright (C) 2009 - *
7  * GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
8  * Planckstr. 1, 64291 Darmstadt, Germany *
9  * Contact: http://dabc.gsi.de *
10  ************************************************************
11  * This software can be used under the GPL license *
12  * agreements as stated in LICENSE.txt file *
13  * which is part of the distribution. *
14  ************************************************************/
15 
16 #include "dim/Factory.h"
17 #include "dim/Monitor.h"
18 
20 
21 dabc::Module* dim::Factory::CreateModule(const std::string &classname, const std::string &modulename, dabc::Command cmd)
22 {
23  if (classname == "dim::Monitor")
24  return new dim::Monitor(modulename, cmd);
25 
26  return dabc::Factory::CreateModule(classname, modulename, cmd);
27 }
Represents command with its arguments.
Definition: Command.h:99
Small helper class to correctly instantiate user-specific factories.
Definition: Factory.h:106
virtual Module * CreateModule(const std::string &classname, const std::string &modulename, Command cmd)
Factory method to create module.
Definition: Factory.h:67
Base for dabc::ModuleSync and dabc::ModuleAsync classes.
Definition: Module.h:42
Factory for dim control classes
Definition: Factory.h:29
virtual dabc::Module * CreateModule(const std::string &classname, const std::string &modulename, dabc::Command cmd)
Factory method to create module.
Definition: Factory.cxx:21
Player of DIM data.
Definition: Monitor.h:39
dabc::FactoryPlugin dimcfactory(new dim::Factory("dim"))