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 "rfio/Factory.h"
15 
16 #include "rfio/FileInterface.h"
17 #include "dabc/logging.h"
18 
20 
21 void* rfio::Factory::CreateAny(const std::string &classname, const std::string&, dabc::Command)
22 {
23  if (classname == "rfio::FileInterface") {
24  DOUT0("Create file interface instance for the RFIO");
25  return new rfio::FileInterface;
26  }
27 
28  return 0;
29 }
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:21
#define DOUT0(args ...)
Definition: logging.h:156
dabc::FactoryPlugin rfiofactory(new rfio::Factory("rfio"))