File indexing completed on 2024-04-21 04:03:07

0001 /***************************************************************************
0002                                cmapfilter.h
0003                              -------------------
0004     begin                : Thu Nov 1 2001
0005     copyright            : (C) 2001 by Kmud Developer Team
0006                            (C) 2007 by Tomas Mecir <kmuddy@kmuddy.net>
0007     email                : kmud-devel@kmud.de
0008  ***************************************************************************/
0009 
0010 /***************************************************************************
0011  *                                                                         *
0012  *   This program is free software; you can redistribute it and/or modify  *
0013  *   it under the terms of the GNU General Public License as published by  *
0014  *   the Free Software Foundation; either version 2 of the License, or     *
0015  *   (at your option) any later version.                                   *
0016  *                                                                         *
0017  ***************************************************************************/
0018 
0019 #ifndef CMAPFILTER_H
0020 #define CMAPFILTER_H
0021 
0022 #include <QString>
0023 #include <QStringList>
0024 
0025 class CMapManager;
0026 
0027 /**This is used to process the input/output of the mud for the mapper
0028   *@author Kmud Developer Team
0029   */
0030 
0031 class CMapFilter
0032 {
0033 public:
0034   CMapFilter(CMapManager *manager);
0035   ~CMapFilter();
0036 
0037   /** This method is called with when input is sent to the mud */
0038   QString processCommand (const QString &);
0039   /** This method is called when text comes from the server */
0040   void processServerOutput (const QString &);
0041 
0042 private:
0043   QString executeBeforeCommand (const QString &command);
0044   QString executeAfterCommand (const QString &command);
0045 
0046 private:
0047   CMapManager *mapManager;
0048   QStringList directionCmdQueue;
0049 };
0050 
0051 #endif