UFO: Alien Invasion
Loading...
Searching...
No Matches
Container Class Reference

#include <inv_shared.h>

Collaboration diagram for Container:
Collaboration graph

Public Member Functions

 Container ()
const invDef_tdef () const
ItemgetNextItem (const Item *prev) const
int countItems () const
 Count the number of items in the Container.

Data Fields

int id
Item_invList

Private Attributes

const invDef_t_def

Detailed Description

Definition at line 511 of file inv_shared.h.

Constructor & Destructor Documentation

◆ Container()

Container::Container ( )

Definition at line 660 of file inv_shared.cpp.

References _def, and _invList.

Member Function Documentation

◆ countItems()

int Container::countItems ( ) const

Count the number of items in the Container.

Note
For temp containers we count the number of different items

For temp containers, we neglect Item::amount.

Definition at line 681 of file inv_shared.cpp.

References getNextItem().

Referenced by Inventory::countItems(), G_SendInventory(), and TEST_F().

◆ def()

◆ getNextItem()

Field Documentation

◆ _def

const invDef_t* Container::_def
private

Definition at line 513 of file inv_shared.h.

Referenced by Container().

◆ _invList

◆ id


The documentation for this class was generated from the following files: