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 "Impl.h"
18 #include "StringView.h"
19 
20 namespace maquina
21 {
22  class NodeDelegate;
23  class Value;
24 
25  // Base class for the user defined data to store in values.
27  {
28  public:
29  virtual ~UserData() {};
30 
31  // Returns the user data type.
32  virtual StringView type_name() const = 0;
33 
35 
36  virtual std::shared_ptr<NodeDelegate> node_delegate(
37  const std::shared_ptr<NodeDelegate>& /*parent*/,
38  const StringView& /*name*/ ) const
39  {
40  return nullptr;
41  }
42 
46  virtual bool has_node_delegate() const
47  {
48  return false;
49  }
50  };
51 }
virtual ~UserData()
Definition: UserData.h:29
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:36
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:26
virtual bool has_node_delegate() const
Definition: UserData.h:46