openModeller  Version 1.4.0
om_cmd_utils.hh
Go to the documentation of this file.
00001 
00027 #ifndef OM_CMD_UTILS_HH
00028 #define OM_CMD_UTILS_HH
00029 
00030 #include <openmodeller/Log.hh>
00031 
00032 #include <string>
00033 
00034 using namespace std;
00035 
00036 // Minimum delay interval in seconds between two progress callbacks 
00037 // before any progress-related action
00038 #define MIN_PROGRESS_INTERVAL 2.0
00039 
00040 struct progress_data {
00041 
00042   std::string file_name;
00043   time_t timestamp;
00044   float progress;
00045 
00046 };
00047 
00048 // Return the corresponding Log::Level from a human friendly string representation 
00049 // (debug, warn, info, error)
00050 Log::Level getLogLevel( std::string level );
00051 
00052 // Custom callback to display job progress on the screen
00053 void progressDisplayCallback( float progress, void *extraParam );
00054 
00055 // Custom callback to track job progress by writing it into a file
00056 void progressFileCallback( float progress, void *progressFile );
00057 
00058 #endif