COPASI API  4.16.103
Public Member Functions | List of all members
CScanItemRepeat Class Reference

#include <CScanMethod.h>

Inheritance diagram for CScanItemRepeat:
Inheritance graph
Collaboration diagram for CScanItemRepeat:
Collaboration graph

Public Member Functions

 CScanItemRepeat (CCopasiParameterGroup *si, const bool &continueFromCurrentState)
virtual bool isValidScanItem (const bool &continueFromCurrentState)
virtual void step ()
virtual ~CScanItemRepeat ()
- Public Member Functions inherited from CScanItem
size_t getNumSteps () const
const CCopasiObjectgetObject () const
bool isFinished () const
virtual bool isNesting () const
void reset ()
void restoreValue () const
void storeValue ()
virtual ~CScanItem ()

Additional Inherited Members

- Static Public Member Functions inherited from CScanItem
static CScanItemcreateScanItemFromParameterGroup (CCopasiParameterGroup *si, CRandom *rg, const bool &continueFromCurrentState)
- Protected Member Functions inherited from CScanItem
 CScanItem (CCopasiParameterGroup *si, const bool &continueFromCurrentState)
- Protected Attributes inherited from CScanItem
bool mFlagFinished
size_t mIndex
bool mIsStateVariable
size_t mNumSteps
C_FLOAT64 mStoreValue

Detailed Description

Definition at line 99 of file CScanMethod.h.

Constructor & Destructor Documentation

CScanItemRepeat::CScanItemRepeat ( CCopasiParameterGroup si,
const bool &  continueFromCurrentState 

Definition at line 183 of file CScanMethod.cpp.

References CScanItem::mNumSteps.

184  :
185  CScanItem(si, continueFromCurrentState)
186 {
187  if (mNumSteps >= 1)
188  --mNumSteps; // for the repeat item mNumSteps is the number of iterations, not of intervals
189 }
size_t mNumSteps
Definition: CScanMethod.h:39
virtual CScanItemRepeat::~CScanItemRepeat ( )

Definition at line 105 of file CScanMethod.h.

105 {};

Member Function Documentation

bool CScanItemRepeat::isValidScanItem ( const bool &  continueFromCurrentState)

perform checks. This is used in the method::isValidProblem() method. It returns false for an invalid ScanItem and generates a CCopasiMessage

constbool & continueFromCurrentState

Reimplemented from CScanItem.

Definition at line 202 of file CScanMethod.cpp.

203 {
204  return true;
205 }
void CScanItemRepeat::step ( )

Implements CScanItem.

Definition at line 191 of file CScanMethod.cpp.

References CScanItem::mFlagFinished, CScanItem::mIndex, and CScanItem::mNumSteps.

192 {
193  //do something ...
195  //the index
196  if (mIndex > mNumSteps)
197  mFlagFinished = true;
199  ++mIndex;
200 }
size_t mNumSteps
Definition: CScanMethod.h:39
bool mFlagFinished
Definition: CScanMethod.h:48
size_t mIndex
Definition: CScanMethod.h:46

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