COPASI API
4.16.103
|
#include <CMathDependencyNode.h>
Public Member Functions | |
void | addDependent (CMathDependencyNode *pNode) |
void | addPrerequisite (CMathDependencyNode *pNode) |
bool | buildUpdateSequence (const CMath::SimulationContextFlag &context, CObjectInterface::UpdateSequence &updateSequence) |
CMathDependencyNode (const CObjectInterface *pObject) | |
std::vector < CMathDependencyNode * > & | getDependents () |
const CObjectInterface * | getObject () const |
std::vector < CMathDependencyNode * > & | getPrerequisites () |
const bool & | isChanged () const |
const bool & | isRequested () const |
void | setChanged (const bool &changed) |
void | setRequested (const bool &requested) |
bool | updateDependentState (const CMath::SimulationContextFlag &context, const CObjectInterface::ObjectSet &changedObjects) |
bool | updatePrerequisiteState (const CMath::SimulationContextFlag &context, const CObjectInterface::ObjectSet &changedObjects) |
~CMathDependencyNode (void) | |
Private Member Functions | |
CMathDependencyNode (void) | |
Private Attributes | |
bool | mChanged |
std::vector < CMathDependencyNode * > | mDependents |
const CObjectInterface * | mpObject |
std::vector < CMathDependencyNode * > | mPrerequisites |
bool | mRequested |
Definition at line 15 of file CMathDependencyNode.h.
|
private |
Definition at line 14 of file CMathDependencyNode.cpp.
CMathDependencyNode::CMathDependencyNode | ( | const CObjectInterface * | pObject | ) |
Specific constructor
const | CObjectInterface * pObject |
Definition at line 22 of file CMathDependencyNode.cpp.
CMathDependencyNode::~CMathDependencyNode | ( | void | ) |
void CMathDependencyNode::addDependent | ( | CMathDependencyNode * | pNode | ) |
Add a dependent
CMathDependencyNode | * pNode |
Definition at line 48 of file CMathDependencyNode.cpp.
References mDependents.
void CMathDependencyNode::addPrerequisite | ( | CMathDependencyNode * | pNode | ) |
Add a prerequisite
CMathDependencyNode | * pNode |
Definition at line 38 of file CMathDependencyNode.cpp.
References mPrerequisites.
bool CMathDependencyNode::buildUpdateSequence | ( | const CMath::SimulationContextFlag & | context, |
CObjectInterface::UpdateSequence & | updateSequence | ||
) |
Build the sequence of objects which need to be updated to calculate the object value.
const | CMath::SimulationContextFlag & context |
CObjectInterface::UpdateSequence | & updateSequence |
Definition at line 142 of file CMathDependencyNode.cpp.
References CMathDependencyNodeIterator::After, CMathDependencyNodeIterator::Before, CMath::Dependent, CMathDependencyNodeIterator::End, getObject(), CCopasiObject::getObjectParent(), CMathObject::getSimulationType(), CMathObject::getValueType(), isChanged(), isRequested(), mChanged, mRequested, CMathDependencyNodeIterator::next(), CMathDependencyNodeIterator::Prerequisites, setChanged(), CMathDependencyNodeIterator::setProcessingModes(), CMathDependencyNodeIterator::skipChildren(), CMathDependencyNodeIterator::state(), CMath::UseMoieties, and CMath::Value.
std::vector< CMathDependencyNode * > & CMathDependencyNode::getDependents | ( | ) |
Retrieve the dependents
Definition at line 53 of file CMathDependencyNode.cpp.
References mDependents.
Referenced by CMathDependencyNodeIterator::CStackElement::CStackElement().
const CObjectInterface * CMathDependencyNode::getObject | ( | ) | const |
Retrieve a pointer to the object the node is representing
Definition at line 33 of file CMathDependencyNode.cpp.
References mpObject.
Referenced by buildUpdateSequence(), updateDependentState(), and updatePrerequisiteState().
std::vector< CMathDependencyNode * > & CMathDependencyNode::getPrerequisites | ( | ) |
Retrieve the prerequisites
Definition at line 43 of file CMathDependencyNode.cpp.
References mPrerequisites.
Referenced by CMathDependencyNodeIterator::CStackElement::CStackElement().
const bool & CMathDependencyNode::isChanged | ( | ) | const |
Check whether the current nodes value is changed
Definition at line 214 of file CMathDependencyNode.cpp.
References mChanged.
Referenced by buildUpdateSequence(), and updateDependentState().
const bool & CMathDependencyNode::isRequested | ( | ) | const |
Check whether the current node's value is requested
const | bool & isRequested |
Definition at line 224 of file CMathDependencyNode.cpp.
References mRequested.
Referenced by buildUpdateSequence(), and updatePrerequisiteState().
void CMathDependencyNode::setChanged | ( | const bool & | changed | ) |
Set whether the current node has changed its value
const | bool & changed |
Definition at line 209 of file CMathDependencyNode.cpp.
References mChanged.
Referenced by buildUpdateSequence(), and updateDependentState().
void CMathDependencyNode::setRequested | ( | const bool & | requested | ) |
Set whether the current node's value is requested
const | bool & requested |
Definition at line 219 of file CMathDependencyNode.cpp.
References mRequested.
Referenced by updatePrerequisiteState().
bool CMathDependencyNode::updateDependentState | ( | const CMath::SimulationContextFlag & | context, |
const CObjectInterface::ObjectSet & | changedObjects | ||
) |
Update the state of all dependents (and dependents thereof) to changed,
const | CMath::SimulationContextFlag & context |
const | CObjectInterface::ObjectSet & changedObjects |
Definition at line 58 of file CMathDependencyNode.cpp.
References CMathDependencyNodeIterator::Before, CMathDependencyNodeIterator::Dependents, CMathDependencyNodeIterator::End, getObject(), isChanged(), CObjectInterface::isPrerequisiteForContext(), CMathDependencyNodeIterator::next(), CMathDependencyNodeIterator::parent(), CMathDependencyNodeIterator::Recursive, setChanged(), CMathDependencyNodeIterator::setProcessingModes(), CMathDependencyNodeIterator::skipChildren(), and CMathDependencyNodeIterator::state().
bool CMathDependencyNode::updatePrerequisiteState | ( | const CMath::SimulationContextFlag & | context, |
const CObjectInterface::ObjectSet & | changedObjects | ||
) |
Update the state of all prerequisites (and prerequisites thereof) to requested.
const | CMath::SimulationContextFlag & context |
const | CObjectInterface::ObjectSet & changedObjects |
Definition at line 100 of file CMathDependencyNode.cpp.
References CMathDependencyNodeIterator::Before, CMathDependencyNodeIterator::End, getObject(), CObjectInterface::isPrerequisiteForContext(), isRequested(), CMathDependencyNodeIterator::next(), CMathDependencyNodeIterator::parent(), CMathDependencyNodeIterator::Prerequisites, CMathDependencyNodeIterator::Recursive, CMathDependencyNodeIterator::setProcessingModes(), setRequested(), CMathDependencyNodeIterator::skipChildren(), and CMathDependencyNodeIterator::state().
|
private |
Definition at line 119 of file CMathDependencyNode.h.
Referenced by buildUpdateSequence(), isChanged(), and setChanged().
|
private |
Definition at line 118 of file CMathDependencyNode.h.
Referenced by addDependent(), and getDependents().
|
private |
Definition at line 116 of file CMathDependencyNode.h.
Referenced by getObject().
|
private |
Definition at line 117 of file CMathDependencyNode.h.
Referenced by addPrerequisite(), and getPrerequisites().
|
private |
Definition at line 120 of file CMathDependencyNode.h.
Referenced by buildUpdateSequence(), isRequested(), and setRequested().