YAPOG
0.0.1
Yet Another Pokemon Online Game
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
Chat.hpp
Go to the documentation of this file.
1
#ifndef YAPOG_CHAT_HPP
2
# define YAPOG_CHAT_HPP
3
4
# include <iostream>
5
# include <sstream>
6
# include "
YAPOG/Macros.hpp
"
7
# include "
YAPOG/Game/Chat/ChatCommand.hpp
"
8
# include "
YAPOG/Game/Chat/ChatDisplayer.hpp
"
9
# include "
YAPOG/Game/Chat/ChatHeader.hpp
"
10
# include "
YAPOG/Game/Chat/ChatManager.hpp
"
11
# include "
YAPOG/System/IntTypes.hpp
"
12
# include "
YAPOG/System/String.hpp
"
13
# include "
YAPOG/System/StringFilter.hpp
"
14
# include "
YAPOG/System/StringHelper.hpp
"
15
16
namespace
yap
17
{
18
class
YAPOG_LIB
Chat
19
{
20
DISALLOW_COPY
(
Chat
);
21
public
:
22
typedef
collection::Array<String>
BufferType
;
23
Chat
();
24
Chat
(
String
b);
25
~
Chat
();
26
27
// Parse chat line - Return a string if arrow up/down is pushed
28
String
Parse ();
29
// Execute the line - Return chan number and a string to display
30
ResponseType
Exec ();
31
32
// Getter & Setter for buffer_
33
void
SetBuf (
String
b);
34
35
// Chat History
36
std::pair<bool, String> GetUpHistory ();
37
std::pair<bool, String> GetDownHistory ();
38
String
GetStringHistory ();
39
BufferType
GetBufHistory ();
40
BufferType
GetHistory ();
41
bool
GetIsCommand ();
42
bool
ChangeChan (
ChatDisplayer
& display);
43
44
String
GetTabName (
UInt32
TabNb);
45
UInt32
GetTabCount ();
46
UInt32
GetTabNb ();
47
48
private
:
49
void
IncOff ();
50
// Check if the user's entry is a command
51
void
Check ();
52
// Execute Echo
53
void
ToEcho (
String
s);
54
// Test History
55
std::pair<bool, String> TestHistoryChecker ();
56
57
ChatManagerType
*
chatmanager_
;
58
ChatCommand
*
chatcommand_
;
59
size_t
offset_
;
60
UInt32
index_
;
61
Int32
chan_
;
62
String
entry_
;
63
String
output_
;
64
BufferType
buffer_
;
65
BufferType
history_
;
66
bool
isCommand_
;
67
};
68
}
// namespace yap
69
70
#endif // YAPOG_CHAT_HPP
YAPOG
include
YAPOG
Game
Chat
Chat.hpp
Generated on Mon Sep 17 2012 22:24:23 for YAPOG by
1.8.1.1