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