• Main Page
  • Related Pages
  • Namespaces
  • Data Structures
  • Files
  • File List
  • Globals

spadicplugin/src/Factory.cxx (r4864/r3084)

Go to the documentation of this file.
00001 #include "spadic/Factory.h"
00002 
00003 #include "dabc/Command.h"
00004 #include "dabc/logging.h"
00005 
00006 #include "spadic/Message.h"
00007 #include "spadic/SusiboInput.h"
00008 #include "spadic/ReadoutApplication.h"
00009 
00010 dabc::FactoryPlugin spadicfactory(new spadic::Factory("spadic"));
00011 
00012 spadic::Factory::Factory(const char* name) :
00013    dabc::Factory(name)
00014 {
00015 }
00016 
00017 dabc::Application* spadic::Factory::CreateApplication(const char* classname, dabc::Command cmd)
00018 {
00019    if (strcmp(classname, spadic::nameReadoutAppClass)==0)
00020       return new spadic::ReadoutApplication();
00021 
00022    return dabc::Factory::CreateApplication(classname, cmd);
00023 }
00024 
00025 dabc::DataInput* spadic::Factory::CreateDataInput(const char* typ)
00026 {
00027    if ((typ==0) || (strlen(typ)==0)) return 0;
00028    DOUT3(("spadic::Factory::CreateDataInput %s", typ));
00029 
00030    if (strcmp(typ, spadic::typeSusiboInput) == 0)
00031       return new spadic::SusiboInput();
00032 
00033    return 0;
00034 }

Generated on Tue Dec 10 2013 04:52:22 for ROCsoft by  doxygen 1.7.1