xoreos  0.0.5
Public Member Functions | Private Types | Private Attributes | List of all members
Engines::KotOR::Inventory Class Reference

#include <inventory.h>

Collaboration diagram for Engines::KotOR::Inventory:
Collaboration graph
[legend]

Public Member Functions

void addItem (const Common::UString &tag, int count=1)
 
void removeItem (const Common::UString &tag, int count=1)
 
void removeAllItems ()
 
const std::map< Common::UString, InventoryItem > & getItems () const
 
bool hasItem (const Common::UString &tag) const
 

Private Types

typedef std::map< Common::UString, InventoryItemItemMap
 

Private Attributes

ItemMap _items
 

Detailed Description

Definition at line 41 of file inventory.h.

Member Typedef Documentation

◆ ItemMap

Definition at line 50 of file inventory.h.

Member Function Documentation

◆ addItem()

void Engines::KotOR::Inventory::addItem ( const Common::UString tag,
int  count = 1 
)

◆ getItems()

const std::map< Common::UString, InventoryItem > & Engines::KotOR::Inventory::getItems ( ) const

Definition at line 67 of file inventory.cpp.

References _items.

Referenced by Engines::KotOR::MenuEquipment::fillEquipableItemsList(), Engines::KotOR::ContainerMenu::fillFromInventory(), and Engines::KotOR::HUD::showContainer().

Here is the caller graph for this function:

◆ hasItem()

bool Engines::KotOR::Inventory::hasItem ( const Common::UString tag) const

Definition at line 71 of file inventory.cpp.

References _items.

◆ removeAllItems()

void Engines::KotOR::Inventory::removeAllItems ( )

Definition at line 63 of file inventory.cpp.

References _items.

Referenced by Engines::KotOR::HUD::showContainer().

Here is the caller graph for this function:

◆ removeItem()

void Engines::KotOR::Inventory::removeItem ( const Common::UString tag,
int  count = 1 
)

Definition at line 47 of file inventory.cpp.

References _items, and Common::UString::empty().

Referenced by Engines::KotOR::Module::addItemToActiveObject(), and Engines::KotOR::Creature::equipItem().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ _items

ItemMap Engines::KotOR::Inventory::_items
private

Definition at line 52 of file inventory.h.

Referenced by addItem(), getItems(), hasItem(), removeAllItems(), and removeItem().


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