Samchon Framework for CPP  1.0.0
samchon::examples::packer::Product Class Reference

A product, merchandise. More...

#include <Product.hpp>

Collaboration diagram for samchon::examples::packer::Product:

Public Member Functions

 Product ()
 Defualt Constructor. More...
 Product (const string &name, int price, int volume, int weight)
 Construct from arguments. More...
virtual auto toString () const -> string override
 Return a string represents the Instance. More...
- Public Member Functions inherited from samchon::examples::packer::Instance
 Instance ()
 Default Constructor. More...
 Instance (const string &name, int price, int volume, int weight)
 Construct from instance. More...
auto get_name () const -> string
 Get name. More...
auto getPrice () const -> int
 Get price. More...
auto getVolume () const -> int
 Get volume. More...
auto getWeight () const -> int
 Get weight. More...
- Public Member Functions inherited from samchon::protocol::Entity< std::string >
virtual auto key () const -> std::string
 Get a key that can identify the Entity uniquely. More...

Additional Inherited Members

- Protected Attributes inherited from samchon::examples::packer::Instance
string name
 Name represent the Instance. More...
int price
 Price of an instance -> 1,000 won. More...
int volume
 Volume of an instance -> 130 cm^3. More...
int weight
 Weight of an instance -> 1,200 g. More...

Detailed Description

A product, merchandise.

A merchandise with its price, volume and weight.

Jeongho Nam

Definition at line 26 of file Product.hpp.

Constructor & Destructor Documentation

samchon::examples::packer::Product::Product ( )

Defualt Constructor.

Definition at line 39 of file Product.hpp.

samchon::examples::packer::Product::Product ( const string &  name,
int  price,
int  volume,
int  weight 

Construct from arguments.

nameName of a product can be an identifier
pricePrice of the product
volumeVolume of the product
weightWeight of the product

Definition at line 52 of file Product.hpp.

Member Function Documentation

virtual auto samchon::examples::packer::Product::toString ( ) const -> string

Return a string represents the Instance.

Reimplemented from samchon::examples::packer::Instance.

Definition at line 70 of file Product.hpp.

The documentation for this class was generated from the following file: