openMSX
InfoTopic.hh
Go to the documentation of this file.
1#ifndef INFOTOPIC_HH
2#define INFOTOPIC_HH
3
4#include "Completer.hh"
5#include <span>
6#include <string>
7#include <vector>
8
9namespace openmsx {
10
11class TclObject;
12class Interpreter;
13class InfoCommand;
14
15class InfoTopic : public Completer
16{
17public:
18 InfoTopic(const InfoTopic&) = delete;
19 InfoTopic(InfoTopic&&) = delete;
20 InfoTopic& operator=(const InfoTopic&) = delete;
22
31 virtual void execute(std::span<const TclObject> tokens,
32 TclObject& result) const = 0;
33
38 [[nodiscard]] std::string help(std::span<const TclObject> tokens) const override = 0;
39
46 void tabCompletion(std::vector<std::string>& tokens) const override;
47
48 [[nodiscard]] Interpreter& getInterpreter() const final;
49
50protected:
51 InfoTopic(InfoCommand& infoCommand, const std::string& name);
52 ~InfoTopic();
53
54private:
55 InfoCommand& infoCommand;
56};
57
58} // namespace openmsx
59
60#endif
InfoTopic & operator=(InfoTopic &&)=delete
void tabCompletion(std::vector< std::string > &tokens) const override
Attempt tab completion for this topic.
Definition InfoTopic.cc:18
InfoTopic(InfoTopic &&)=delete
InfoTopic(const InfoTopic &)=delete
std::string help(std::span< const TclObject > tokens) const override=0
Print help for this topic.
InfoTopic & operator=(const InfoTopic &)=delete
virtual void execute(std::span< const TclObject > tokens, TclObject &result) const =0
Show info on this topic.
Interpreter & getInterpreter() const final
Definition InfoTopic.cc:23
This file implemented 3 utility functions:
Definition Autofire.cc:11
STL namespace.