Rumba C++ SDK
UserData.h
Go to the documentation of this file.
1 /*
2 
3  *
4  ***
5  *****
6  ********************* Mercenaries Engineering SARL
7  ***************** Copyright (C) 2020
8  *************
9  ********* http://www.mercenaries-engineering.com
10  ***********
11  **** ****
12  ** **
13 
14 */
15 #pragma once
16 
17 #include <memory>
18 
19 #include "Export.h"
20 #include "StringView.h"
21 
22 namespace maquina
23 {
24  class NodeDelegate;
25  class Value;
26 
27  // Base class for the user defined data to store in values.
29  {
30  public:
31  virtual ~UserData() {};
32 
33  // Returns the user data type.
34  virtual StringView type_name() const = 0;
35 
37 
38  virtual std::shared_ptr<NodeDelegate> node_delegate(
39  const std::shared_ptr<NodeDelegate>& /*parent*/,
40  const StringView& /*name*/ ) const
41  {
42  return nullptr;
43  }
44 
48  virtual bool has_node_delegate() const
49  {
50  return false;
51  }
52  };
53 }
virtual ~UserData()
Definition: UserData.h:31
virtual std::shared_ptr< NodeDelegate > node_delegate(const std::shared_ptr< NodeDelegate > &, const StringView &) const
Override this method if the final type has a NodeDelegate.
Definition: UserData.h:38
This version of the SDK is unstable, i-e, it may change with no warning.
Definition: AddCurveAction.h:20
#define MAQUINA_EXPORT
Definition: Export.h:31
Definition: UserData.h:28
virtual bool has_node_delegate() const
Definition: UserData.h:48