COPASI API
4.16.103
|
#include <CProcessReport.h>
Public Member Functions | |
size_t | addItem (const std::string &name, const std::string &value, const std::string *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 unsigned C_INT32 &value, const unsigned C_INT32 *pEndValue=NULL) |
size_t | addItem (const std::string &name, const C_FLOAT64 &value, const C_FLOAT64 *pEndValue=NULL) |
CProcessReport (const unsigned int &maxTime=0) | |
virtual bool | finish () |
virtual bool | finishItem (const size_t &handle) |
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) |
virtual bool | setName (const std::string &name) |
virtual | ~CProcessReport () |
Protected Member Functions | |
virtual size_t | addItem (const std::string &name, const CCopasiParameter::Type &type, const void *pValue, const void *pEndValue=NULL) |
Protected Attributes | |
std::string | mName |
CCopasiTimeVariable * | mpEndTime |
CVector< CProcessReportItem * > | mProcessReportItemList |
Definition at line 92 of file CProcessReport.h.
CProcessReport::CProcessReport | ( | const unsigned int & | maxTime = 0 | ) |
Default Constructor
const | unsigned int & maxTime (Default: 0) |
Definition at line 70 of file CProcessReport.cpp.
References CCopasiTimeVariable::getCurrentWallTime(), LLONG_CONST, mpEndTime, and mProcessReportItemList.
|
virtual |
Destructor
Definition at line 82 of file CProcessReport.cpp.
References mpEndTime, mProcessReportItemList, pdelete, and CVectorCore< CType >::size().
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.
const | std::string & name |
const | std::string & value |
const | std::string * pEndValue = NULL |
Definition at line 92 of file CProcessReport.cpp.
References CCopasiParameter::STRING.
Referenced by CProgressBar::addItem(), addItem(), CModel::buildStoi(), CBitPatternMethod::calculate(), CBitPatternTreeMethod::calculate(), CEFMAlgorithm::calculateNextTableau(), CModel::compile(), SBMLImporter::createCModelFromSBMLDocument(), CNewtonMethod::doIntegration(), SBMLImporter::importEvents(), SBMLImporter::importInitialAssignments(), CSSAMethod::initialize(), COptMethodEP::initialize(), COptMethodDE::initialize(), COptMethodSRES::initialize(), COptMethodPS::initialize(), COptMethodGA::initialize(), COptMethodGASR::initialize(), COptMethodHookeJeeves::initialize(), COptMethodCoranaWalk::initialize(), COptMethodLevenbergMarquardt::initialize(), COptMethodNelderMead::initialize(), COptMethodSA::initialize(), CEFMAlgorithm::initialize(), COptMethodSS::initialize(), CBitPatternMethod::initialize(), CBitPatternTreeMethod::initialize(), LUfactor(), SBMLImporter::parseSBML(), SEDMLImporter::parseSEDML(), CSensMethod::process(), CScanTask::process(), CLyapTask::process(), CTrajectoryTask::process(), CTSSATask::process(), CCrossSectionTask::process(), CNewtonMethod::processNewton(), SBMLImporter::removeUnusedFunctions(), COptProblem::setCallBack(), CMIRIAMResources::updateMIRIAMResources(), and CMIRIAMResources::updateMIRIAMResourcesFromFile().
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.
const | std::string & name |
const | C_INT32 & value |
const | C_INT32 * pEndValue = NULL |
Definition at line 99 of file CProcessReport.cpp.
References addItem(), and CCopasiParameter::INT.
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.
const | std::string & name |
const | unsigned C_INT32 & value |
const | unsigned C_INT32 * pEndValue = NULL |
Definition at line 106 of file CProcessReport.cpp.
References addItem(), and CCopasiParameter::UINT.
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.
const | std::string & name |
const | C_FLOAT64 & value |
const | C_FLOAT64 * pEndValue = NULL |
Definition at line 113 of file CProcessReport.cpp.
References addItem(), and CCopasiParameter::DOUBLE.
|
protectedvirtual |
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.
const | std::string & name |
const | CCopasiParameter::Type & type |
const | void * pValue |
const | void * pEndValue = NULL |
Reimplemented in CProgressBar.
Definition at line 120 of file CProcessReport.cpp.
References mProcessReportItemList, CVector< CType >::resize(), and CVectorCore< CType >::size().
|
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.
bool | continue |
Reimplemented in CProgressBar.
Definition at line 188 of file CProcessReport.cpp.
References finishItem(), mProcessReportItemList, and CVectorCore< CType >::size().
Referenced by CProgressBar::finish(), and main().
|
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.
const | size_t & handle |
bool | continue |
Reimplemented in CProgressBar.
Definition at line 199 of file CProcessReport.cpp.
References isValidHandle(), mProcessReportItemList, and pdelete.
Referenced by CModel::buildStoi(), CSSAMethod::calculate(), CEFMAlgorithm::calculate(), CBitPatternMethod::calculate(), CBitPatternTreeMethod::calculate(), CEFMAlgorithm::calculateFluxModes(), CEFMAlgorithm::calculateNextTableau(), CModel::compile(), SBMLImporter::createCModelFromSBMLDocument(), CNewtonMethod::doIntegration(), finish(), CCrossSectionTask::finish(), SBMLImporter::importEvents(), SBMLImporter::importInitialAssignments(), COptMethodDE::initialize(), COptMethodGA::initialize(), COptMethodSS::initialize(), LUfactor(), COptMethodDE::optimise(), COptMethodSRES::optimise(), COptMethodSS::optimise(), COptMethodGA::optimise(), COptMethodPS::optimise(), COptMethodGASR::optimise(), COptMethodHookeJeeves::optimise(), COptMethodSA::optimise(), COptMethodCoranaWalk::optimise(), COptMethodLevenbergMarquardt::optimise(), COptMethodNelderMead::optimise(), COptMethodEP::optimise(), SBMLImporter::parseSBML(), SEDMLImporter::parseSEDML(), CSensMethod::process(), CLyapTask::process(), CTrajectoryTask::process(), CTSSATask::process(), CNewtonMethod::processNewton(), SBMLImporter::removeUnusedFunctions(), and CMIRIAMResources::updateMIRIAMResources().
|
virtual |
Check whether the handle is valid, i.e., usable in progress, reset and finish.
Definition at line 207 of file CProcessReport.cpp.
References mProcessReportItemList, and CVectorCore< CType >::size().
Referenced by CProgressBar::finishItem(), finishItem(), CProgressBar::progressItem(), progressItem(), CProgressBar::resetItem(), resetItem(), and CProgressBar::slotFinishItem().
|
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.
bool | continue |
Reimplemented in CProgressBar.
Definition at line 165 of file CProcessReport.cpp.
References CCopasiTimeVariable::getCurrentWallTime(), and mpEndTime.
Referenced by CEFMAlgorithm::calculateNextTableau(), CBitPatternTreeMethod::combine(), CBitPatternMethod::combine(), CTrajectoryTask::processStep(), CCrossSectionTask::processStep(), progress(), progressItem(), and resetItem().
|
virtual |
Report process on all items. If the return value is false the calling process must halt execution and return.
bool | continue |
Definition at line 149 of file CProcessReport.cpp.
References mProcessReportItemList, proceed(), progressItem(), and CVectorCore< CType >::size().
|
virtual |
Report process on item handle. If the return value is false the calling process must halt execution and return.
const | size_t & handle |
bool | continue |
Reimplemented in CProgressBar.
Definition at line 160 of file CProcessReport.cpp.
References isValidHandle(), and proceed().
Referenced by CModel::buildStoi(), CFitProblem::calculate(), CBitPatternMethod::calculate(), CBitPatternTreeMethod::calculate(), COptProblem::calculate(), CFitProblem::calculateCrossValidation(), CEFMAlgorithm::calculateFluxModes(), CEFMAlgorithm::calculateNextTableau(), CBitPatternTreeMethod::combine(), CBitPatternMethod::combine(), CModel::compile(), SBMLImporter::createCModelFromSBMLDocument(), CSensMethod::do_target_calculation(), CNewtonMethod::doIntegration(), CCrossSectionTask::eventCallBack(), SBMLImporter::importEvents(), SBMLImporter::importInitialAssignments(), LUfactor(), CLyapTask::methodCallback(), COptMethodDE::optimise(), COptMethodSRES::optimise(), COptMethodSS::optimise(), COptMethodGA::optimise(), COptMethodPS::optimise(), COptMethodHookeJeeves::optimise(), COptMethodGASR::optimise(), COptMethodSA::optimise(), COptMethodNelderMead::optimise(), COptMethodLevenbergMarquardt::optimise(), COptMethodCoranaWalk::optimise(), COptMethodEP::optimise(), CTrajectoryTask::process(), CTSSATask::process(), CScanTask::processCallback(), CNewtonMethod::processNewton(), progress(), SBMLImporter::removeUnusedFunctions(), COptProblem::setSolution(), CMIRIAMResources::updateMIRIAMResources(), and CMIRIAMResources::updateMIRIAMResourcesFromFile().
|
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.
bool | continue |
Definition at line 172 of file CProcessReport.cpp.
References mProcessReportItemList, resetItem(), and CVectorCore< CType >::size().
Referenced by CProgressBar::resetItem().
|
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.
const | size_t & handle |
bool | continue |
Reimplemented in CProgressBar.
Definition at line 183 of file CProcessReport.cpp.
References isValidHandle(), and proceed().
Referenced by reset().
|
virtual |
Set the name of the process.
const | std::string & name |
Reimplemented in CProgressBar.
Definition at line 213 of file CProcessReport.cpp.
References mName.
Referenced by CModel::compile(), SBMLImporter::parseSBML(), SEDMLImporter::parseSEDML(), CSensMethod::process(), CScanTask::process(), CLyapTask::process(), CTrajectoryTask::process(), CTSSATask::process(), CCrossSectionTask::process(), CNewtonMethod::processInternal(), CProgressBar::slotSetName(), and CMIRIAMResources::updateMIRIAMResources().
|
protected |
|
protected |
The time the process should stop.
Definition at line 268 of file CProcessReport.h.
Referenced by CProcessReport(), proceed(), and ~CProcessReport().
|
protected |
The list process report items.
Definition at line 258 of file CProcessReport.h.
Referenced by addItem(), CProcessReport(), CProgressBar::finish(), finish(), finishItem(), isValidHandle(), progress(), reset(), CProgressBar::slotAddItem(), CProgressBar::slotFinishItem(), and ~CProcessReport().