YAPOG
0.0.1
Yet Another Pokemon Online Game
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
ChatCommand.hpp
Go to the documentation of this file.
1
#ifndef YAPOG_CHATCOMMAND_HPP
2
# define YAPOG_CHATCOMMAND_HPP
3
4
# include <iostream>
5
# include <sstream>
6
# include "
YAPOG/Game/Chat/ChatHeader.hpp
"
7
# include "
YAPOG/Game/Chat/ChatManager.hpp
"
8
# include "
YAPOG/Macros.hpp
"
9
# include "
YAPOG/System/IntTypes.hpp
"
10
# include "
YAPOG/System/String.hpp
"
11
# include "
YAPOG/System/StringHelper.hpp
"
12
13
# define NBCMDS 3
14
# define NBCMDSLOC 4
15
# define NBTOTCMDS (NBCMDS + NBCMDSLOC)
16
17
namespace
yap
18
{
19
class
Chat;
20
class
ChatDisplayer;
21
typedef
BufferType
(
ChatCommand
::*
funcloc
) (
UInt32
* channb,
22
BufferType
* b,
23
ChatManager
* cm,
24
ChatDisplayer
* cd);
25
26
class
YAPOG_LIB
ChatCommand
27
{
28
DISALLOW_COPY
(
ChatCommand
);
29
public
:
30
typedef
struct
MyCmd
31
{
32
String
PtrString
;
33
func
PtrFunc
;
34
funcloc
PtrFuncloc
;
35
}
MyCmdType
;
36
ChatCommand
();
37
~
ChatCommand
();
38
39
// Commands
40
// With request
41
DisplayType
Trade (
BufferType
b);
42
DisplayType
Echo (
BufferType
b);
43
// Without request
44
DisplayType
Help (
BufferType
b);
45
DisplayType
SwitchTab (
BufferType
b);
46
DisplayType
SwitchChan (
BufferType
b);
47
DisplayType
AddChan (
BufferType
b);
48
DisplayType
RmChan (
BufferType
b);
49
DisplayType
Unknown (
BufferType
b);
50
51
// Set the command
52
void
SetCommand (
func
cmd);
53
// Get the command
54
func
GetCmd (
const
char
*pString);
55
// Execute the command
56
ResponseType
ExecCmd (
ChatManagerType
* cm);
57
58
private
:
59
BufferType
SwitchTab (
60
UInt32
* channb,
61
BufferType
* b,
62
ChatManagerType
* cm,
63
ChatDisplayer
* cd);
64
65
BufferType
SwitchChan
66
(
UInt32
* channb,
67
BufferType
* b,
68
ChatManagerType
* cm,
69
ChatDisplayer
* cd);
70
71
BufferType
AddChan (
72
UInt32
* channb,
73
BufferType
* b,
74
ChatManagerType
* cm,
75
ChatDisplayer
* cd);
76
77
BufferType
RmChan (
78
UInt32
* channb,
79
BufferType
* b,
80
ChatManagerType
* cm,
81
ChatDisplayer
* cd);
82
83
MyCmdType
*
tab_
;
84
func
command_
;
85
};
86
}
// namespace yap
87
88
#endif // YAPOG_CHATCOMMAND_HPP
YAPOG
include
YAPOG
Game
Chat
ChatCommand.hpp
Generated on Mon Sep 17 2012 22:24:23 for YAPOG by
1.8.1.1