00001 /*************************************************************************** 00002 messages.h - description 00003 ------------------- 00004 begin : Thu Feb 21 2002 00005 copyright : (C) 2002 by Martin Bickel 00006 email : bickel@asc-hq.org 00007 ***************************************************************************/ 00012 /*************************************************************************** 00013 * * 00014 * This program is free software; you can redistribute it and/or modify * 00015 * it under the terms of the GNU General Public License as published by * 00016 * the Free Software Foundation; either version 2 of the License, or * 00017 * (at your option) any later version. * 00018 * * 00019 ***************************************************************************/ 00020 00021 00022 #ifndef messages_h_included 00023 #define messages_h_included 00024 00025 #include "typen.h" 00026 00027 class GameMap; 00028 00030 class Message { 00031 ASCString bitMap2PlayerName( int p, const GameMap* gamemap ) const; 00032 public: 00034 int from; 00035 00036 ASCString getFromText( const GameMap* gamemap ) const; 00037 ASCString getCcText( const GameMap* gamemap ) const { return bitMap2PlayerName( cc, gamemap ); }; 00038 ASCString getToText( const GameMap* gamemap ) const { return bitMap2PlayerName( to, gamemap ); }; 00039 00041 int to; 00042 00044 int cc; 00045 00046 00048 time_t time; 00049 00051 ASCString text; 00052 00054 int id; 00055 00057 GameTime gametime; 00058 00060 bool reminder; 00061 00062 Message ( GameMap* spfld ); 00063 00070 Message ( const ASCString& msg, GameMap* gamemap,int rec, int from = 512 ); 00071 }; 00072 00073 typedef PointerList<Message*> MessageContainer; 00074 typedef list<Message*> MessagePntrContainer; 00075 00076 00077 00078 #endif
1.4.2