openMSX
InfoCommand.hh
Go to the documentation of this file.
1 #ifndef INFOCOMMAND_HH
2 #define INFOCOMMAND_HH
3 
4 #include "Command.hh"
5 #include "InfoTopic.hh"
6 #include "hash_set.hh"
7 #include "xxhash.hh"
8 
9 namespace openmsx {
10 
11 class InfoCommand final : public Command
12 {
13 public:
14  InfoCommand(CommandController& commandController, const std::string& name);
15  ~InfoCommand();
16 
17  void registerTopic(InfoTopic& topic);
18  void unregisterTopic(InfoTopic& topic);
19 
20 private:
21  // Command
22  void execute(span<const TclObject> tokens,
23  TclObject& result) override;
24  [[nodiscard]] std::string help(span<const TclObject> tokens) const override;
25  void tabCompletion(std::vector<std::string>& tokens) const override;
26 
27  struct NameFromInfoTopic {
28  [[nodiscard]] const std::string& operator()(const InfoTopic* t) const {
29  return t->getName();
30  }
31  };
33 };
34 
35 } // namespace openmsx
36 
37 #endif
TclObject t
void unregisterTopic(InfoTopic &topic)
Definition: InfoCommand.cc:33
void registerTopic(InfoTopic &topic)
Definition: InfoCommand.cc:21
InfoCommand(CommandController &commandController, const std::string &name)
Definition: InfoCommand.cc:11
Definition: span.hh:126
This file implemented 3 utility functions:
Definition: Autofire.cc:9