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

ogs::core::Event Class Reference

An event that allows observers to determine changes to the list. More...

#include <Modifiers.h>

Inheritance diagram for ogs::core::Event:

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

Collaboration graph
[legend]
List of all members.

Public Types

enum  Type { ADDED, REMOVED, CHANGED }
 The type of event that happened. More...


Public Member Functions

Modifier::Value getPreviousValue () const
 Determine previous value of this list of modifiers.

Type getType () const
 Determine the type of this event.

ModifiergetModifier () const
 Determine the modifier described by the type of this event.


Protected Member Functions

 Event (Modifiers &modifiers, Type type, Modifier &modifier)
 Create a new modifier list event.


Friends

void Modifiers::addModifier (Modifier &modifier)
void Modifiers::removeModifier (Modifier &modifier)
void Modifiers::handleEvent (ogs::support::Event &event)

Detailed Description

The changes to a modifiers list include the previous total value of the list, the type of event (whether a modifier changed, was added, or removed), and the modifier described by the event type. Modifier list events must be created before the list is changed so the event can store this information!


Member Enumeration Documentation

enum ogs::core::Modifiers::Event::Type
 

Enumeration values:
ADDED  A modifier was added to the list.
REMOVED  A modifier was removed from the list.
CHANGED  The value of a modifier in the list changed.


Constructor & Destructor Documentation

ogs::core::Event::Event Modifiers modifiers,
Type  type,
Modifier modifier
[inline, protected]
 

Parameters:
modifiers Modifier list causing this event.
type Type of this event.
modifier Modifier referenced by this event.


Member Function Documentation

Modifier & ogs::core::Event::getModifier  )  const [inline]
 

The type of modifier event can be determined using the getType() function.

Returns:
Modifier described by the type of this event.

Modifier::Value ogs::core::Event::getPreviousValue  )  const [inline]
 

Returns:
Previous value of this list of modifiers.

Modifiers::Event::Type ogs::core::Event::getType  )  const [inline]
 

The modifier that caused this type of event can be determined using the getModifier() function.

Returns:
Type of this event.


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