Samchon Framework for CPP
1.0.0
Main Page
Related Pages
Namespaces
Classes
Files
File List
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
--------------------------------------------------------- */
39
Product
()
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
};
samchon::protocol::Entity< std::string >
samchon::examples::packer::Product::Product
Product(const string &name, int price, int volume, int weight)
Construct from arguments.
Definition:
Product.hpp:52
samchon::examples::packer::Product::Product
Product()
Defualt Constructor.
Definition:
Product.hpp:39
std
samchon::examples::packer::Product
A product, merchandise.
Definition:
Product.hpp:26
samchon::examples::packer::Instance
A physical instance.
Definition:
Instance.hpp:29
samchon::examples::packer::Product::toString
virtual auto toString() const -> string override
Return a string represents the Instance.
Definition:
Product.hpp:70
samchon
Definition:
ByteArray.hpp:6
cpp
samchon
examples
packer
Product.hpp
Generated by
1.8.11