Design Patterns
chassis.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 OPERATIONAL_VISITOR_CHASSIS_H_
7 #define OPERATIONAL_VISITOR_CHASSIS_H_
8 
9 #include "chassis_interface.h"
11 
12 #include "../iterator/list.h"
13 
14 namespace operational
15 {
16 namespace visitor
17 {
19 {
20  public:
21  explicit Chassis(const std::string& name);
22  ~Chassis() override;
23 
24  std::string name() const override;
25 
26  double price() const override;
27  void price(const double&) override;
28 
29  double GetPrice() override;
30 
31  void Accept(EquipmentVisitorInterface&) override;
32 
34 
35  private:
36  std::string name_;
37  double price_;
39 };
40 }
41 }
42 
43 #endif
44 
Chassis(const std::string &name)
Definition: chassis.cc:12
void Accept(EquipmentVisitorInterface &) override
Definition: chassis.cc:42
Definition: application.cc:10
double GetPrice() override
Definition: chassis.cc:37
Definition: list.h:17
Definition: equipment_visitor_interface.h:18
~Chassis() override
Definition: chassis.cc:17
Definition: chassis.h:18
Definition: chassis_interface.h:13
Definition: visited_equipment_interface.h:17
std::string name() const override
Definition: chassis.cc:22
double price() const override
Definition: chassis.cc:27
void AddPart(VisitedEquipmentInterface *) const
Definition: chassis.cc:51