openMSX
InfoTopic.cc
Go to the documentation of this file.
1 #include "InfoTopic.hh"
2 #include "InfoCommand.hh"
3 
4 namespace openmsx {
5 
6 InfoTopic::InfoTopic(InfoCommand& infoCommand_, const std::string& name_)
7  : Completer(name_)
8  , infoCommand(infoCommand_)
9 {
10  infoCommand.registerTopic(*this);
11 }
12 
14 {
15  infoCommand.unregisterTopic(*this);
16 }
17 
18 void InfoTopic::tabCompletion(std::vector<std::string>& /*tokens*/) const
19 {
20  // do nothing
21 }
22 
24 {
25  return infoCommand.getInterpreter();
26 }
27 
28 } // namespace openmsx
Interpreter & getInterpreter() const final
Definition: Command.cc:38
void unregisterTopic(InfoTopic &topic)
Definition: InfoCommand.cc:33
void registerTopic(InfoTopic &topic)
Definition: InfoCommand.cc:21
void tabCompletion(std::vector< std::string > &tokens) const override
Attempt tab completion for this topic.
Definition: InfoTopic.cc:18
InfoTopic(const InfoTopic &)=delete
Interpreter & getInterpreter() const final
Definition: InfoTopic.cc:23
This file implemented 3 utility functions:
Definition: Autofire.cc:9