35{
36
37 try {
39 const auto command_count {
41 [](size_t sum, const auto& pair) { return sum + pair.second.size(); })};
47 size_t idx {1};
48 for (
const auto& [cmd_group, cmd_abbrev_label] :
m_impl_.allcommands_) {
49 std::vector<MenuStringT> menu_items_temp {};
50 menu_items_temp.reserve(cmd_abbrev_label.size());
51 const auto group_colon {cmd_group + " : "};
52 for (const auto& [cmd_abbrev, cmd_label] : cmd_abbrev_label) {
56 menu_items_temp.emplace_back(cmd_label);
57 }
58 menus_.emplace_back(cmd_group);
60 }
61 }
62 catch (const std::exception& e) {
64 throw;
65 }
66}
std::string language_
Definition CommandSet.h:98
std::vector< std::pair< std::string, std::vector< std::pair< std::string, std::string > > > > allcommands_
Definition CommandSet.h:100
static const std::string kUnassigned
Definition CommandSet.h:63
static const auto & UnassignedTranslated()
Definition CommandSet.h:57
std::vector< std::string > cmd_by_number_
Definition CommandSet.h:112
std::vector< std::string > cmd_label_by_number_
Definition CommandSet.h:113
const Impl & m_impl_
Definition CommandSet.h:109
std::unordered_map< std::string, size_t > cmd_idx_
Definition CommandSet.h:110
std::vector< MenuStringT > menus_
Definition CommandSet.h:111
const Impl & MakeImpl() const
Definition CommandSet.cpp:89
std::vector< std::vector< MenuStringT > > menu_entries_
Definition CommandSet.h:114
void Translate(const std::string &lg)
Definition Translate.cpp:35
void ExceptionResponse(gsl::czstring id, gsl::czstring fu, const std::exception &e) noexcept