Planeshift
cmdutil.h
Go to the documentation of this file.
1 /*
2  * cmdutil.h - Author: Keith Fulton
3  *
4  * Copyright (C) 2001 Atomic Blue (info@planeshift.it, http://www.atomicblue.org)
5  *
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation (version 2 of the License)
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17  *
18  */
19 
20 #ifndef __CMDUTIL_H__
21 #define __CMDUTIL_H__
22 //=============================================================================
23 // Crystal Space Includes
24 //=============================================================================
25 
26 //=============================================================================
27 // Project Includes
28 //=============================================================================
29 #include "net/cmdbase.h"
30 
31 //=============================================================================
32 // Local Includes
33 //=============================================================================
34 
35 class WordArray;
36 
39 {
40 public:
42  CmdHandler *ch,
43  iObjectRegistry* obj);
44 
45  virtual ~psUtilityCommands();
46 
47  virtual const char *HandleCommand(const char *cmd);
48 
49  virtual void HandleMessage(MsgEntry *msg);
50 
51  static void HandleConfirmButton(bool answeredYes, void *thisptr);
52 
54  static void HandleQuit( bool answeredYes, void* thisPtr );
55 
56  csString SaveCamera();
57 
58 protected:
59  csString text;
60  csString yescommands;
61  csString nocommands;
62 
63 private:
65  void HandleQuit();
66 
68  //void HandleDumpMovements();
69 
71  void HandleScreenShot(bool compress, bool bigScreenShot, int width, int height);
72 
74  void HandleConfirm( WordArray& array, csString& error );
75 
77  bool HandleEcho( WordArray& words );
78 
80  void HandleTestAnim( WordArray& words, csString& output );
81 };
82 
83 #endif
psUtilityCommands(ClientMsgHandler *mh, CmdHandler *ch, iObjectRegistry *obj)
csString text
Definition: cmdutil.h:59
csString SaveCamera()
Class to handle general player commands.
Definition: cmdutil.h:38
The structure of 1 queue entry (pointer to a message)
Definition: message.h:143
static void HandleConfirmButton(bool answeredYes, void *thisptr)
Handles messages to be sent out, connects to server and send those.
csString yescommands
Definition: cmdutil.h:60
virtual void HandleMessage(MsgEntry *msg)
WordArray is class that parses text command (e.g.
Definition: strutil.h:62
static void HandleQuit(bool answeredYes, void *thisPtr)
Handles the quit dialog box confirmation on /quit.
virtual ~psUtilityCommands()
csString nocommands
Definition: cmdutil.h:61
virtual const char * HandleCommand(const char *cmd)
Interprets a received message and executes the command.