Message Class Reference

A Message to a player. It may either be send by another player or by the system. More...

#include <messages.h>

List of all members.

Public Member Functions

ASCString getFromText (const GameMap *gamemap) const
ASCString getCcText (const GameMap *gamemap) const
ASCString getToText (const GameMap *gamemap) const
 Message (GameMap *spfld)
 Message (const ASCString &msg, GameMap *gamemap, int rec, int from=512)
 Constructor.

Public Attributes

int from
 bitmapped variable showing the sender of the message. Bit 0 - 7 are the players, Bit 9 is the system.
int to
 bitmapped variable showing the recipients of the message.
int cc
 bitmapped variable showing the recipients of the message.
time_t time
 the real world time the message was written
ASCString text
 the body of the message
int id
 an id that identifies the message. It is assigned automatically
GameTime gametime
 the game time the messages was written
bool reminder
 reminders are special messages that the players sends to himself, to be read the next turn


Detailed Description

A Message to a player. It may either be send by another player or by the system.

Definition at line 30 of file messages.h.


Constructor & Destructor Documentation

Message::Message ( GameMap spfld  ) 

Definition at line 24 of file messages.cpp.

References GameMap::actplayer, from, gametime, GameMap::messageid, GameMap::messages, reminder, time, GameMap::time, and to.

Message::Message ( const ASCString msg,
GameMap gamemap,
int  rec,
int  from = 512 
)

Constructor.

Parameters:
msg The message text
gamemap The map that this message is currently being played
rec The receipient. Bitmapped: each bit one player
from The sender. Bitmapped too! 512 = system

Definition at line 39 of file messages.cpp.

References from, gametime, GameMap::messageid, GameMap::messages, GameMap::player, reminder, text, time, GameMap::time, to, and Player::unreadmessage.


Member Function Documentation

ASCString Message::getFromText ( const GameMap gamemap  )  const

Definition at line 72 of file messages.cpp.

References from, getFirstBit(), Player::getName(), and GameMap::player.

Referenced by IngameMessageViewer::IngameMessageViewer(), and IngameMessageViewer::SetMessage().

ASCString Message::getCcText ( const GameMap gamemap  )  const [inline]

Definition at line 37 of file messages.h.

References cc.

Referenced by IngameMessageViewer::SetMessage().

ASCString Message::getToText ( const GameMap gamemap  )  const [inline]

Definition at line 38 of file messages.h.

Referenced by IngameMessageViewer::SetMessage().


Member Data Documentation

int Message::from

bitmapped variable showing the sender of the message. Bit 0 - 7 are the players, Bit 9 is the system.

Definition at line 34 of file messages.h.

Referenced by getFromText(), MessageLineWidget::getName(), IngameMessageViewer::IngameMessageViewer(), Message(), and tspfldloaders::readmessages().

int Message::to

bitmapped variable showing the recipients of the message.

Definition at line 38 of file messages.h.

Referenced by IngameMessageViewer::IngameMessageViewer(), Message(), MessageLineWidget::MessageLineWidget(), NewMessage::NewMessage(), and tspfldloaders::readmessages().

int Message::cc

bitmapped variable showing the recipients of the message.

Definition at line 44 of file messages.h.

Referenced by getCcText(), IngameMessageViewer::IngameMessageViewer(), NewMessage::NewMessage(), and tspfldloaders::readmessages().

time_t Message::time

the real world time the message was written

Definition at line 48 of file messages.h.

Referenced by Message(), MessageLineWidget::MessageLineWidget(), and tspfldloaders::readmessages().

ASCString Message::text

the body of the message

Definition at line 51 of file messages.h.

Referenced by IngameMessageViewer::IngameMessageViewer(), Message(), NewMessage::NewMessage(), tspfldloaders::readmessages(), and IngameMessageViewer::SetMessage().

int Message::id

an id that identifies the message. It is assigned automatically

Definition at line 54 of file messages.h.

Referenced by tspfldloaders::readmessages().

GameTime Message::gametime

the game time the messages was written

Definition at line 57 of file messages.h.

Referenced by Message(), and tspfldloaders::readmessages().

bool Message::reminder

reminders are special messages that the players sends to himself, to be read the next turn

Definition at line 60 of file messages.h.

Referenced by IngameMessageViewer::IngameMessageViewer(), Message(), NewMessage::NewMessage(), and tspfldloaders::readmessages().


The documentation for this class was generated from the following files:
Generated on Mon May 21 01:47:03 2012 for Advanced Strategic Command by  doxygen 1.5.1