47 class Factory :
public Object {
52 Factory(
const std::string &name);
55 virtual Application*
CreateApplication(
const std::string &classname, Command cmd) {
return nullptr; }
58 virtual Reference CreateObject(
const std::string &classname,
const std::string &objname, Command cmd) {
return nullptr; }
61 virtual Device*
CreateDevice(
const std::string &classname,
const std::string &devname, Command cmd) {
return nullptr; }
67 virtual Module*
CreateModule(
const std::string &classname,
const std::string &modulename, Command cmd) {
return nullptr; }
73 virtual DataInput*
CreateDataInput(
const std::string &typ) {
return nullptr; }
76 virtual DataOutput*
CreateDataOutput(
const std::string &typ) {
return nullptr; }
79 virtual void*
CreateAny(
const std::string &classname,
const std::string &objname, Command cmd) {
return nullptr; }
83 static void*
FindSymbol(
const std::string &symbol);
85 static bool CreateManager(
const std::string &name =
"mgr", Configuration* cfg =
nullptr);
87 virtual const char*
ClassName()
const {
return "Factory"; }
106 class FactoryPlugin {
FactoryPlugin(dabc::Factory *f)
Factory for user-specific classes
virtual Reference CreateThread(Reference parent, const std::string &classname, const std::string &thrdname, const std::string &thrddev, Command cmd)
Factory method to create thread.
friend class FactoryPlugin
virtual const char * ClassName() const
Returns class name of the object instance.
virtual Application * CreateApplication(const std::string &classname, Command cmd)
Factory method to create application.
static void * FindSymbol(const std::string &symbol)
virtual Module * CreateTransport(const Reference &port, const std::string &typ, Command cmd)
Factory method to create transport.
virtual DataOutput * CreateDataOutput(const std::string &typ)
Factory method to create data output.
virtual void * CreateAny(const std::string &classname, const std::string &objname, Command cmd)
Factory method to create arbitrary object kind.
virtual Device * CreateDevice(const std::string &classname, const std::string &devname, Command cmd)
Factory method to create device.
static bool LoadLibrary(const std::string &fname)
virtual DataInput * CreateDataInput(const std::string &typ)
Factory method to create data input.
Factory(const std::string &name)
virtual Module * CreateModule(const std::string &classname, const std::string &modulename, Command cmd)
Factory method to create module.
static bool CreateManager(const std::string &name="mgr", Configuration *cfg=nullptr)
virtual Reference CreateObject(const std::string &classname, const std::string &objname, Command cmd)
Factory method to create object.
virtual void Initialize()
Method called by the manager during application start.