#include <item.h>
Inheritance diagram for TJammer:
Public Types | |
enum | tJammerType { NORMAL = 0x0001, DISGUISE = 0x0002, CLOAK = 0x0004, ANTIPENETRATE = 0x0008 } |
Public Methods | |
TJammer () | |
TJammer (const TJammer &OldJammer) | |
virtual | ~TJammer () |
virtual bool | load (TDataPackageList *in) |
virtual bool | save (TDataPackageList *out) const |
virtual TItem::tItemType | getItemType () const |
virtual TJammer::tJammerType | getJammerType () const=0 |
virtual void | setJamEfficiency (const int2 JamEfficiency) |
virtual int2 | getJamEfficiency () const |
virtual bool | operator== (const TJammer &Jammer) const |
Protected Methods | |
virtual TJammer & | operator= (const TJammer &Jammer) |
Protected Attributes | |
int2 | fJamEfficiency |
|
Each from TJammer derived class (i.e. TJammerNormal) will return one of these constants to indentify itself. This is especially important in connection with the battle engine. |
|
This constructor doesn't work, because TJammer is a pure virtual class. It's only implemented to be used by the sub classes of TJammer. |
|
This constructor doesn't work either and is implemented to provide a copy constructor for the sub classes.
|
|
Destructs the object. Has nothing else to do, because no memory has to be freed or similar stuff. Doesn't work, because TJammer is a pure virtual class and you wont be able to construct an object. |
|
The method getItemType returns the type of the item, in this case TItem::JAMMER for targeting computer.
Reimplemented from TItem. |
|
With the method getJamEfficiency you can get the jammer's efficiency An actual object will be of one of the sub classes, but because they will not change anything at this method, it will not have to be reimplemented in the sub classes.
|
|
With the method getJammerType you can get the type of the jammer, that means whether it is a normal jammer or something else. This method has to be reimplemented in all the derived classes.
Reimplemented in TJammerNormal, TJammerDisguise, TJammerCloak, and TJammerAntiPenetrate. |
|
The method Load loads a TJammer object from the data packages in the list. All sub classes of TJammer have to reimplement the Load method and they must call TJammer::Load explicitly in their Load method to load the data correctly.
Reimplemented from TItem. Reimplemented in TJammerNormal, TJammerDisguise, TJammerCloak, and TJammerAntiPenetrate. |
|
The assignment operator for TJammer |
|
With the method operator== you can compare two TJammer objects. This is of course the behaviour one would expect from "operator==".
|
|
The method Save saves a TJammer object by adding the data packages to the list. All sub classes of TJammer have to reimplement the Save method and they must call TJammer::Save explicitly in their Save method to save the data correctly.
Reimplemented from TItem. Reimplemented in TJammerNormal, TJammerDisguise, TJammerCloak, and TJammerAntiPenetrate. |
|
The method setJamEfficiency sets the efficiency of the jammer. An actual object will be of one of the sub classes, but because they will not change anything at this method, it will not have to be reimplemented in the sub classes.
|
|
the jammer's efficiency |