openMSX
InfoTopic.cc
Go to the documentation of this file.
1 #include "InfoTopic.hh"
2 #include "InfoCommand.hh"
3 
4 using std::string;
5 using std::vector;
6 
7 namespace openmsx {
8 
9 InfoTopic::InfoTopic(InfoCommand& infoCommand_, const string& name_)
10  : Completer(name_)
11  , infoCommand(infoCommand_)
12 {
13  infoCommand.registerTopic(*this);
14 }
15 
17 {
18  infoCommand.unregisterTopic(*this);
19 }
20 
21 void InfoTopic::tabCompletion(vector<string>& /*tokens*/) const
22 {
23  // do nothing
24 }
25 
27 {
28  return infoCommand.getInterpreter();
29 }
30 
31 } // namespace openmsx
void registerTopic(InfoTopic &topic)
Definition: InfoCommand.cc:24
Interpreter & getInterpreter() const final
Definition: InfoTopic.cc:26
void tabCompletion(std::vector< std::string > &tokens) const override
Attempt tab completion for this topic.
Definition: InfoTopic.cc:21
InfoTopic(InfoCommand &infoCommand, const std::string &name)
Definition: InfoTopic.cc:9
Thanks to enen for testing this on a real cartridge:
Definition: Autofire.cc:5
Interpreter & getInterpreter() const final
Definition: Command.cc:41
void unregisterTopic(InfoTopic &topic)
Definition: InfoCommand.cc:36