Main Page | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals

Colony Class Reference

#include <colony.h>

Collaboration diagram for Colony:

Collaboration graph
[legend]

Public Member Functions

 ~Colony (void)
void Save (ofstream &of)

Static Public Member Functions

void ResetAllColonies (void)

Data Fields

const icstring species
const bool homeWorld

Static Public Attributes

multimap< icstring, Colony * > colonies

Protected Member Functions

 Colony (const icstring aSpecies, Planet &aPl, const bool aHomeWorld=false)

Protected Attributes

Planetpl

Friends

class Planet

Constructor & Destructor Documentation

Colony::Colony const icstring  aSpecies,
Planet aPl,
const bool  aHomeWorld = false
[protected]
 

Definition at line 6 of file colony.cpp.

References colonies.

00007 : species( aSpecies ) , pl( aPl ) , homeWorld( aHomeWorld )
00008 {
00009         colonies.insert( make_pair( aSpecies , this ) );
00010 }

Colony::~Colony void   ) 
 

Definition at line 12 of file colony.cpp.

00013 {
00014 }


Member Function Documentation

void Colony::ResetAllColonies void   )  [static]
 

Definition at line 16 of file colony.cpp.

References colonies.

Referenced by PlayGame::Load(), Galaxy::Reset(), and MainGame::~MainGame().

00017 {
00018         for( multimap<icstring,Colony *>::iterator it = colonies.begin() ; it != colonies.end() ; ++it )
00019                 delete it->second;
00020         colonies.clear();
00021 }

void Colony::Save ofstream &  of  ) 
 

Definition at line 23 of file colony.cpp.

References homeWorld, pl, and Planet::planetName.

00024 {
00025         of << "( \"" << pl.planetName << "\" " << homeWorld << ")" << endl;
00026 }


Friends And Related Function Documentation

friend class Planet [friend]
 

Definition at line 23 of file colony.h.


Field Documentation

multimap< icstring, Colony * > Colony::colonies [static]
 

Definition at line 3 of file colony.cpp.

Referenced by Colony(), ResetAllColonies(), and PlayGame::Save().

const bool Colony::homeWorld
 

Definition at line 32 of file colony.h.

Referenced by Planet::IsHomeWorldOf(), and Save().

Planet& Colony::pl [protected]
 

Definition at line 25 of file colony.h.

Referenced by Save().

const icstring Colony::species
 

Definition at line 31 of file colony.h.

Referenced by Planet::DrawPlanet(), and Planet::IsHomeWorldOf().


The documentation for this class was generated from the following files:
Generated on Fri Dec 5 04:06:18 2003 for Borqueror by doxygen 1.3.3