#include <shipdesign.h>
Collaboration diagram for TItemPack:
Public Methods | |
TItemPack () | |
TItemPack (const TItemPack &OldItemPack) | |
~TItemPack () | |
void | setItem (TItem *Item) |
TItem * | getItem () const |
void | setItemAmount (int2 ItemAmount) |
int2 | getItemAmount () const |
bool | operator== (const TItemPack &ItemPack) const |
TItemPack & | operator= (const TItemPack &ItemPack) |
bool | load (TDataPackageList *in, const string &sIdentifier, bool bUnique=true) |
bool | save (TDataPackageList *out, const string &sIdentifier, bool bUnique=true) const |
Protected Attributes | |
TLink< TItem > | fItemLink |
int2 | fItemAmount |
|
This constructor creates a new TItemPack object with the link and the amount reseted. That means the link and the amount have to be set afterwards. |
|
This constructor creates also a new TItemPack objet, but the values are copied from the TItemPack object given as parameter. This is the copy constructor.
|
|
Destructs the object. Has nothing else to do, because no memory has to be freed or similar stuff. |
|
With the method getItem you can get the link to the item type this item pack contains an item of.
|
|
With the method getItemAmount you can get the amount of items in this item pack.
|
|
With the method Load you can load a TItemPack object from the data packages in the list. For more information look in the documentation of TLinkable.
|
|
This is the assignment operator for TItemPack. |
|
With the method operator== you can compare two TItemPack objects. This is of course the expected behaviour of "operator==".
|
|
With the method Save you can save a TItemPack object from the data packages in the list. For more information look in the documentation of TLinkable.
|
|
With the method setItem you can set the link to the item type this item pack should contain an item of.
|
|
With the method setItemAmount you can set the amount of items represented through this item pack.
|
|
the amount of items this item pack contains |
|
the link to the item this item pack contains items of |