26 #include <boost/thread/thread.hpp>
27 #include <boost/bind.hpp>
33 namespace application {
45 LOG(LINFO) <<
"OpenGL thread terminated. Waiting for the threads to join...";
48 processing_thread.join();
49 LOG(LINFO) <<
"Threads joined";
56 APP_STATE->setLearningModeOn();
59 LOG(LINFO) <<
"Performing the initial step...";
63 LOG(LINFO) <<
"Starting the main loop...";
64 while (!APP_STATE->Quit()) {
67 if (!APP_STATE->isPaused()) {
69 if (APP_STATE->isSingleStepModeOn())
70 APP_STATE->pressPause();
73 APP_DATA_SYNCHRONIZATION_SCOPED_LOCK();
77 if (!performSingleStep()) {
78 LOG(LINFO) <<
"Terminating application...";
82 else if (((
long) number_of_iterations > 0) && ((
long)iteration >= (
long) number_of_iterations)) {
83 LOG(LINFO) <<
"Reached last Iteration. Terminating application...";
93 LOG(LINFO) <<
"Performing the final step...";
96 LOG(LINFO) <<
"Final step complete";
virtual void performFinalStep(void)
The initial step - empty, to be overridden.
virtual void processingThread(void)
Function realizing the processing thread. Implements basic quit/pause/single step functionality...
#define VGL_MANAGER
Macro returning OpenGL window manager instance.
OpenGLApplication(std::string node_name_)
virtual void performInitialStep(void)
The initial step - empty, to be overridden.