Debian Codegraph @

plugins/dm.conversation/ConversationCommand.h

raw
1 #ifndef CONVERSATION_COMMAND_H_
2 #define CONVERSATION_COMMAND_H_
3
4 #include <string>
5 #include <map>
6 #include <memory>
7
8 namespace conversation {
9
10 /**
11 * Data object representing a single ConversationCommand.
12 */
13 class ConversationCommand
14 {
15 public:
16 // What kind of command this is (index of a certain ConversationCommandInfo structure)
17 int type;
18
19 // Which actor should perform this command.
20 int actor;
21
22 // whether the command must be finished before the next command can start
23 bool waitUntilFinished;
24
25 // The numbered arguments
26 typedef std::map<int, std::string> ArgumentMap;
27 ArgumentMap arguments;
28
29 // Constructor
30 ConversationCommand();
31
32 /**
33 * greebo: Returns a human-readable version of this command.
34 */
35 std::string getSentence() const;
36
37 // Returns the argument with the given index or "" if not found
38 std::string getArgument(int index) const;
39 };
40 typedef std::shared_ptr<ConversationCommand> ConversationCommandPtr;
41
42 } // namespace conversation
43
44 #endif /* CONVERSATION_COMMAND_H_ */