Rumba C++ SDK
maquina::Registry Class Referenceabstract

Registry class used to declare and register a plug-in node. More...

#include <Registry.h>

Public Types

using Factory = std::function< std::shared_ptr< NodePlugin >(Node *node)>
 The factory function prototype. More...
 

Public Member Functions

virtual ~Registry ()
 
virtual void register_node (const char *class_name, const char *base_class_name, Factory factory, const std::vector< PlugDescriptor > &plug_desc, const char *ui_descriptor="")=0
 Declare a plug-in node. More...
 
virtual void register_node (const char *class_name, const char *base_class_name, const std::vector< PlugDescriptor > &plug_desc, const char *ui_descriptor="")=0
 Declare a plug-in node. More...
 
virtual void register_node_loader (const std::shared_ptr< NodeLoaderPlugin > &node_loader)=0
 Declare a node loader plug-in. More...
 

Detailed Description

Registry class used to declare and register a plug-in node.

Member Typedef Documentation

◆ Factory

using maquina::Registry::Factory = std::function<std::shared_ptr<NodePlugin>( Node *node )>

The factory function prototype.

Constructor & Destructor Documentation

◆ ~Registry()

virtual maquina::Registry::~Registry ( )
inlinevirtual

Member Function Documentation

◆ register_node() [1/2]

virtual void maquina::Registry::register_node ( const char *  class_name,
const char *  base_class_name,
Factory  factory,
const std::vector< PlugDescriptor > &  plug_desc,
const char *  ui_descriptor = "" 
)
pure virtual

Declare a plug-in node.

The plug-in must declare the plug-in nodes using this method.

Parameters
class_namein The new class name
base_class_namein The parent class name, "Node" is the base class
factoryin The factory function to allocate a node, provided by the plug-in
plug_descin The plugs descriptor
ui_descriptorin A json string to describe the node user interface

◆ register_node() [2/2]

virtual void maquina::Registry::register_node ( const char *  class_name,
const char *  base_class_name,
const std::vector< PlugDescriptor > &  plug_desc,
const char *  ui_descriptor = "" 
)
pure virtual

Declare a plug-in node.

The plug-in must declare the plug-in nodes using this method.

Parameters
class_namein The new class name
base_class_namein The parent class name, "Node" is the base class
plug_descin The plugs descriptor
ui_descriptorin A json string to describe the node user interface

◆ register_node_loader()

virtual void maquina::Registry::register_node_loader ( const std::shared_ptr< NodeLoaderPlugin > &  node_loader)
pure virtual

Declare a node loader plug-in.

Parameters
node_loaderThe node loader plug-in

The documentation for this class was generated from the following file: