Gobelijn API documentation  - generated for commit a0cbea7
 All Classes Namespaces Files Functions Variables Typedefs Friends Macros Pages
Bicycle.h
Go to the documentation of this file.
1 #pragma once
2 
9 #include <string>
10 
11 namespace ODemo {
12 
17 {
18 public:
20  Bicycle();
21 
23  Bicycle(std::string model, std::string color);
24 
26  Bicycle(const Bicycle& ori);
27 
29  Bicycle(Bicycle&& ori) noexcept;
30 
32  Bicycle& operator=(const Bicycle& rhs);
33 
35  Bicycle& operator=(Bicycle&& rhs) noexcept;
36 
38  ~Bicycle() override;
39 
41  std::string getModel() const;
42 
44  std::string getColor() const;
45 
47  void setModel(std::string model);
48 
50  void setColor(std::string color);
51 
53  void info() const override;
54 
55 private:
56  std::string m_model;
57  std::string m_color;
58 };
59 
60 } // namespace ODemo
std::string getModel() const
Return the model of the bike.
Definition: Bicycle.cpp:64
std::string m_model
Definition: Bicycle.h:56
void setColor(std::string color)
Set the color of the bike.
Definition: Bicycle.cpp:82
std::string getColor() const
Return the color of the bike.
Definition: Bicycle.cpp:70
~Bicycle() override
Destructor.
Definition: Bicycle.cpp:62
void info() const override
Display info on model and color of the bike.
Definition: Bicycle.cpp:88
A PassengerRoadVehicle transports one or more passengers.
std::string m_color
Definition: Bicycle.h:57
Bicycle & operator=(const Bicycle &rhs)
Copy assignment.
Definition: Bicycle.cpp:36
Represents a simple Bicycle.
Definition: Bicycle.h:16
Header for PassengerRoadVehicle class.
Bicycle()
Default constructor.
Definition: Bicycle.cpp:14
void setModel(std::string model)
Set the model of the bike.
Definition: Bicycle.cpp:76