ManaPlus
complexitem.h
Go to the documentation of this file.
1 /*
2  * The ManaPlus Client
3  * Copyright (C) 2011-2019 The ManaPlus Developers
4  *
5  * This file is part of The ManaPlus Client.
6  *
7  * This program is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 2 of the License, or
10  * any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program. If not, see <http://www.gnu.org/licenses/>.
19  */
20 
21 #ifndef RESOURCES_ITEM_COMPLEXITEM_H
22 #define RESOURCES_ITEM_COMPLEXITEM_H
23 
24 #include "resources/item/item.h"
25 
26 #include "localconsts.h"
27 
31 class ComplexItem final : public Item
32 {
33  public:
37  ComplexItem(const int id,
38  const ItemTypeT type,
39  const int quantity,
40  const uint8_t refine,
41  const ItemColor color,
42  const Identified identified,
43  const Damaged damaged,
44  const Favorite favorite,
45  const Equipm equipment,
46  const Equipped equipped);
47 
49 
50 
53  virtual ~ComplexItem();
54 
55  void addChild(const Item *const item,
56  const int amount);
57 
58  const STD_VECTOR<Item*> &getChilds() const noexcept2 A_WARN_UNUSED
59  { return mChildItems; }
60 
61  protected:
62  STD_VECTOR<Item*> mChildItems;
63 };
64 
65 #endif // RESOURCES_ITEM_COMPLEXITEM_H
Item
Definition: item.h:48
ComplexItem::mChildItems
std::vector< Item * > mChildItems
Definition: complexitem.h:62
A_DELETE_COPY
#define A_DELETE_COPY(func)
Definition: localconsts.h:52
ComplexItem::addChild
void addChild(const Item *const item, const int amount)
Definition: complexitem.cpp:58
ItemTypeT
ItemType ::T ItemTypeT
Definition: itemtype.h:42
ComplexItem::ComplexItem
ComplexItem(const int id, const ItemTypeT type, const int quantity, const uint8_t refine, const ItemColor color, const Identified identified, const Damaged damaged, const Favorite favorite, const Equipm equipment, const Equipped equipped)
Definition: complexitem.cpp:28
localconsts.h
bool
noexcept2
#define noexcept2
Definition: localconsts.h:49
final
#define final
Definition: localconsts.h:45
ComplexItem::~ComplexItem
virtual ~ComplexItem()
Definition: complexitem.cpp:52
ComplexItem
Definition: complexitem.h:31
ItemColor
uint16_t ItemColor
Definition: itemcolor.h:29
A_WARN_UNUSED
#define A_WARN_UNUSED
Definition: localconsts.h:160
item.h
ComplexItem::getChilds
const std::vector< Item * > & getChilds() const
Definition: complexitem.h:58