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  std::string help(const std::vector<std::string>& tokens) const override;
25  void tabCompletion(std::vector<std::string>& tokens) const override;
26 
27  struct NameFromInfoTopic {
28  const std::string& operator()(const InfoTopic* t) const {
29  return t->getName();
30  }
31  };
33 };
34 
35 } // namespace openmsx
36 
37 #endif
void registerTopic(InfoTopic &topic)
Definition: InfoCommand.cc:24
InfoCommand(CommandController &commandController, const std::string &name)
Definition: InfoCommand.cc:14
Definition: span.hh:34
const std::string & getName() const
Definition: Completer.hh:19
Thanks to enen for testing this on a real cartridge:
Definition: Autofire.cc:5
TclObject t
void unregisterTopic(InfoTopic &topic)
Definition: InfoCommand.cc:36