instruction.h
Go to the documentation of this file.
1 #ifndef DNAI_MODELS_GUI_DATA_INSTRUCTION_H
2 #define DNAI_MODELS_GUI_DATA_INSTRUCTION_H
3 
4 #include <QList>
6 #include "dnai/models/gui/flow.h"
10 
11 namespace dnai
12 {
13  namespace models
14  {
15  class Entity;
16 
17  namespace gui
18  {
19  namespace data
20  {
21  struct Instruction
22  {
23  quint32 uid = core::UNDEFINED_ID;
24  QUuid guiUuid;
25  QList<models::gui::Input*> inputs;
26  QList<models::gui::Output*> outputs;
27  gui::Flow* flowIn = nullptr;
28  QList<gui::Flow*> flowOut;
30  QList<QString> linked;
31  QString nodeMenuPath; //path of the ContextMenuItem in the ContextMenuModel : ex : "/operators/binary/int/add"
32 
33  Instruction& operator=(const Instruction& other) = default;
34  qint32 x = 0;
35  qint32 y = 0;
36 
37  bool operator!=(const Instruction& other) const
38  {
39  return !(other == *this);
40  }
41 
42  bool operator==(const Instruction& other) const
43  {
44  return (
45  inputs == other.inputs
46  && outputs == other.outputs
47  && flowIn == other.flowIn
48  && instructionId == other.instructionId
49  && guiUuid == other.guiUuid);
50  }
51  };
52  }
53  }
54  }
55 }
56 
57 #endif //DNAI_MODELS_GUI_DATA_INSTRUCTION_H
Definition: instruction.h:21
qint32 x
Definition: instruction.h:34
QList< models::gui::Input * > inputs
Definition: instruction.h:25
QList< models::gui::Output * > outputs
Definition: instruction.h:26
Definition: flow.h:15
Definition: guitype.h:14
qint32 instructionId
Definition: instruction.h:29
quint32 uid
Definition: instruction.h:23
QUuid guiUuid
Definition: instruction.h:24
bool operator!=(const Instruction &other) const
Definition: instruction.h:37
Definition: api.h:13
bool operator==(const Instruction &other) const
Definition: instruction.h:42
QList< gui::Flow * > flowOut
Definition: instruction.h:28
qint32 y
Definition: instruction.h:35
QList< QString > linked
Definition: instruction.h:30
gui::Flow * flowIn
Definition: instruction.h:27
Instruction & operator=(const Instruction &other)=default
QString nodeMenuPath
Definition: instruction.h:31