#include <material-benefit.hpp>
Inheritance diagram for materialBenefit:
Definition at line 65 of file material-benefit.hpp.
Public Member Functions | |
materialBenefit (char *s) | |
void | merge (materialBenefit *p) |
int | getQuantity () |
void | setQuantity (int q) |
char * | getSignature () |
virtual void | XMLout (FILE *fout) |
materialBenefit::materialBenefit | ( | char * | s | ) |
Within the class constructor we set the signature of this object which gets overloaded by derived objects.
Definition at line 27 of file material-benefit.cpp.
00027 : slinkNode() { 00028 signature=s; 00029 }
int materialBenefit::getQuantity | ( | ) |
Return the quantity member's value
Definition at line 35 of file material-benefit.cpp.
Referenced by merge().
Here is the caller graph for this function:
char * materialBenefit::getSignature | ( | ) |
Get the object's signature, which is normally set by a derived object
Definition at line 43 of file material-benefit.cpp.
Referenced by materialBenefitList::addBenefit().
Here is the caller graph for this function:
void materialBenefit::merge | ( | materialBenefit * | p | ) |
When another benefit of the same type is added to the list of benefits we are goingto merge them by adding the two quantity's together.
p | pointer to another mbBlade object |
Definition at line 39 of file material-benefit.cpp.
References getQuantity().
Referenced by materialBenefitList::addBenefit().
00039 { 00040 quantity = quantity + p->getQuantity(); 00041 }
Here is the call graph for this function:
Here is the caller graph for this function:
void materialBenefit::setQuantity | ( | int | q | ) |
Set the quantity member. (Shouldn't ever be invoked.. but...)
q | integer value to set the quantity member to. |
Definition at line 31 of file material-benefit.cpp.
Referenced by mbBlade::mbBlade(), mbGun::mbGun(), mbHighPassage::mbHighPassage(), and mbLowPassage::mbLowPassage().
Here is the caller graph for this function:
void materialBenefit::XMLout | ( | FILE * | fout | ) | [virtual] |
Send well formed (I hope!) XML to a file.
fout | pointer to a file buffer/handle to write XML to. |
Reimplemented in mbBlade, mbGun, mbHighPassage, mbLowPassage, mbPassageObj, mbShip, mbTAS, mbb2FreeTrader, and mbb2Scout.
Definition at line 47 of file material-benefit.cpp.
Referenced by materialBenefitList::XMLout().
00047 { 00048 // Do nothing.. this is a base class and this should get overridden by the 00049 // derived classes, but it needs to be here as a placeholder. 00050 #ifdef DEBUG_ON 00051 FILE* diaglog = fopen("diaglog.log","a+"); 00052 fprintf(diaglog,"Entering and exiting materialBenefit::XMLout\n"); 00053 fclose (diaglog); 00054 #endif 00055 00056 }
Here is the caller graph for this function: