3 #include <RobotAPI/interface/armem/actions.h>
9 const std::string& text,
10 const std::vector<MenuEntry>& entries) :
11 id(id), text(text), entries(entries)
17 const std::string& text,
18 const std::vector<MenuEntry>& entries)
20 return this->entries.emplace_back(
id,
text,
entries);
28 return new data::Action{this->
id, this->
text};
31 data::SubMenuPtr ice =
new data::SubMenu{this->
id, this->
text, {}};
34 ice->entries.push_back(entry.toIce());
42 if (ice->ice_isA(data::SubMenu::ice_staticId()))
46 for (
const auto& entry : ptr->entries)
61 const std::string& text,
62 const std::vector<MenuEntry>& entries) :
69 const std::string& text,
70 const std::vector<MenuEntry>& entries)
72 return this->entries.emplace_back(
id,
text,
entries);
76 Menu::Menu(std::initializer_list<MenuEntry> entries) : entries(entries)
80 Menu::Menu(
const std::vector<MenuEntry>& entries) : entries(entries)
86 Menu::add(
const std::string&
id,
const std::string& text,
const std::vector<MenuEntry>& entries)
88 return this->entries.emplace_back(
id, text,
entries);
97 ice->entries.push_back(entry.toIce());
106 for (
const auto& entry : ice->entries)