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

ogs::core::details::Gender Class Reference

A detail that identifies the sex of a creature. More...

#include <Gender.h>

Inheritance diagram for ogs::core::details::Gender:

Inheritance graph
[legend]
Collaboration diagram for ogs::core::details::Gender:

Collaboration graph
[legend]
List of all members.

Public Types

enum  Value {
  UNKNOWN = 0, MALE = 'M', FEMALE = 'F', ASEXUAL = 'A',
  BISEXUAL = 'B'
}
 Value of gender. More...


Public Member Functions

 Gender (Value value=UNKNOWN)
 Create a new gender.

Value getValue () const
 Determine the value of this gender.

std::string getName () const
 Determine the name of this gender.

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


Detailed Description

Genders are normally associated only with characters or creatures. It can be used to determine physical characteristics of a creature.


Member Enumeration Documentation

enum ogs::core::details::Gender::Value
 

This class supports five different genders.

Enumeration values:
UNKNOWN  An unknown or undefined gender.
MALE  A male gender.
FEMALE  A female gender.
ASEXUAL  An asexual gender, neither male or female.
BISEXUAL  A bisexual gender, both male and female.


Constructor & Destructor Documentation

Gender::Gender Value  value = UNKNOWN  ) 
 

If the value is invalid, the value is set to UNKNOWN.

Parameters:
value MALE, FEMALE, ASEXUAL, BISEXUAL, or UNKNOWN.


Member Function Documentation

std::string Gender::getName  )  const
 

Returns:
"Male", "Female", "Unknown", "Asexual", or "Bisexual"

Gender::Value ogs::core::details::Gender::getValue  )  const [inline]
 

Returns:
MALE, FEMALE, NONE, BOTH, or UNKNOWN.

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

The string contains the value of this gender.

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:30 2003 for Open Gaming System (OGS) by doxygen1.3