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

ogs::core::Modifier Class Reference

An integer value added to another integer value. More...

#include <Modifier.h>

Inheritance diagram for ogs::core::Modifier:

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

Collaboration graph
[legend]
List of all members.

Public Types

typedef short Value
 A signed integer type representing the value of a modifier.


Public Member Functions

 Modifier (Value value=0)
 Create a new modifier.

Value getValue () const
 Determine the value of the modifier.

void setValue (Value value)
 Change the value of the modifier.

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


Detailed Description

If the value of the modifier is negative, the value of the modifier is subtracted from the other value. The "other" value may be an object that has a modifiable integer attribute. The integer value is encapsulated in a class to allow modifier objects to notify observers of events that cause the value of the modifier to change.


Member Typedef Documentation

typedef short ogs::core::Modifier::Value
 

This type is explicitly named in case the underlying type should change in the future.


Constructor & Destructor Documentation

ogs::core::Modifier::Modifier Value  value = 0  )  [inline]
 

The default value of the modifier is zero (0).

Parameters:
value Value of the modifier.


Member Function Documentation

Modifier::Value ogs::core::Modifier::getValue  )  const [inline]
 

Returns:
Value of the modifier.

void Modifier::setValue Value  value  ) 
 

Notifies listeners.

Parameters:
value Value of the modifier.

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

The string contains the value of this modifier.

Returns:
A string representation of this gender.

Reimplemented from ogs::support::Object.


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