Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   Related Pages  

ogs::support::Event Class Reference

An object that notifies observers of significant events. More...

#include <Event.h>

Inheritance diagram for ogs::support::Event:

Inheritance graph
[legend]
Collaboration diagram for ogs::support::Event:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Event (Object &object)
 Create a new event.

ObjectgetSource () const
 Determine the object that caused this event.

virtual std::string toString () const
 Format a string representation of this object.


Detailed Description

Events are collaborators in the Observer pattern: they provide observers with details of the event from observed objects. An observed object is also called an event source. The details contained in an event provide observers with the source of the event. Derived classes can extend this class to provide additional information if needed.


Constructor & Destructor Documentation

ogs::support::Event::Event Object object  )  [inline]
 

Parameters:
object The object causing this event.


Member Function Documentation

Object & ogs::support::Event::getSource  )  const [inline]
 

Returns:
The object causing this event.

std::string Event::toString  )  const [virtual]
 

The format of the string is "Class@Address [observed Observed]" where "Class" is the name of the class, "Address" is the pointer to this object, and "Observed" is the observed object.

Returns:
A string representation of this object.


The documentation for this class was generated from the following files:
Generated on Sun Apr 20 03:40:56 2003 for Open Gaming System (OGS) by doxygen1.3