MarlinMT  0.1.0
PluginManager.h File Reference
#include <map>
#include <string>
#include <mutex>
#include <any>
#include <memory>
#include <vector>
#include <functional>
#include <filesystem>
#include "marlinmt/Exceptions.h"
#include "marlinmt/Logging.h"

Go to the source code of this file.

Classes

class  marlinmt::PluginManager
 PluginManager singleton class Responsible for loading shared libraries and collecting processor factory instances. More...
 
struct  marlinmt::PluginManager::FactoryData
 

Namespaces

 marlinmt
 

Macros

#define MARLINMT_DECLARE_PLUGIN(Base, Class)   MARLINMT_DECLARE_PLUGIN_NAME( Base, Class, #Class )
 
#define MARLINMT_DECLARE_PLUGIN_NAME(Base, Class, NameStr)
 
#define MARLINMT_DECLARE_PROCESSOR(Class)
 
#define MARLINMT_DECLARE_GEOMETRY(Class)   MARLINMT_DECLARE_PLUGIN( marlinmt::GeometryPlugin, Class )
 
#define MARLINMT_DECLARE_GEOMETRY_NAME(Class, NameStr)   MARLINMT_DECLARE_PLUGIN_NAME( marlinmt::GeometryPlugin, Class, NameStr )
 
#define MARLINMT_DECLARE_DATASOURCE(Class)   MARLINMT_DECLARE_PLUGIN( marlinmt::DataSourcePlugin, Class )
 
#define MARLINMT_DECLARE_DATASOURCE_NAME(Class, NameStr)   MARLINMT_DECLARE_PLUGIN_NAME( marlinmt::DataSourcePlugin, Class, NameStr )
 
#define MARLINMT_DECLARE_CONFIG_READER(Class)   MARLINMT_DECLARE_PLUGIN( marlinmt::ConfigReader, Class )
 
#define MARLINMT_DECLARE_CONFIG_READER_NAME(Class, NameStr)   MARLINMT_DECLARE_PLUGIN_NAME( marlinmt::ConfigReader, Class, NameStr )
 
#define MARLINMT_DECLARE_CONFIG_WRITER(Class)   MARLINMT_DECLARE_PLUGIN( marlinmt::ConfigWriter, Class )
 
#define MARLINMT_DECLARE_CONFIG_WRITER_NAME(Class, NameStr)   MARLINMT_DECLARE_PLUGIN_NAME( marlinmt::ConfigWriter, Class, NameStr )
 

Macro Definition Documentation

◆ MARLINMT_DECLARE_CONFIG_READER

#define MARLINMT_DECLARE_CONFIG_READER (   Class)    MARLINMT_DECLARE_PLUGIN( marlinmt::ConfigReader, Class )

Definition at line 48 of file PluginManager.h.

Referenced by marlinmt::XMLConfigReader::getReplacementParameter().

◆ MARLINMT_DECLARE_CONFIG_READER_NAME

#define MARLINMT_DECLARE_CONFIG_READER_NAME (   Class,
  NameStr 
)    MARLINMT_DECLARE_PLUGIN_NAME( marlinmt::ConfigReader, Class, NameStr )

Definition at line 49 of file PluginManager.h.

◆ MARLINMT_DECLARE_CONFIG_WRITER

#define MARLINMT_DECLARE_CONFIG_WRITER (   Class)    MARLINMT_DECLARE_PLUGIN( marlinmt::ConfigWriter, Class )

Definition at line 52 of file PluginManager.h.

Referenced by marlinmt::XMLConfigWriter::createParameter().

◆ MARLINMT_DECLARE_CONFIG_WRITER_NAME

#define MARLINMT_DECLARE_CONFIG_WRITER_NAME (   Class,
  NameStr 
)    MARLINMT_DECLARE_PLUGIN_NAME( marlinmt::ConfigWriter, Class, NameStr )

Definition at line 53 of file PluginManager.h.

◆ MARLINMT_DECLARE_DATASOURCE

#define MARLINMT_DECLARE_DATASOURCE (   Class)    MARLINMT_DECLARE_PLUGIN( marlinmt::DataSourcePlugin, Class )

Definition at line 44 of file PluginManager.h.

◆ MARLINMT_DECLARE_DATASOURCE_NAME

#define MARLINMT_DECLARE_DATASOURCE_NAME (   Class,
  NameStr 
)    MARLINMT_DECLARE_PLUGIN_NAME( marlinmt::DataSourcePlugin, Class, NameStr )

◆ MARLINMT_DECLARE_GEOMETRY

◆ MARLINMT_DECLARE_GEOMETRY_NAME

#define MARLINMT_DECLARE_GEOMETRY_NAME (   Class,
  NameStr 
)    MARLINMT_DECLARE_PLUGIN_NAME( marlinmt::GeometryPlugin, Class, NameStr )

Definition at line 41 of file PluginManager.h.

◆ MARLINMT_DECLARE_PLUGIN

#define MARLINMT_DECLARE_PLUGIN (   Base,
  Class 
)    MARLINMT_DECLARE_PLUGIN_NAME( Base, Class, #Class )

Definition at line 21 of file PluginManager.h.

◆ MARLINMT_DECLARE_PLUGIN_NAME

#define MARLINMT_DECLARE_PLUGIN_NAME (   Base,
  Class,
  NameStr 
)
Value:
namespace marlinmt_plugins { \
struct PluginDeclaration_##Class { \
PluginDeclaration_##Class() { \
marlinmt::PluginManager::instance().registerPlugin<Base, Class>( NameStr, false ) ; \
} \
}; \
static PluginDeclaration_##Class __instance_##Class ; \
}
void registerPlugin(const std::string &name, bool ignoreDuplicate=false)
Register a new plugin to the manager.
static PluginManager & instance()
Get the plugin manager instance.

Definition at line 23 of file PluginManager.h.

◆ MARLINMT_DECLARE_PROCESSOR

#define MARLINMT_DECLARE_PROCESSOR (   Class)