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

ogs::core::PartialMethod Struct Reference

A method that directly maps ability types to ability scores. More...

#include <Abilities.h>

Inheritance diagram for ogs::core::PartialMethod:

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

Collaboration graph
[legend]
List of all members.

Public Types

typedef Abilities::ScoreMap::value_type Value
 A pair of ability type and ability score.


Public Member Functions

template<class _InputIterator>  PartialMethod (_InputIterator first, _InputIterator last)
 Create a new partial method.

bool hasAbility (Ability::Type type)
 Determine if this method provides a score for an ability type.

Ability::Score operator() (Ability::Type type)
 Determine the score for an ability type.


Detailed Description

The partial method can be used to directly create a complete or partial set of abilities with preset scores.


Constructor & Destructor Documentation

template<class _InputIterator>
ogs::core::PartialMethod::PartialMethod _InputIterator  first,
_InputIterator  last
[inline]
 

A partial method is created from a sequence of pairs of ability types and ability scores. The iterators point to the first and just past the last element of this sequence. The sequence may describe a partial set of ability scores: all six ability pairs need not be present.

Parameters:
first Iterator to first pair of ability type and score.
last Iterator to last pair of ability type and score.


Member Function Documentation

bool ogs::core::PartialMethod::hasAbility Ability::Type  type  )  [inline]
 

Parameters:
type An ability type.
Returns:
True if this method provides a score for the type.

Ability::Score ogs::core::PartialMethod::operator() Ability::Type  type  )  [inline, virtual]
 

Parameters:
type An ability type.
Returns:
An ability score.

Implements ogs::core::Method.


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