Design Patterns
equipment_interface.h
Go to the documentation of this file.
1 // Based on "Design Patterns: Elements of Reusable Object-Oriented Software"
2 // book by Erich Gamma, John Vlissides, Ralph Johnson, and Richard Helm
3 //
4 // Created by Bartosz Rachwal. The National Institute of Advanced Industrial Science and Technology, Japan.
5 
6 #ifndef STRUCTURAL_COMPOSITE_EQUIPMENT_INTERFACE_H_
7 #define STRUCTURAL_COMPOSITE_EQUIPMENT_INTERFACE_H_
8 
9 #include "watt.h"
10 #include "currency.h"
11 
12 #include <string>
13 
14 namespace structural
15 {
16 namespace composite
17 {
19 {
20  public:
21  virtual ~EquipmentInterface() { }
22 
23  virtual std::string name() const = 0;
24 
25  virtual Currency price() const = 0;
26  virtual void price(const Currency&) = 0;
27 
28  virtual Watt power() const = 0;
29  virtual void power(const Watt&) = 0;
30 
31  virtual Currency NetPrice() = 0;
32  virtual Currency DiscountPrice() = 0;
33 };
34 }
35 }
36 
37 #endif
38 
Definition: shape_interface.h:11
Definition: currency.h:13
virtual std::string name() const =0
virtual ~EquipmentInterface()
Definition: equipment_interface.h:21
virtual Currency price() const =0
Definition: equipment_interface.h:18
Definition: watt.h:13