freg
0.3
Free-Roaming Elementary Game
|
This class represents craft recipe. More...
#include <CraftManager.h>
Public Member Functions | |
CraftList (int materials_number) | |
~CraftList () | |
CraftList & | operator= (const CraftList &)=delete |
void | Sort () |
void | LoadItems (const QJsonArray &) |
int | size () const |
void | clear () |
int | GetMaterialsNumber () const |
CraftItem * | at (int item_position) const |
void | operator<< (CraftItem *) |
bool | operator== (const CraftList &) const |
Private Attributes | |
const int | materialsNumber |
QList< CraftItem * > | items |
This class represents craft recipe.
It stores recipe like this: (QList::size()-products_number) materials (sorted) (products_number) products. Comparison (==) of CraftLists is done by materials.
Definition at line 43 of file CraftManager.h.
|
explicit |
Definition at line 36 of file CraftManager.cpp.
CraftList::~CraftList | ( | ) |
Definition at line 41 of file CraftManager.cpp.
CraftItem * CraftList::at | ( | int | item_position | ) | const |
Definition at line 73 of file CraftManager.cpp.
void CraftList::clear | ( | ) |
Definition at line 75 of file CraftManager.cpp.
int CraftList::GetMaterialsNumber | ( | ) | const |
Definition at line 71 of file CraftManager.cpp.
void CraftList::LoadItems | ( | const QJsonArray & | array | ) |
Definition at line 61 of file CraftManager.cpp.
void CraftList::operator<< | ( | CraftItem * | new_item | ) |
Definition at line 43 of file CraftManager.cpp.
bool CraftList::operator== | ( | const CraftList & | compared | ) | const |
Definition at line 47 of file CraftManager.cpp.
int CraftList::size | ( | ) | const |
Definition at line 72 of file CraftManager.cpp.
void CraftList::Sort | ( | ) |
Definition at line 70 of file CraftManager.cpp.
|
private |
Definition at line 62 of file CraftManager.h.
|
private |
Definition at line 61 of file CraftManager.h.