![]() |
Smart Minotaur
|
The Thread class is an object oriented representation of a posix thread. Mehr ...
#include <Thread.hpp>
Öffentliche Methoden | |
| void | start () |
| void | stop () |
| void | join () |
| virtual void | run ()=0 |
| The content of this method is executed in the thread. | |
Geschützte Methoden | |
| virtual void | onStart ()=0 |
| This method is called before the thread is started (call of start()). | |
| virtual void | onStop ()=0 |
| This method is called when stop() is called. | |
The Thread class is an object oriented representation of a posix thread.
It only offers minimal functionality like starting, stopping and joining the thread. To create a thread another class must inherit from Thread and implement the pure virtual functions onStart(), onStop() and run().
|
protectedpure virtual |
This method is called before the thread is started (call of start()).
Any adjustments of members should be done here.
Implementiert in minotaur::MazeSolver, minotaur::KeyboardThread, minotaur::RobotThread, minotaur::SensorThread, minotaur::NavigationThread und minotaur::SensorThread.
|
protectedpure virtual |
This method is called when stop() is called.
The correct stopping of the thread should be done here (e.g. set a bool to false).
Implementiert in minotaur::MazeSolver, minotaur::KeyboardThread, minotaur::RobotThread, minotaur::SensorThread, minotaur::NavigationThread und minotaur::SensorThread.
|
pure virtual |
The content of this method is executed in the thread.
All work done by the thread should be implemented here.
Implementiert in minotaur::MazeSolver, minotaur::KeyboardThread, minotaur::RobotThread, minotaur::SensorThread, minotaur::NavigationThread und minotaur::SensorThread.