mbShip Class Reference

#include <mb-ship.hpp>

Inheritance diagram for mbShip:

Inheritance graph
Collaboration diagram for mbShip:

Collaboration graph
List of all members.

Detailed Description

Various character types have the opportunity to have a ship bestowed upon them as a mustering out benefit. The difference between getting a ship and other benefits are as follows:
  1. A ship has an age. The first time a mustering out character earns this benefit the ship is 10 years old. Every time after that the ship is aged another 10 years.
  2. You can only earn one ship.

See also:
possibly convert this class to have the specs for the ship included

Definition at line 51 of file mb-ship.hpp.

Public Member Functions

 mbShip (char *s)
void merge (mbShip *p)
int getAge ()
virtual void XMLout (FILE *fout)

Constructor & Destructor Documentation

mbShip::mbShip ( char *  s  ) 

Class constructor.

s pointer to a mbShip object, normally a derived class
See also:
materialBenefit::materialBenefit(char *s)

Definition at line 27 of file mb-ship.cpp.

00027                      :materialBenefit(s){
00028         age=10;
00029 }

Member Function Documentation

int mbShip::getAge (  ) 

Get the ship's age

integer value representing the ship's age.

Definition at line 35 of file mb-ship.cpp.

00035                   {
00036         return age;
00037 }

void mbShip::merge ( mbShip p  ) 

This is an override to the merge method from the base object. Each time the ship benefit is recieved the age benefit incrments by 10.

p pointer to a mbShip object, normally a derived class.

Definition at line 31 of file mb-ship.cpp.

00031                            {
00032         age = age+10;
00033 }

virtual void mbShip::XMLout ( FILE *  fout  )  [inline, virtual]

A mere placeholder that will be overridden by derived classes of this class

Write XML to a file...

fout -- pointer to a file handle/buffer to write XML to

Reimplemented from materialBenefit.

Reimplemented in mbb2FreeTrader, and mbb2Scout.

Definition at line 86 of file mb-ship.hpp.

00086 {};

The documentation for this class was generated from the following files:
Generated on Fri Mar 7 16:42:02 2008 for frpuniverse by  doxygen 1.4.7