Samchon Framework for CPP  1.0.0
Product.hpp
1 #pragma once
2 #include <samchon/examples/packer/Instance.hpp>
3 
4 namespace samchon
5 {
6 namespace examples
7 {
8 namespace packer
9 {
10  using namespace std;
11 
12  using namespace library;
13  using namespace protocol;
14 
26  class Product
27  : public Instance
28  {
29  private:
30  typedef Instance super;
31 
32  public:
33  /* ---------------------------------------------------------
34  CONSTRUCTOR
35  --------------------------------------------------------- */
40  : super()
41  {
42  };
43 
52  Product(const string &name, int price, int volume, int weight)
53  : super(name, price, volume, weight)
54  {
55  };
56 
57  virtual ~Product() = default;
58 
59  /* ---------------------------------------------------------
60  EXPORT
61  --------------------------------------------------------- */
62  virtual auto TAG() const -> string override
63  {
64  return "product";
65  };
66 
70  virtual auto toString() const -> string override
71  {
72  return "Product " + super::toString();
73  };
74  };
75 };
76 };
77 };
Product(const string &name, int price, int volume, int weight)
Construct from arguments.
Definition: Product.hpp:52
Product()
Defualt Constructor.
Definition: Product.hpp:39
A product, merchandise.
Definition: Product.hpp:26
virtual auto toString() const -> string override
Return a string represents the Instance.
Definition: Product.hpp:70