COPASI API  4.40.278
CProcessReportLevel 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)
 
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)
 
 CProcessReportLevel (CProcessReport *pInterface=NULL)
 
bool finish ()
 
bool finishItem (const size_t &handle)
 
 operator bool () const
 
CProcessReportLevel operator++ ()
 
bool proceed ()
 
bool progress ()
 
bool progressItem (const size_t &handle)
 
bool resetItem (const size_t &handle)
 
void setIgnoreStop (const bool &ignoreStop=true)
 
bool setName (const std::string &name)
 
CProcessReporttoProcessReportPtr ()
 
 ~CProcessReportLevel ()
 

Private Attributes

size_t mLevel
 
size_t mMaxDisplayLevel
 
CProcessReportmpInterface
 

Constructor & Destructor Documentation

◆ CProcessReportLevel()

CProcessReportLevel::CProcessReportLevel ( CProcessReport pInterface = NULL)

Specific Constructor

Parameters
CProcessReport* pInterface

◆ ~CProcessReportLevel()

CProcessReportLevel::~CProcessReportLevel ( )

Destructor

Member Function Documentation

◆ addItem() [1/4]

size_t CProcessReportLevel::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 CProcessReport::addItem(), C_INVALID_INDEX, CCopasiParameter::DOUBLE, mLevel, mMaxDisplayLevel, and mpInterface.

◆ addItem() [2/4]

size_t CProcessReportLevel::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 CProcessReport::addItem(), C_INVALID_INDEX, CCopasiParameter::INT, mLevel, mMaxDisplayLevel, and mpInterface.

◆ addItem() [3/4]

◆ addItem() [4/4]

size_t CProcessReportLevel::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 CProcessReport::addItem(), C_INVALID_INDEX, mLevel, mMaxDisplayLevel, mpInterface, and CCopasiParameter::UINT.

◆ finish()

bool CProcessReportLevel::finish ( )

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 CProcessReport::finish(), mpInterface, and proceed().

◆ finishItem()

◆ operator bool()

CProcessReportLevel::operator bool ( ) const

Check whether we actually have an active interface

Returns
bool haveInterface

◆ operator++()

CProcessReportLevel CProcessReportLevel::operator++ ( )

Increase the level of the progress report

Returns
CProcessReport *

References mLevel.

◆ proceed()

bool CProcessReportLevel::proceed ( )

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 mpInterface, and CProcessReport::proceed().

Referenced by CLyapWolfMethod::calculate(), CEFMAlgorithm::calculateNextTableau(), CBitPatternTreeMethod::combine(), CBitPatternMethod::combine(), finish(), finishItem(), CTimeSensTask::processStep(), CTrajectoryTask::processStep(), progress(), progressItem(), and resetItem().

◆ progress()

bool CProcessReportLevel::progress ( )

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

Parameters
boolcontinue

References mpInterface, proceed(), and CProcessReport::progress().

◆ progressItem()

◆ resetItem()

bool CProcessReportLevel::resetItem ( const size_t &  handle)

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 mLevel, mMaxDisplayLevel, mpInterface, proceed(), and CProcessReport::resetItem().

◆ setIgnoreStop()

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

Set whether to ignore stop when determining to proceed.

Parameters
constbool & ignoreStop (default: true)

References mpInterface, and CProcessReport::setIgnoreStop().

Referenced by COptTask::process(), and CFitTask::process().

◆ setName()

bool CProcessReportLevel::setName ( const std::string &  name)

◆ toProcessReportPtr()

CProcessReport * CProcessReportLevel::toProcessReportPtr ( )

Retrieve a pointer to the process report if valid (level < maxDisplayLevel)

Returns
CProcessReport * pProcessReport

References mLevel, mMaxDisplayLevel, and mpInterface.

Referenced by CMoietiesMethod::process().

Member Data Documentation

◆ mLevel

size_t CProcessReportLevel::mLevel
private

◆ mMaxDisplayLevel

size_t CProcessReportLevel::mMaxDisplayLevel
private

◆ mpInterface


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