COPASI API  4.40.278
CCopasiTaskStatus Class Reference

#include <CCopasiTaskStatus.h>

Public Types

enum  State {
  NoState = 0 , OutputDataStructuresInitialized , Initialized , ProblemCheckfailed ,
  InitializeFailed , Started , Stopped , FinishedSuccesfully ,
  Failed , FailedByParent
}
 

Public Member Functions

 CCopasiTaskStatus ()
 
const StategetState () const
 
void print (std::ostream *ostream) const
 
void set (State state)
 
void setInitialized (bool success)
 

Static Public Attributes

static const std::string StateString []
 

Protected Attributes

State mState
 

Detailed Description

This class contains status information of a CCopasiTask. It includes information whether the task is initialized, finished, etc. and also the result status (success or error, also task specific information)

Member Enumeration Documentation

◆ State

An enum that contains all (exclusive) states a task can be in.

Enumerator
NoState 
OutputDataStructuresInitialized 

no state assigned

Initialized 

the output annotations were initialized (by updateMatrices())

ProblemCheckfailed 

initialize() completed successfully

InitializeFailed 

the isValidProblem() check failed

Started 

initialize() failed for other reasons

Stopped 

set at the beginning of process()

FinishedSuccesfully 

user has stopped the task (from the GUI)

Failed 

task completed successfully

FailedByParent 

task failed

task is completed, but considered failed by parent, e.g. because of constraint violations

Constructor & Destructor Documentation

◆ CCopasiTaskStatus()

CCopasiTaskStatus::CCopasiTaskStatus ( )

Member Function Documentation

◆ getState()

const CCopasiTaskStatus::State & CCopasiTaskStatus::getState ( ) const

References mState.

◆ print()

void CCopasiTaskStatus::print ( std::ostream *  ostream) const

◆ set()

void CCopasiTaskStatus::set ( State  state)

References mState.

◆ setInitialized()

void CCopasiTaskStatus::setInitialized ( bool  success)

convenience method: sets status to Initialized or InitializeFailed, according to the success flag.

References Initialized, InitializeFailed, and mState.

Member Data Documentation

◆ mState

State CCopasiTaskStatus::mState
protected

Referenced by getState(), set(), and setInitialized().

◆ StateString

const std::string CCopasiTaskStatus::StateString
static
Initial value:
=
{
"Unknown state",
"Output data structures initialized",
"Initialized",
"Problem not valid for selected method",
"Initialization failed",
"Started",
"Stopped",
"Success",
"Failed",
"Result discarded",
""
}

String literals for the GUI to display states


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