CSWTransceiver Class Reference

Inheritance diagram for CSWTransceiver:

Inheritance graph
List of all members.

Public Member Functions

int getMaxNumQueuedMessages () const
int getNumQueuedMessages () const
void send (const std::string &strMessage)
std::string getFirstReceived ()

Detailed Description

This class encapsulates transceiver functionality. With this you can send and receive broadcast messages. The last 100 received text messages are queued until they fetched with getFirstReceived.

Member Function Documentation

int CSWTransceiver::getMaxNumQueuedMessages (  )  const

Returns the maximal number of messages that will be queued.

int CSWTransceiver::getNumQueuedMessages (  )  const

Returns the current queued number of messages.

void CSWTransceiver::send ( const std::string &  strMessage  ) 

Sends a given text to all eventdealable objects within the world, but not to itself.

strMessage The text that should be sent.

std::string CSWTransceiver::getFirstReceived (  ) 

Returns the first (the oldest in the queue) received text and removes it from internal queue. If no text is available "" is returned.

Generated at 2 Jan 2007 for project CodeSubWars. www.codesubwars.org