Advanced Strategic Command
Public Member Functions | Public Attributes | List of all members
Message Class Reference

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

#include <messages.h>

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. More...
 

Public Attributes

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

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)
Message::Message ( const ASCString msg,
GameMap gamemap,
int  rec,
int  from = 512 
)

Constructor.

Parameters
msgThe message text
gamemapThe map that this message is currently being played
recThe receipient. Bitmapped: each bit one player
fromThe 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::getCcText ( const GameMap gamemap) const
inline

Definition at line 37 of file messages.h.

References cc.

Referenced by IngameMessageViewer::SetMessage().

ASCString Message::getFromText ( const GameMap gamemap) const
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::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().

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().

GameTime Message::gametime

the game time the messages was written

Definition at line 57 of file messages.h.

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

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().

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().

ASCString Message::text
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().

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().


The documentation for this class was generated from the following files: