Horizon
action_label.hpp
1 #pragma once
2 #include <string>
3 #include "imp/in_tool_action.hpp"
4 
5 namespace horizon {
7 public:
8  ActionLabelInfo(InToolActionID a1) : action1(a1), action2(InToolActionID::NONE)
9  {
10  }
11  ActionLabelInfo(InToolActionID a1, const std::string &s) : action1(a1), action2(InToolActionID::NONE), label(s)
12  {
13  }
14  ActionLabelInfo(InToolActionID a1, InToolActionID a2, const std::string &s) : action1(a1), action2(a2), label(s)
15  {
16  }
17 
18  InToolActionID action1;
19  InToolActionID action2;
20  std::string label;
21  std::pair<InToolActionID, InToolActionID> get_key() const
22  {
23  return std::make_pair(action1, action2);
24  }
25 
26  bool operator==(const ActionLabelInfo &other) const
27  {
28  return action1 == other.action1 && action2 == other.action2 && label == other.label;
29  }
30 };
31 } // namespace horizon
Definition: action_label.hpp:6