|
Samchon Framework for CPP
1.0.0
|
A physical instance. More...
#include <Instance.hpp>

Public Member Functions | |
| 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... | |
| virtual auto | toString () const -> string |
| Return a string represents the Instance. 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... | |
Protected Attributes | |
| 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... | |
A physical instance.
A physical instance having its own name, price, volume and weight.
Definition at line 29 of file Instance.hpp.
|
inline |
Default Constructor.
Definition at line 63 of file Instance.hpp.
|
inline |
Construct from instance.
| name | Name of the instance |
| price | Price of the instance |
| volume | Volume of the instance |
| weight | Weight of the instance |
Definition at line 76 of file Instance.hpp.
|
inline |
Get name.
Definition at line 101 of file Instance.hpp.
|
inline |
Get price.
Definition at line 109 of file Instance.hpp.
|
inline |
Get volume.
Definition at line 117 of file Instance.hpp.
|
inline |
Get weight.
Definition at line 125 of file Instance.hpp.
|
inlinevirtual |
Return a string represents the Instance.
Reimplemented in samchon::examples::packer::Wrapper, and samchon::examples::packer::Product.
Definition at line 147 of file Instance.hpp.
References samchon::library::StringUtil::substitute().
Referenced by samchon::examples::packer::Wrapper::toString().


|
protected |
Name represent the Instance.
Definition at line 39 of file Instance.hpp.
|
protected |
Price of an instance -> 1,000 won.
Definition at line 44 of file Instance.hpp.
|
protected |
Volume of an instance -> 130 cm^3.
Definition at line 49 of file Instance.hpp.
|
protected |
Weight of an instance -> 1,200 g.
Definition at line 54 of file Instance.hpp.