class FunctionalNodeFactoryManager¶
Overview¶
Singleton class which loads Functional Node factory plugins and instantiates Functional Nodes using the former. More…
#include <functional_node_factory_manager.h> class FunctionalNodeFactoryManager: public PluginManager { public: // construction FunctionalNodeFactoryManager(const FunctionalNodeFactoryManager&); FunctionalNodeFactoryManager(FunctionalNodeFactoryManager&&); // methods FunctionalNodeFactoryManager& operator = (const FunctionalNodeFactoryManager&); FunctionalNodeFactoryManager& operator = (FunctionalNodeFactoryManager&&); void loadFNFactoryPlugin(const std::string& pluginLibFile); FunctionalNodeBase* createFunctionalNode( const std::string& functionName, const std::string& nodeName, FunctionalNodePolicies::ExecutionPolicy policy = FunctionalNodePolicies::ExecutionPolicy::ON_NEW_INPUT ); static FunctionalNodeFactoryManager& getInstance(); static void resetInstance(); };
Inherited Members¶
public: // methods bool loadPlugin(const std::string& pluginLibFile); void addPluginPath(const std::string& pluginPath);
Detailed Documentation¶
Singleton class which loads Functional Node factory plugins and instantiates Functional Nodes using the former.
Functional Node factory plugins are generated using the skeleton “fn_factory_module.cpp.template”
Methods¶
void loadFNFactoryPlugin(const std::string& pluginLibFile)
Load a Functional Node factory plugin.
Parameters:
pluginLibFile |
Plugin library file (.so) |
FunctionalNodeBase* createFunctionalNode( const std::string& functionName, const std::string& nodeName, FunctionalNodePolicies::ExecutionPolicy policy = FunctionalNodePolicies::ExecutionPolicy::ON_NEW_INPUT )
Attempts to instantiate a Functional Node from the requested functionName using all loaded plugins.
Parameters:
functionName |
Name of the function to instantiate the FN from |
nodeName |
Name of the FN |
policy |
Execution policy of the FN |
Returns:
Returns a FunctionalNodeBase pointer
static FunctionalNodeFactoryManager& getInstance()
Get singleton instance of FunctionalNodeFactoryManager.
static void resetInstance()
Reset singleton instance.