#include <item.h>
Inheritance diagram for TWeapon:
Public Methods | |
TWeapon () | |
TWeapon (const TWeapon &OldWeapon) | |
virtual | ~TWeapon () |
virtual bool | load (TDataPackageList *in) |
virtual bool | save (TDataPackageList *out) const |
virtual TItem::tItemType | getItemType () const=0 |
virtual void | setDamagePoints (const int2 DamagePoints) |
virtual int2 | getDamagePoints () const |
virtual void | setRateOfFire (const int2 RateOfFire) |
virtual int2 | getRateOfFire () const |
virtual void | setWeaponType (const TItem::tWeaponType WeaponType) |
virtual TItem::tWeaponType | getWeaponType () const |
virtual bool | operator== (const TWeapon &Weapon) const |
Protected Methods | |
virtual TWeapon & | operator= (const TWeapon &Weapon) |
Protected Attributes | |
int2 | fDamagePoints |
int2 | fRateOfFire |
TItem::tWeaponType | fWeaponType |
|
This constructor doesn't work, because TWeapon is a pure virtual class. It's only implemented to be used by the sub classes of TWeapon. |
|
This constructor doesn't work either and is only 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 TWeapon is a pure virtual class and you wont be able to construct an object. |
|
With the method getDamagePoints you can get the damage points the weapon causes per shot.
|
|
The method getItemType returns the type of the item, , but in this class it's pure virtual. Therefor it has be reimplemented in all derived classes.
Reimplemented from TItem. |
|
With the method getRateOfFire you can get the rate of fire of the weapon, that is how many shots it can fire in a certain time.
|
|
With the method getWeaponType you can get the type of the weapon.
|
|
The method Load loads a TWeapon object from the data packages in the list.
Reimplemented from TItem. |
|
The assignment operator for TWeapon |
|
With the method operator== you can compare two TWeapon objects. This is of course the behaviour one would expect from "operator==".
|
|
The method Save saves a TWeapon object by adding the data packages to the list.
Reimplemented from TItem. |
|
The method setDamage sets the damage points the weapon causes per shot.
|
|
The method setRateOfFire sets the rate of fire of the weapon, that is how many shots it can fire in a certain time.
|
|
The method setWeaponType sets the type of the weapon.
|
|
the damage points the weapon causes |
|
the rate of fire for the weapon |
|
the type of the weapon |