]> git.localhorst.tv Git - blank.git/blob - src/shared/CLIContext.hpp
8de432b7788adb966e0a890e45111e868290b0ca
[blank.git] / src / shared / CLIContext.hpp
1 #ifndef BLANK_SHARED_CLICONTEXT_HPP_
2 #define BLANK_SHARED_CLICONTEXT_HPP_
3
4 #include <string>
5
6
7 namespace blank {
8
9 class Player;
10
11 class CLIContext {
12
13 public:
14         explicit CLIContext(Player &p)
15         : player(p) { }
16
17         /// get the player responsible for all this
18         Player &GetPlayer() { return player; }
19
20         /// an error has happened and the player should be notified
21         virtual void Error(const std::string &) = 0;
22
23         /// return to sender
24         /// use this for output concerning the originator of a command
25         virtual void Message(const std::string &) = 0;
26
27         /// send a status message to all players
28         /// use this to announce stuff which may be interesting to anyone
29         virtual void Broadcast(const std::string &) = 0;
30
31 private:
32         Player &player;
33
34 };
35
36 }
37
38 #endif