| 1 |
#ifndef INFOTOPIC_HH |
| 2 |
#define INFOTOPIC_HH |
| 3 |
|
| 4 |
#include "Completer.hh" |
| 5 |
#include <span> |
| 6 |
#include <string> |
| 7 |
#include <vector> |
| 8 |
|
| 9 |
namespace openmsx { |
| 10 |
|
| 11 |
class TclObject; |
| 12 |
class Interpreter; |
| 13 |
class InfoCommand; |
| 14 |
|
| 15 |
class InfoTopic : public Completer |
| 16 |
{ |
| 17 |
public: |
| 18 |
InfoTopic(const InfoTopic&) = delete; |
| 19 |
InfoTopic(InfoTopic&&) = delete; |
| 20 |
InfoTopic& operator=(const InfoTopic&) = delete; |
| 21 |
InfoTopic& operator=(InfoTopic&&) = delete; |
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
virtual void execute(std::span<const TclObject> tokens, |
| 32 |
TclObject& result) const = 0; |
| 33 |
|
| 34 |
|
| 35 |
|
| 36 |
|
| 37 |
|
| 38 |
[[nodiscard]] std::string help(std::span<const TclObject> tokens) const override = 0; |
| 39 |
|
| 40 |
|
| 41 |
|
| 42 |
|
| 43 |
|
| 44 |
|
| 45 |
|
| 46 |
void tabCompletion(std::vector<std::string>& tokens) const override; |
| 47 |
|
| 48 |
[[nodiscard]] Interpreter& getInterpreter() const final; |
| 49 |
|
| 50 |
protected: |
| 51 |
InfoTopic(InfoCommand& infoCommand, const std::string& name); |
| 52 |
~InfoTopic(); |
| 53 |
|
| 54 |
private: |
| 55 |
InfoCommand& infoCommand; |
| 56 |
}; |
| 57 |
|
| 58 |
} |
| 59 |
|
| 60 |
#endif |