-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathToy.hxx
More file actions
56 lines (43 loc) · 1.23 KB
/
Toy.hxx
File metadata and controls
56 lines (43 loc) · 1.23 KB
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
//-----------------------------------------------------------------------------
// File: Toy.hxx
// Author: Enhope
// Date: 31-05-2019
//-----------------------------------------------------------------------------
#ifndef TOY_HXX_
#define TOY_HXX_
#include <string>
#include <memory>
//-----------------------------------------------------------------------------
// \brief Toy class.
class Toy
{
public:
//! \brief Constructor.
Toy(std::string name, unsigned int price);
//! \brief Virtual destructor for subclasses.
virtual ~Toy();
// Smart Pointer.
typedef std::unique_ptr<Toy> ToyPtr;
//! \brief Prepare the parts.
void prepareParts();
//! \brief Combine the parts.
void combineParts();
//! \brief Assemble the parts.
void assembleParts();
//! \brief Apply the label to the toy.
void applyLabel();
//! \brief Show the product.
virtual void showProduct();
//! \brief Getter of the name.
//! \return m_name.
std::string getName();
//! \brief Getter of the price.
//! \return m_price.
unsigned int getPrice();
private:
//!< The name of the toy.
std::string m_name;
//!< The price of the toy.
unsigned int m_price;
};
#endif /* TOY_HXX_ */