OpenM++ runtime library (libopenm)
openm::RunState Struct Reference

model run state data: status, progress, update times More...

#include <omModelRunState.h>

Inheritance diagram for openm::RunState:

Public Member Functions

 RunState (void)
 initialize model run state data with default values
 
bool operator== (const RunState &i_other) const
 check if two run states are equal: state, progress and update times are equal
 
ModelStatus setStatus (ModelStatus i_status)
 set model status if not already set as one of final status values
 
void setProgress (int i_count, double i_value)
 set modeling progress count and value
 

Static Public Member Functions

static bool isFinal (ModelStatus i_status)
 return true if status is one of exiting: ie done, exit, error
 
static bool isError (ModelStatus i_status)
 return true if status is an error
 
static bool isShutdownOrFinal (ModelStatus i_status)
 return true if model in shutdown state: modeling completed or one of exiting
 
static ModelStatus fromRunStatus (const std::string &i_runStatus)
 convert run status to model status code
 
static std::string toRunStatus (ModelStatus i_modelStatus)
 convert model status to run status code
 

Public Attributes

ModelStatus theStatus
 current status
 
int progressCount
 progress count, usually percent completed
 
double progressValue
 progress value: number of cases or time completed
 
std::chrono::system_clock::time_point startTime
 process start time
 
std::chrono::system_clock::time_point updateTime
 last update time
 

Detailed Description

model run state data: status, progress, update times


The documentation for this struct was generated from the following files: