Gobelijn API documentation  - generated for commit a0cbea7
 All Classes Namespaces Files Functions Variables Typedefs Friends Macros Pages
Engine.h
Go to the documentation of this file.
1 #pragma once
2 
8 namespace ODemo {
12 class Engine
13 {
14 public:
16  explicit Engine(double power);
17 
19  Engine(const Engine& ori);
20 
22  Engine(Engine&& ori) noexcept;
23 
25  Engine& operator=(const Engine& rhs);
26 
28  Engine& operator=(Engine&& rhs) noexcept;
29 
31  ~Engine();
32 
34  void start();
35 
37  void stop();
38 
40  bool is_running() const;
41 
42 private:
43  double m_power;
44  bool m_running;
45 };
46 
47 } // namespace ODemo
Engine & operator=(const Engine &rhs)
Copy assignment.
Definition: Engine.cpp:18
Engine that provides motion.
Definition: Engine.h:12
bool is_running() const
Indicates whether engine is running or not.
Definition: Engine.cpp:60
void stop()
Stops the engine, even if it was already stopped.
Definition: Engine.cpp:52
Engine(double power)
Constructor initializes the power, is_running status set to false.
Definition: Engine.cpp:12
~Engine()
Destructor does not do a thing.
Definition: Engine.cpp:42
void start()
Starts the engine, even if it already was running.
Definition: Engine.cpp:44
double m_power
Definition: Engine.h:43
bool m_running
Definition: Engine.h:44