#include <item.h>
Inheritance diagram for TScanner:
Public Types | |
enum | tScannerType { NORMAL_ACTIVE = 0x0001, NORMAL_PASSIVE = 0x0002, ANTIDISGUISE_ACTIVE = 0x0004, ANTIDISGUISE_PASSIVE = 0x0008, ANTICLOAK_ACTIVE = 0x0010, ANTICLOAK_PASSIVE = 0x0020, PENETRATE_ACTIVE = 0x0040, PENETRATE_PASSIVE = 0x0080 } |
Public Methods | |
TScanner () | |
TScanner (const TScanner &OldScanner) | |
virtual | ~TScanner () |
virtual bool | load (TDataPackageList *in) |
virtual bool | save (TDataPackageList *out) const |
virtual TItem::tItemType | getItemType () const |
virtual TScanner::tScannerType | getScannerType () const=0 |
virtual void | setScanEfficiency (const int2 ScanEfficiency) |
virtual int2 | getScanEfficiency () const |
virtual void | setShortRange (int4 Range) |
virtual int4 | getShortRange () |
virtual void | setLongRange (int2 Range) |
virtual int2 | getLongRange () |
virtual bool | operator== (const TScanner &Scanner) const |
Protected Methods | |
virtual TScanner & | operator= (const TScanner &Scanner) |
Protected Attributes | |
int2 | fScanEfficiency |
int4 | fShortRange |
int2 | fLongRange |
|
Each from TScanner derived class (i.e. TScannerNormalActive) 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 TScanner is a pure virtual class. It's only implemented to be used by the sub classes of TScanner. |
|
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 TScanner 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::SCANNER for targeting computer.
Reimplemented from TItem. |
|
With the method getLongRange you can get the range of the long range scan ability of the scanner. This is the range the scanner has on the astar map.
|
|
With the method getScanEfficiency you can get the scanner'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 getScannerType you can get the type of the scanner, that means whether it is a normal active scanner or something else. This method has to be reimplemented in all the derived classes.
Reimplemented in TScannerNormalActive, TScannerNormalPassive, TScannerAntiDisguiseActive, TScannerAntiDisguisePassive, TScannerAntiCloakActive, TScannerAntiCloakPassive, TScannerPenetrateActive, and TScannerPenetratePassive. |
|
With the method getShortRange you can get the range of the short range scan ability of the scanner. This is the range the scanner has on the battle field.
|
|
The method Load loads a TScanner object from the data packages in the list. All sub classes of TScanner have to reimplement the Load method and they must call TScanner::Load explicitly in their Load method to load the data correctly.
Reimplemented from TItem. Reimplemented in TScannerNormalActive, TScannerNormalPassive, TScannerAntiDisguiseActive, TScannerAntiDisguisePassive, TScannerAntiCloakActive, TScannerAntiCloakPassive, TScannerPenetrateActive, and TScannerPenetratePassive. |
|
The assignment operator for TScanner |
|
With the method operator== you can compare two TScanner objects. This is of course the behaviour one would expect from "operator==".
|
|
The method Save saves a TScanner object by adding the data packages to the list. All sub classes of TScanner have to reimplement the Save method and they must call TScanner::Save explicitly in their Save method to save the data correctly.
Reimplemented from TItem. Reimplemented in TScannerNormalActive, TScannerNormalPassive, TScannerAntiDisguiseActive, TScannerAntiDisguisePassive, TScannerAntiCloakActive, TScannerAntiCloakPassive, TScannerPenetrateActive, and TScannerPenetratePassive. |
|
With the method setLongRange you can set the range of the long range scan ability of the scanner. This is the range the scanner has on the star map.
|
|
The method setScanEfficiency sets the efficiency of the scanner. 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 setShortRange you can set the range of the short range scan ability of the scanner. This is the range the scanner has on the battle field.
|
|
the range of the long range scan abilities (star map) |
|
the scanner's efficiency |
|
the range of the short range scan abilities (battle field) |