DABC (Data Acquisition Backbone Core)  2.9.9
Factory.cxx
Go to the documentation of this file.
1 /************************************************************
2  * The Data Acquisition Backbone Core (DABC) *
3  ************************************************************
4  * Copyright (C) 2009 - *
5  * GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
6  * Planckstr. 1, 64291 Darmstadt, Germany *
7  * Contact: http://dabc.gsi.de *
8  ************************************************************
9  * This software can be used under the GPL license *
10  * agreements as stated in LICENSE.txt file *
11  * which is part of the distribution. *
12  ************************************************************/
13 
14 #include "ltsm/Factory.h"
15 
16 #include "ltsm/FileInterface.h"
17 
18 #include "dabc/logging.h"
19 
21 
22 void* ltsm::Factory::CreateAny(const std::string &classname, const std::string&, dabc::Command)
23 {
24  if (classname == "ltsm::FileInterface") {
25  DOUT0("Create file interface instance for the LTSM");
26  return new ltsm::FileInterface;
27  }
28 
29  return 0;
30 }
Represents command with its arguments.
Definition: Command.h:99
Small helper class to correctly instantiate user-specific factories.
Definition: Factory.h:106
virtual void * CreateAny(const std::string &classname, const std::string &objname, dabc::Command cmd)
Factory method to create arbitrary object kind.
Definition: Factory.cxx:22
#define DOUT0(args ...)
Definition: logging.h:156
dabc::FactoryPlugin ltsmfactory(new ltsm::Factory("ltsm"))