OpenEnroth 4aaa0a0
|
#include <Inventory.h>
Public Member Functions | |
InventoryConstEntry ()=default | |
operator bool () const | |
const Item * | operator-> () const |
const Item & | operator* () const |
const Item * | get () const |
InventoryZone | zone () const |
Recti | geometry () const |
ItemSlot | slot () const |
int | index () const |
bool | operator! () const |
InventoryConstEntry & | operator= (std::nullptr_t) |
Protected Member Functions | |
InventoryConstEntry (const Inventory *inventory, int index) | |
Private Attributes | |
const Inventory * | _inventory = nullptr |
int | _index = -1 |
Friends | |
class | Inventory |
Lightweight, pointer‑like descriptor giving const
access to an item owned by an Inventory
.
InventoryConstEntry
can be in an invalid state, index()
will return -1
in this case, all other methods will assert. Check for validity with operator bool
.
|
default |
|
inlineprotected |
|
inline |
|
inline |
|
inline |
|
inlineexplicit |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
friend |
|
private |
|
private |