COPASI API  4.40.278
CProcessReport Class Reference

#include <CProcessReport.h>

Public Member Functions

size_t addItem (const std::string &name, const C_FLOAT64 &value, const C_FLOAT64 *pEndValue=NULL)
 
size_t addItem (const std::string &name, const C_INT32 &value, const C_INT32 *pEndValue=NULL)
 
virtual size_t addItem (const std::string &name, const CCopasiParameter::Type &type, const void *pValue, const void *pEndValue=NULL)
 
size_t addItem (const std::string &name, const std::string &value, const std::string *pEndValue=NULL)
 
size_t addItem (const std::string &name, const unsigned C_INT32 &value, const unsigned C_INT32 *pEndValue=NULL)
 
 CProcessReport (const unsigned int &maxTime=0)
 
virtual bool finish ()
 
virtual bool finishItem (const size_t &handle)
 
const bool & getIgnoreStop () const
 
virtual bool isValidHandle (const size_t handle) const
 
virtual bool proceed ()
 
virtual bool progress ()
 
virtual bool progressItem (const size_t &handle)
 
virtual bool reset ()
 
virtual bool resetItem (const size_t &handle)
 
void setIgnoreStop (const bool &ignoreStop=true)
 
virtual bool setName (const std::string &name)
 
virtual ~CProcessReport ()
 

Protected Types

enum class  ProccessingInstruction { Continue , Pause , Stop , Kill }
 

Protected Attributes

bool mIgnoreStop
 
std::string mName
 
CCopasiTimeVariablempEndTime
 
ProccessingInstruction mProccessingInstruction
 
CVector< CProcessReportItem * > mProcessReportItemList
 

Member Enumeration Documentation

◆ ProccessingInstruction

Enumerator
Continue 
Pause 
Stop 
Kill 

Constructor & Destructor Documentation

◆ CProcessReport()

CProcessReport::CProcessReport ( const unsigned int &  maxTime = 0)

Default Constructor

Parameters
constunsigned int & maxTime (Default: 0)

References CCopasiTimeVariable::getCurrentWallTime(), LLONG_CONST, mpEndTime, and mProcessReportItemList.

◆ ~CProcessReport()

CProcessReport::~CProcessReport ( )
virtual

Member Function Documentation

◆ addItem() [1/5]

size_t CProcessReport::addItem ( const std::string &  name,
const C_FLOAT64 value,
const C_FLOAT64 pEndValue = NULL 
)

Add a process report item to to the list of reporting items. The return value is the handle of the item and can be used to indicate process, finish, or reset the item. If the method fails C_INVALID_INDEX is returned.

Parameters
conststd::string & name
constC_FLOAT64 & value
constC_FLOAT64 * pEndValue = NULL
Returns
size_t handle

References addItem(), and CCopasiParameter::DOUBLE.

◆ addItem() [2/5]

size_t CProcessReport::addItem ( const std::string &  name,
const C_INT32 value,
const C_INT32 pEndValue = NULL 
)

Add a process report item to to the list of reporting items. The return value is the handle of the item and can be used to indicate process, finish, or reset the item. If the method fails C_INVALID_INDEX is returned.

Parameters
conststd::string & name
constC_INT32 & value
constC_INT32 * pEndValue = NULL
Returns
size_t handle

References addItem(), and CCopasiParameter::INT.

◆ addItem() [3/5]

size_t CProcessReport::addItem ( const std::string &  name,
const CCopasiParameter::Type type,
const void *  pValue,
const void *  pEndValue = NULL 
)
virtual

Add a process report item to to the list of reporting items. The return value is the handle of the item and can be used to indicate process, finish, or reset the item. If the method fails C_INVALID_INDEX is returned.

Parameters
conststd::string & name
constCCopasiParameter::Type & type
constvoid * pValue
constvoid * pEndValue = NULL
Returns
size_t handle

References mProcessReportItemList, CVector< CType >::resize(), and CVectorCore< CType >::size().

Referenced by addItem(), CProcessReportLevel::addItem(), CModel::buildStoi(), CModel::compile(), CSBMLExporter::createProgressStepOrStop(), SBMLImporter::createProgressStepOrStop(), CSBMLExporter::exportModelToString(), LUfactor(), SBMLImporter::parseSBML(), SEDMLImporter::parseSEDML(), and CMIRIAMResources::updateMIRIAMResourcesFromFile().

◆ addItem() [4/5]

size_t CProcessReport::addItem ( const std::string &  name,
const std::string &  value,
const std::string *  pEndValue = NULL 
)

Add a process report item to to the list of reporting items. The return value is the handle of the item and can be used to indicate process, finish, or reset the item. If the method fails C_INVALID_INDEX is returned.

Parameters
conststd::string & name
conststd::string & value
conststd::string * pEndValue = NULL
Returns
size_t handle

References addItem(), and CCopasiParameter::STRING.

◆ addItem() [5/5]

size_t CProcessReport::addItem ( const std::string &  name,
const unsigned C_INT32 value,
const unsigned C_INT32 pEndValue = NULL 
)

Add a process report item to to the list of reporting items. The return value is the handle of the item and can be used to indicate process, finish, or reset the item. If the method fails C_INVALID_INDEX is returned.

Parameters
conststd::string & name
constunsigned C_INT32 & value
constunsigned C_INT32 * pEndValue = NULL
Returns
size_t handle

References addItem(), and CCopasiParameter::UINT.

◆ finish()

bool CProcessReport::finish ( )
virtual

Indicate that all items are finished reporting. All item handles loose their validity. If the return value is false the calling process must halt execution and return.

Parameters
boolcontinue

References finishItem(), mProcessReportItemList, and CVectorCore< CType >::size().

Referenced by CProcessReportLevel::finish().

◆ finishItem()

bool CProcessReport::finishItem ( const size_t &  handle)
virtual

Indicate that item handle is finished reporting. The handle of that item is no longer valid after the call. If the return value is false the calling process must halt execution and return.

Parameters
constsize_t & handle
boolcontinue

References isValidHandle(), mProcessReportItemList, and pdelete.

Referenced by CModel::buildStoi(), CModel::compile(), CSBMLExporter::createProgressStepOrStop(), SBMLImporter::createProgressStepOrStop(), finish(), CSBMLExporter::finishCurrentStep(), SBMLImporter::finishCurrentStep(), CSBMLExporter::finishExport(), SBMLImporter::finishImport(), CProcessReportLevel::finishItem(), LUfactor(), SEDMLImporter::parseSEDML(), and CMIRIAMResources::updateMIRIAMResourcesFromFile().

◆ getIgnoreStop()

const bool & CProcessReport::getIgnoreStop ( ) const

Retrieve whether to ignore stop when determining to proceed.

Returns
const bool & ignoreStop

References mIgnoreStop.

◆ isValidHandle()

bool CProcessReport::isValidHandle ( const size_t  handle) const
virtual

Check whether the handle is valid, i.e., usable in progress, reset and finish.

References mProcessReportItemList, and CVectorCore< CType >::size().

Referenced by finishItem(), progressItem(), and resetItem().

◆ proceed()

bool CProcessReport::proceed ( )
virtual

Check whether processing shall proceed. If the return value is false the calling process must halt execution and return. This method is provided so that lengthy processing without advances in any of the reporting items can check whether continuation is requested.

Parameters
boolcontinue

References Continue, CCopasiTimeVariable::getCurrentWallTime(), mIgnoreStop, mpEndTime, mProccessingInstruction, and Stop.

Referenced by CProcessReportLevel::proceed(), progress(), progressItem(), and resetItem().

◆ progress()

bool CProcessReport::progress ( )
virtual

Report process on all items. If the return value is false the calling process must halt execution and return.

Parameters
boolcontinue

References mProcessReportItemList, proceed(), progressItem(), and CVectorCore< CType >::size().

Referenced by CProcessReportLevel::progress().

◆ progressItem()

bool CProcessReport::progressItem ( const size_t &  handle)
virtual

◆ reset()

bool CProcessReport::reset ( )
virtual

Reset all item handle. This means that the values of the items have changed but not as part of a continuous process. If you run multiple processes call reset between them. If the return value is false the calling process must halt execution and return.

Parameters
boolcontinue

References mProcessReportItemList, resetItem(), and CVectorCore< CType >::size().

◆ resetItem()

bool CProcessReport::resetItem ( const size_t &  handle)
virtual

Reset item handle. This means that the value of the item has changed but not as part of a continuous process. If you run multiple processes call reset between them. If the return value is false the calling process must halt execution and return.

Parameters
constsize_t & handle
boolcontinue

References isValidHandle(), and proceed().

Referenced by reset(), and CProcessReportLevel::resetItem().

◆ setIgnoreStop()

void CProcessReport::setIgnoreStop ( const bool &  ignoreStop = true)

Set whether to ignore stop when determining to proceed.

Parameters
constbool & ignoreStop (default: true)

References mIgnoreStop.

Referenced by CProcessReportLevel::setIgnoreStop().

◆ setName()

bool CProcessReport::setName ( const std::string &  name)
virtual

Set the name of the process.

Parameters
conststd::string & name
Returns
success

References mName.

Referenced by CModel::compile(), CSBMLExporter::exportModelToString(), SBMLImporter::parseSBML(), SEDMLImporter::parseSEDML(), and CProcessReportLevel::setName().

Member Data Documentation

◆ mIgnoreStop

bool CProcessReport::mIgnoreStop
protected

Flag indicating whether to continue processing after stop instruction

Referenced by getIgnoreStop(), proceed(), and setIgnoreStop().

◆ mName

std::string CProcessReport::mName
protected

The name of the process.

Referenced by setName().

◆ mpEndTime

CCopasiTimeVariable* CProcessReport::mpEndTime
protected

The time the process should stop.

Referenced by CProcessReport(), proceed(), and ~CProcessReport().

◆ mProccessingInstruction

ProccessingInstruction CProcessReport::mProccessingInstruction
protected

The current processing instructions

Referenced by proceed().

◆ mProcessReportItemList

CVector< CProcessReportItem * > CProcessReport::mProcessReportItemList
protected

The list process report items.

Referenced by addItem(), CProcessReport(), finish(), finishItem(), isValidHandle(), progress(), reset(), and ~CProcessReport().


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