YAPOG  0.0.1
Yet Another Pokemon Online Game
ChatDisplayer.hpp
Go to the documentation of this file.
1 #ifndef YAPOG_CHATDISPLAYER_HPP
2 # define YAPOG_CHATDISPLAYER_HPP
3 
4 # include "YAPOG/Macros.hpp"
7 # include "YAPOG/System/String.hpp"
9 
10 # define CHANMAXBUF 1000
11 # define NBCHAN 6
12 # define DISPLAYS(s) std::cout << (s) << std::endl
13 
14 namespace yap
15 {
16  // Channel type
18  typedef std::pair <CMType*, String> ChanOutputType;
20 
22  {
24  public:
25 
26  ChatDisplayer ();
27  ChatDisplayer (String name, UInt32 c);
28  ChatDisplayer (String name, bool* chanbooltab);
29  ~ChatDisplayer ();
30 
31  UInt32 GetChanNb ();
32  void AddToChan (Int32 c, BufferType b);
33  String GetLastStrChan ();
34  void AddChan (UInt32 c);
35  void RmChan (UInt32 c);
36  void DisplayChanOn ();
37  ResponseType DisplayTab ();
38  ResponseType Display ();
39 
40  String GetName ();
41  ChanBufType GetBuff ();
42  private:
43  void MyDisplay (size_t index, size_t last);
44  void MyDisplayAdder (size_t index,
45  size_t last,
46  ResponseType* rt);
47 
49  size_t offset_;
53  bool* chanbooltab_;
54  };
55 } // namespace yap
56 
57 #endif // YAPOG_CHATDISPLAYER_HPP