examples/progress/main.cpp
Go to the documentation of this file.
1 // Examples
2 #include "ProgressExamples.h"
3 
4 // TerraLib
8 
9 // STL
10 #include <cstdlib>
11 #include <iostream>
12 #include <time.h>
13 
14 
15 int main(int argc, char *argv[])
16 {
17  try
18  {
19  //init components
21 
23 
24  //console sleeper
25  std::cout << std::endl << "Console progress Test using multi tasks... " << std::endl;
27 
28  //console sleeper multi thread
29  std::cout << std::endl << "Console progress Test using multi thread... " << std::endl;
31 
32  //qt sleeper
33  QtSleeper(argc, argv);
34 
35  delete cpv;
36 
38  }
39  catch(const std::exception& e)
40  {
41  std::cout << std::endl << "An exception has occurred in the Progress examples: " << e.what() << std::endl;
42 
43  return EXIT_FAILURE;
44  }
45  catch(...)
46  {
47  std::cout << std::endl << "An unexpected exception has occurred in the Progress examples!" << std::endl;
48 
49  return EXIT_FAILURE;
50  }
51 
52  return EXIT_SUCCESS;
53 }
void ConsoleSleeperMultiThread()
An utility class to control the startup and cleanup of the TerraLib Platform and its resources...
A singleton class used to manage tasks progresses and their viewers.
A progress viewer implementation for the console.
These routines show how to use the progress bar.
void ConsoleSleeper()
void finalize()
It finalizes the TerraLib Platform.
static TerraLib & getInstance()
It returns a reference to the singleton instance.
int main(int argc, char *argv[])
void initialize()
It initializes the TerraLib Platform.
void QtSleeper(int argc, char *argv[])
Definition: QtSleeper.cpp:9