Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

AmmoTransferrable Class Reference

Inheritance diagram for AmmoTransferrable:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 AmmoTransferrable (int ammo, ResourceWatch &src, ResourceWatch &dst, bool &allowProduction)
ASCString getName ()
int getMax (ContainerBase *c, bool avail)
 get maximum amount for that unit.
int getMin (ContainerBase *c, bool avail)
int getAmount (const ContainerBase *target)
int transfer (ContainerBase *target, int delta)
bool isExchangable () const
void commit ()

Constructor & Destructor Documentation

AmmoTransferrable::AmmoTransferrable int  ammo,
ResourceWatch src,
ResourceWatch dst,
bool &  allowProduction
[inline]
 

Definition at line 436 of file servicing.cpp.

References ResourceWatch::getContainer(), and maxint.


Member Function Documentation

void AmmoTransferrable::commit  )  [inline, virtual]
 

Implements Transferrable.

Definition at line 490 of file servicing.cpp.

References Transferrable::dest, ResourceWatch::getContainer(), and Transferrable::source.

int AmmoTransferrable::getAmount const ContainerBase target  )  [inline, virtual]
 

Implements Transferrable.

Definition at line 468 of file servicing.cpp.

Referenced by getMax().

int AmmoTransferrable::getMax ContainerBase c,
bool  avail
[inline, virtual]
 

get maximum amount for that unit.

Parameters:
c the container for which the maximum amount is calculated
avail If true, the amount is limited by the resources which can actually provided by the other unit. If false, return the storage capacity

Implements Transferrable.

Definition at line 448 of file servicing.cpp.

References getAmount(), ContainerBase::maxAmmo(), and Transferrable::opposingContainer().

int AmmoTransferrable::getMin ContainerBase c,
bool  avail
[inline, virtual]
 

Implements Transferrable.

Definition at line 458 of file servicing.cpp.

References min(), and Transferrable::opposingContainer().

ASCString AmmoTransferrable::getName  )  [inline, virtual]
 

Implements Transferrable.

Definition at line 445 of file servicing.cpp.

References cwaffentypen.

bool AmmoTransferrable::isExchangable  )  const [inline, virtual]
 

Implements Transferrable.

Definition at line 485 of file servicing.cpp.

int AmmoTransferrable::transfer ContainerBase target,
int  delta
[inline, virtual]
 

Implements Transferrable.

Definition at line 473 of file servicing.cpp.

References min(), and Transferrable::opposingContainer().


The documentation for this class was generated from the following file:
Generated on Tue Jun 24 02:16:05 2008 for Advanced Strategic Command by  doxygen 1.4.2