CSWEvent Class Reference

List of all members.

Public Member Functions

boost::shared_ptr< CSWIMessagegetMessage ()

Static Public Member Functions

static PtrType create (boost::shared_ptr< CSWObject > pSender, boost::shared_ptr< CSWObject > pReceiver, boost::shared_ptr< CSWIMessage > pMessage, double fExpireTime)

Detailed Description

This class encapsulates an event. An event will delivered from sender to an receiver. It contains a message and a time to life.


Member Function Documentation

CSWEvent::PtrType CSWEvent::create ( boost::shared_ptr< CSWObject pSender,
boost::shared_ptr< CSWObject pReceiver,
boost::shared_ptr< CSWIMessage pMessage,
double  fExpireTime 
) [static]

Creates a new Event.

Parameters:
pSender The sender (should always be self, because you never know other submarines)
pReceiver The receiver (should always be self, because you never know other submarines)
pMessage The message that should be delivered.
fExpireTime The time to life in seconds. This is clamped to range [0, 20].

CSWIMessage::PtrType CSWEvent::getMessage (  ) 

Returns the containing message.

Returns:
The containing message.


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