#include <parsec.hpp>
Inheritance diagram for parsec:
When the parsec constructor is invoked the parsec is put together using the book 3 rules with just a primary planet defined. Use the member method "extendedGeneration()" to flesh out the rest of the parsec's values.
Definition at line 48 of file parsec.hpp.
Public Member Functions | |
parsec () | |
parsec (int row, int column) | |
mainPlanet * | getMainPlanet () |
void | setMainPlanet (mainPlanet *p) |
char * | asText () |
parsec::parsec | ( | ) |
Generic constructor.
Definition at line 54 of file parsec.cpp.
00054 : sparseArrayNode() { 00055 this->primaryGeneration(); 00056 }
parsec::parsec | ( | int | row, | |
int | column | |||
) |
Parsec with parameters to set its position within a subsector.
row | Integer value for the row | |
column | Integer value for the column |
Definition at line 59 of file parsec.cpp.
00059 : sparseArrayNode(row,column) { 00060 this->primaryGeneration(); 00061 00062 }
char * parsec::asText | ( | ) |
Return a text representation of this parsec in Book 3 format.
Definition at line 64 of file parsec.cpp.
References mainPlanet::asText(), getMainPlanet(), and sparseArrayNode::getRow().
Referenced by subsector::asText().
00064 { 00065 char *buffer = (char*) malloc(81); 00066 00067 buffer[0]='\0'; 00068 00069 sprintf(buffer,"%0.2d-%0.2d\t%s",this->getColumn(),this->getRow(), 00070 this->getMainPlanet()->asText()); 00071 return buffer; 00072 }
Here is the call graph for this function:
Here is the caller graph for this function:
mainPlanet * parsec::getMainPlanet | ( | ) |
Get a the main planet object
Definition at line 42 of file parsec.cpp.
Referenced by asText().
Here is the caller graph for this function:
void parsec::setMainPlanet | ( | mainPlanet * | p | ) |
Set the main planet for this parsec.
p | pointer to a mainPlanet object |
Definition at line 47 of file parsec.cpp.