DABC (Data Acquisition Backbone Core)  2.9.9
Factory.cxx
Go to the documentation of this file.
1 // $Id: Factory.cxx 4788 2021-07-15 09:06:47Z 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 "gosip/Factory.h"
17 
18 #include "gosip/Player.h"
19 
21 
22 dabc::Module* gosip::Factory::CreateModule(const std::string &classname, const std::string &modulename, dabc::Command cmd)
23 {
24  if (classname == "gosip::Player")
25  return new gosip::Player(modulename, cmd);
26 
27  return dabc::Factory::CreateModule(classname, modulename, cmd);
28 }
29 
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 of MBS 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:22
Player of GOSIP data.
Definition: Player.h:35
dabc::FactoryPlugin fesafactory(new fesa::Factory("fesa"))