Cuberite
A lightweight, fast and extensible game server for Minecraft
Public Member Functions | List of all members
cItems Class Reference

This class bridges a vector of cItem for safe access via Lua. More...

#include <Item.h>

Inheritance diagram for cItems:
Inheritance graph
[legend]
Collaboration diagram for cItems:
Collaboration graph
[legend]

Public Member Functions

void Add (const cItem &a_Item)
 
void Add (short a_ItemType, char a_ItemCount, short a_ItemDamage)
 
void AddItemGrid (const cItemGrid &a_ItemGrid)
 Adds a copy of all items in a_ItemGrid. More...
 
 cItems (const cItems &)=default
 
 cItems (cItems &&)=default
 
 cItems (cItem &&a_InitialItem)
 Constructs a new instance containing the specified item. More...
 
 cItems (void)
 Need a Lua-accessible constructor. More...
 
void Clear (void)
 
bool Contains (const cItem &a_Item)
 
bool ContainsType (const cItem &a_Item)
 
void Delete (int a_Idx)
 
cItemGet (int a_Idx)
 
cItemsoperator= (const cItems &)=default
 
cItemsoperator= (cItems &&)=default
 
void Set (int a_Idx, const cItem &a_Item)
 
void Set (int a_Idx, short a_ItemType, char a_ItemCount, short a_ItemDamage)
 
size_t Size (void) const
 

Detailed Description

This class bridges a vector of cItem for safe access via Lua.

It checks boundaries for all accesses Note that this class is zero-indexed!

Definition at line 234 of file Item.h.

Constructor & Destructor Documentation

cItems::cItems ( const cItems )
default
cItems::cItems ( cItems &&  )
default
cItems::cItems ( cItem &&  a_InitialItem)

Constructs a new instance containing the specified item.

Definition at line 630 of file Item.cpp.

cItems::cItems ( void  )
inline

Need a Lua-accessible constructor.

Definition at line 250 of file Item.h.

Member Function Documentation

void cItems::Add ( const cItem a_Item)
inline

Definition at line 254 of file Item.h.

void cItems::Add ( short  a_ItemType,
char  a_ItemCount,
short  a_ItemDamage 
)
inline

Definition at line 262 of file Item.h.

void cItems::AddItemGrid ( const cItemGrid a_ItemGrid)

Adds a copy of all items in a_ItemGrid.

Definition at line 727 of file Item.cpp.

void cItems::Clear ( void  )
inline

Definition at line 256 of file Item.h.

bool cItems::Contains ( const cItem a_Item)

Definition at line 695 of file Item.cpp.

bool cItems::ContainsType ( const cItem a_Item)

Definition at line 711 of file Item.cpp.

void cItems::Delete ( int  a_Idx)

Definition at line 667 of file Item.cpp.

cItem * cItems::Get ( int  a_Idx)

Definition at line 639 of file Item.cpp.

cItems& cItems::operator= ( const cItems )
default
cItems& cItems::operator= ( cItems &&  )
default
void cItems::Set ( int  a_Idx,
const cItem a_Item 
)

Definition at line 653 of file Item.cpp.

void cItems::Set ( int  a_Idx,
short  a_ItemType,
char  a_ItemCount,
short  a_ItemDamage 
)

Definition at line 681 of file Item.cpp.

size_t cItems::Size ( void  ) const
inline

Definition at line 257 of file Item.h.


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