-
Notifications
You must be signed in to change notification settings - Fork 0
/
combine.h
104 lines (82 loc) · 2.41 KB
/
combine.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
/**
* @file Combine.h
*
* Provides combine functionality in the game.
* An object consists of its id, the id of the first
* item that can be combined, and the id of the second object
* that can be combined.
*
* @brief Defines the Combine class.
*
* @author Michael Abrams
* @author James Boocock
* @author Toby Herbert
* @author Tatai Nikora
* @version 0.3
*/
#ifndef COMBINE_H_
#define COMBINE_H_
//------------------------------------------------------------------------------
/* Include */
//------------------------------------------------------------------------------
#include <iostream>
#include <string>
#include "StateDescriptor.h"
class Item;
class combine{
private:
StateDescriptor * description; ///< The description when you
///< combine the things.
std::string first_id; ///< First item_id.
std::string second_id; ///< Second item_id.
Item * combination; ///< The item that is the combination.
std::string id; ///< Combine id.
public:
/**
Constructor for a combine object.
@param[in] id The id for the object.
@param[in] first_id The id of the first item to combine.
@param[in] second_id The id of the second object to combine.
*/
combine(std::string id, std::string first_id, std::string second_id);
/**
Destructor for combine object.
*/
~combine();
/**
Get the item that is a combination.
@return A pointer to the combined item.
*/
Item* get_combination();
/**
Get the id of the combined item.
@return The id of the combined item.
*/
std::string get_id();
/**
Get the id of the first item that made this combined item.
@return The id of the first item.
*/
std::string get_first_id();
/**
Get the id of the second item that made this combined item.
@return The id of the second item.
*/
std::string get_second_id();
/**
Sets the combination class member to a new item.
@param[in] item A pointer to an item that is a combination of two items from inventory.
*/
void set_combination(Item * item);
/**
Sets the description of the combined item.
@param[in] d The description for the item.
*/
void set_description(StateDescriptor * d);
/**
Gets the description of the combined item.
@return The description of the combined item.
*/
std::string get_description();
};
#endif