openModeller  Version 1.5.0
om_cmd_utils.hh
Go to the documentation of this file.
1 
27 #ifndef OM_CMD_UTILS_HH
28 #define OM_CMD_UTILS_HH
29 
30 #include <openmodeller/Log.hh>
31 
32 #include <string>
33 
34 using namespace std;
35 
36 // Minimum delay interval in seconds between two progress callbacks
37 // before any progress-related action
38 #define MIN_PROGRESS_INTERVAL 2.0
39 
40 struct progress_data {
41 
42  std::string file_name;
43  time_t timestamp;
44  float progress;
45 
46 };
47 
48 // Return the corresponding Log::Level from a human friendly string representation
49 // (debug, warn, info, error)
50 Log::Level getLogLevel( std::string level );
51 
52 // Custom callback to display job progress on the screen
53 void progressDisplayCallback( float progress, void *extraParam );
54 
55 // Custom callback to track job progress by writing it into a file
56 void progressFileCallback( float progress, void *progressFile );
57 
58 #endif
void progressFileCallback(float progress, void *progressFile)
std::string file_name
Definition: om_cmd_utils.hh:42
Level
Definition: Log.hh:54
Log::Level getLogLevel(std::string level)
void progressDisplayCallback(float progress, void *extraParam)
time_t timestamp
Definition: om_cmd_utils.hh:43