openMSX
commands
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
(
const
InfoTopic
& topic);
18
void
unregisterTopic
(
const
InfoTopic
& topic);
19
20
private
:
21
// Command
22
void
execute(std::span<const TclObject> tokens,
23
TclObject
& result)
override
;
24
[[nodiscard]] std::string help(std::span<const TclObject> tokens)
const override
;
25
void
tabCompletion(std::vector<std::string>& tokens)
const override
;
26
27
struct
NameFromInfoTopic {
28
[[nodiscard]]
const
std::string& operator()(
const
InfoTopic
*
t
)
const
{
29
return
t
->getName();
30
}
31
};
32
hash_set<const InfoTopic*, NameFromInfoTopic, XXHasher>
infoTopics;
33
};
34
35
}
// namespace openmsx
36
37
#endif
Command.hh
InfoTopic.hh
t
TclObject t
Definition
TclObject_test.cc:265
hash_set
Definition
hash_set.hh:270
openmsx::CommandController
Definition
CommandController.hh:19
openmsx::Command
Definition
Command.hh:44
openmsx::InfoCommand
Definition
InfoCommand.hh:12
openmsx::InfoCommand::~InfoCommand
~InfoCommand()
Definition
InfoCommand.cc:16
openmsx::InfoCommand::unregisterTopic
void unregisterTopic(const InfoTopic &topic)
Definition
InfoCommand.cc:33
openmsx::InfoCommand::registerTopic
void registerTopic(const InfoTopic &topic)
Definition
InfoCommand.cc:21
openmsx::InfoTopic
Definition
InfoTopic.hh:16
openmsx::TclObject
Definition
TclObject.hh:27
hash_set.hh
openmsx
This file implemented 3 utility functions:
Definition
Autofire.cc:11
xxhash.hh
Generated on Mon Oct 7 2024 21:13:40 for openMSX by
1.9.8