Design Patterns
bus.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_BUS_H_
7 #define OPERATIONAL_VISITOR_BUS_H_
8 
11 
12 namespace operational
13 {
14 namespace visitor
15 {
17 {
18  public:
19  explicit Bus(const std::string& name);
20 
21  std::string name() const override;
22 
23  double price() const override;
24  void price(const double&) override;
25 
26  double GetLuxPrice() override;
27  double GetRegularPrice() override;
28 
29  void Accept(EquipmentVisitorInterface&) override;
30 
31  private:
32  std::string name_;
33  double price_;
34 };
35 }
36 }
37 
38 #endif
39 
void Accept(EquipmentVisitorInterface &) override
Definition: bus.cc:39
Bus(const std::string &name)
Definition: bus.cc:12
double price() const override
Definition: bus.cc:19
double GetLuxPrice() override
Definition: bus.cc:29
Definition: application.cc:10
Definition: equipment_visitor_interface.h:18
Definition: bus_interface.h:13
double GetRegularPrice() override
Definition: bus.cc:34
std::string name() const override
Definition: bus.cc:14
Definition: visited_equipment_interface.h:17
Definition: bus.h:16