Rumba C++ SDK
Registry.h
Go to the documentation of this file.
1 /*
2 
3  *
4  ***
5  *****
6  ********************* Mercenaries Engineering SARL
7  ***************** Copyright (C) 2018
8  *************
9  ********* http://www.mercenaries-engineering.com
10  ***********
11  **** ****
12  ** **
13 
14 */
15 #pragma once
16 
17 #include "PlugDescriptor.h"
18 
19  namespace maquina
20  {
21  class Node;
22  class Value;
23  class NodePlugin;
24  class NodeLoaderPlugin;
26  class Registry
27  {
28  public:
29  virtual ~Registry() {};
30 
32  using Factory = std::function<std::shared_ptr<NodePlugin>( Node *node )>;
33 
35 
36  virtual void register_node(
37  const char *class_name,
38  const char *base_class_name,
39  Factory factory,
40  const std::vector<PlugDescriptor> &plug_desc,
41  const char *ui_descriptor = ""
42  ) = 0;
43 
45 
46  virtual void register_node(
47  const char *class_name,
48  const char *base_class_name,
49  const std::vector<PlugDescriptor> &plug_desc,
50  const char *ui_descriptor = ""
51  ) = 0;
52 
55  virtual void register_node_loader(const std::shared_ptr<NodeLoaderPlugin>& node_loader) = 0;
56  };
57  }
virtual ~Registry()
Definition: Registry.h:29
This version of the SDK is unstable, i-e, it may change with no warning.
Definition: AddCurveAction.h:20
Registry class used to declare and register a plug-in node.
Definition: Registry.h:26
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.
std::function< std::shared_ptr< NodePlugin >(Node *node)> Factory
The factory function prototype.
Definition: Registry.h:32
virtual void register_node_loader(const std::shared_ptr< NodeLoaderPlugin > &node_loader)=0
Declare a node loader plug-in.
Base class of all Rumba nodes.
Definition: Node.h:36