Gobelijn API documentation  - generated for commit a0cbea7
 All Classes Namespaces Files Functions Variables Typedefs Friends Macros Pages
Unicycle.h
Go to the documentation of this file.
1 #pragma once
2 
7 #include "objtracer/Wheel.h"
8 
9 namespace ODemo {
10 
14 class Unicycle
15 {
16 public:
18  Unicycle();
19 
21  Unicycle(const Unicycle& ori);
22 
24  Unicycle(Unicycle&& ori) noexcept;
25 
27  Unicycle& operator=(const Unicycle& rhs);
28 
30  Unicycle& operator=(Unicycle&& rhs) noexcept;
31 
33  ~Unicycle();
34 
36  void accelerate(double speed);
37 
39  void brake(double speed);
40 
41  // Turn with given number of degrees.
42  void turn(double degrees);
43 
44 private:
46  double m_speed;
47  double m_direction;
48 };
49 
50 } // namespace ODemo
A really simple class for Wheel.
Definition: Wheel.h:13
double m_direction
Definition: Unicycle.h:47
double m_speed
Definition: Unicycle.h:46
void accelerate(double speed)
Accelerate up to given speed.
Definition: Unicycle.cpp:56
Unicycle & operator=(const Unicycle &rhs)
Copy assignment.
Definition: Unicycle.cpp:30
void brake(double speed)
Brake until given speed.
Definition: Unicycle.cpp:62
void turn(double degrees)
Definition: Unicycle.cpp:68
Unicycle()
Default constructor does not initialize association with engine and owner.
Definition: Unicycle.cpp:14
Unicycle interface.
Definition: Unicycle.h:14
~Unicycle()
Destructor.
Definition: Unicycle.cpp:54
Wheel m_wheel
Definition: Unicycle.h:45
Header for the Wheel class used to demo object aggregation features.