COPASI API  4.40.278
CMathDependencyNode Class Reference

#include <CMathDependencyNode.h>

Public Member Functions

void addDependent (CMathDependencyNode *pNode)
 
void addPrerequisite (CMathDependencyNode *pNode)
 
bool buildUpdateSequence (const CCore::SimulationContextFlag &context, std::vector< CObjectInterface * > &updateSequence, bool ignoreCircularDependecies)
 
 CMathDependencyNode (const CMathDependencyNode &src)
 
 CMathDependencyNode (const CObjectInterface *pObject)
 
std::vector< CMathDependencyNode * > & getDependents ()
 
const CObjectInterfacegetObject () const
 
std::vector< CMathDependencyNode * > & getPrerequisites ()
 
const bool & isChanged () const
 
const bool & isRequested () const
 
void relocate (const CMathContainer *pContainer, const std::vector< CMath::sRelocate > &relocations)
 
void remove ()
 
void removeDependent (CMathDependencyNode *pNode)
 
void removePrerequisite (CMathDependencyNode *pNode)
 
void reset ()
 
void setChanged (const bool &changed)
 
void setRequested (const bool &requested)
 
bool updateCalculatedState (const CCore::SimulationContextFlag &context, const CObjectInterface::ObjectSet &changedObjects, bool ignoreCircularDependecies)
 
bool updateDependentState (const CCore::SimulationContextFlag &context, const CObjectInterface::ObjectSet &changedObjects, bool ignoreCircularDependecies)
 
void updateEdges (const std::map< CMathDependencyNode *, CMathDependencyNode * > &map)
 
bool updateIgnoredState (const CCore::SimulationContextFlag &context, const CObjectInterface::ObjectSet &changedObjects, bool ignoreCircularDependecies)
 
bool updatePrerequisiteState (const CCore::SimulationContextFlag &context, const CObjectInterface::ObjectSet &changedObjects, bool ignoreCircularDependecies)
 
 ~CMathDependencyNode ()
 

Private Member Functions

 CMathDependencyNode ()=delete
 
bool createMessage (bool ignoreCircularDependecies)
 

Private Attributes

bool mChanged
 
std::vector< CMathDependencyNode * > mDependents
 
const CObjectInterfacempObject
 
std::vector< CMathDependencyNode * > mPrerequisites
 
bool mRequested
 

Constructor & Destructor Documentation

◆ CMathDependencyNode() [1/3]

CMathDependencyNode::CMathDependencyNode ( )
privatedelete

◆ CMathDependencyNode() [2/3]

CMathDependencyNode::CMathDependencyNode ( const CObjectInterface pObject)

Specific constructor

Parameters
constCObjectInterface * pObject

◆ CMathDependencyNode() [3/3]

CMathDependencyNode::CMathDependencyNode ( const CMathDependencyNode src)

Copy constructor

◆ ~CMathDependencyNode()

CMathDependencyNode::~CMathDependencyNode ( )

Destructor

Member Function Documentation

◆ addDependent()

void CMathDependencyNode::addDependent ( CMathDependencyNode pNode)

Add a dependent

Parameters
CMathDependencyNode* pNode

References mDependents.

◆ addPrerequisite()

void CMathDependencyNode::addPrerequisite ( CMathDependencyNode pNode)

Add a prerequisite

Parameters
CMathDependencyNode* pNode

References mPrerequisites.

◆ buildUpdateSequence()

◆ createMessage()

bool CMathDependencyNode::createMessage ( bool  ignoreCircularDependecies)
private

◆ getDependents()

std::vector< CMathDependencyNode * > & CMathDependencyNode::getDependents ( )

Retrieve the dependents

Returns
std::vector< CMathDependencyNode * > dependents

References mDependents.

Referenced by CMathDependencyNodeIterator::CStackElement::CStackElement().

◆ getObject()

const CObjectInterface * CMathDependencyNode::getObject ( ) const

Retrieve a pointer to the object the node is representing

Returns
const CObjectInterface * pObject

References mpObject.

Referenced by buildUpdateSequence(), createMessage(), updateCalculatedState(), updateDependentState(), updateIgnoredState(), and updatePrerequisiteState().

◆ getPrerequisites()

std::vector< CMathDependencyNode * > & CMathDependencyNode::getPrerequisites ( )

Retrieve the prerequisites

Returns
std::vector< CMathDependencyNode * > prerequisites

References mPrerequisites.

Referenced by CMathDependencyNodeIterator::CStackElement::CStackElement(), and updateIgnoredState().

◆ isChanged()

const bool & CMathDependencyNode::isChanged ( ) const

Check whether the current nodes value is changed

Returns
const bool & isChanged

References mChanged.

Referenced by buildUpdateSequence(), updateCalculatedState(), updateDependentState(), and updateIgnoredState().

◆ isRequested()

const bool & CMathDependencyNode::isRequested ( ) const

Check whether the current node's value is requested

Parameters
constbool & isRequested

References mRequested.

Referenced by buildUpdateSequence(), and updatePrerequisiteState().

◆ relocate()

void CMathDependencyNode::relocate ( const CMathContainer pContainer,
const std::vector< CMath::sRelocate > &  relocations 
)

Relocate the objects in the nodes of the graph.

Parameters
constCMathContainer * pContainer
std::vector<CMath::sRelocate > & relocations

References mpObject, and CMathContainer::relocateObject().

◆ remove()

void CMathDependencyNode::remove ( )

References mDependents, and mPrerequisites.

◆ removeDependent()

void CMathDependencyNode::removeDependent ( CMathDependencyNode pNode)

Remove a dependent

Parameters
CMathDependencyNode* pNode

References mDependents.

◆ removePrerequisite()

void CMathDependencyNode::removePrerequisite ( CMathDependencyNode pNode)

Remove a prerequisite

Parameters
CMathDependencyNode* pNode

References mPrerequisites.

◆ reset()

void CMathDependencyNode::reset ( )

Reset the flags requested and changed

References mChanged, and mRequested.

◆ setChanged()

void CMathDependencyNode::setChanged ( const bool &  changed)

Set whether the current node has changed its value

Parameters
constbool & changed

References mChanged.

Referenced by buildUpdateSequence(), updateCalculatedState(), updateDependentState(), and updateIgnoredState().

◆ setRequested()

void CMathDependencyNode::setRequested ( const bool &  requested)

Set whether the current node's value is requested

Parameters
constbool & requested

References mRequested.

Referenced by updatePrerequisiteState().

◆ updateCalculatedState()

bool CMathDependencyNode::updateCalculatedState ( const CCore::SimulationContextFlag context,
const CObjectInterface::ObjectSet changedObjects,
bool  ignoreCircularDependecies 
)

◆ updateDependentState()

bool CMathDependencyNode::updateDependentState ( const CCore::SimulationContextFlag context,
const CObjectInterface::ObjectSet changedObjects,
bool  ignoreCircularDependecies 
)

◆ updateEdges()

void CMathDependencyNode::updateEdges ( const std::map< CMathDependencyNode *, CMathDependencyNode * > &  map)

References mDependents, and mPrerequisites.

◆ updateIgnoredState()

◆ updatePrerequisiteState()

bool CMathDependencyNode::updatePrerequisiteState ( const CCore::SimulationContextFlag context,
const CObjectInterface::ObjectSet changedObjects,
bool  ignoreCircularDependecies 
)

Member Data Documentation

◆ mChanged

bool CMathDependencyNode::mChanged
private

◆ mDependents

std::vector< CMathDependencyNode * > CMathDependencyNode::mDependents
private

◆ mpObject

const CObjectInterface* CMathDependencyNode::mpObject
private

Referenced by getObject(), and relocate().

◆ mPrerequisites

std::vector< CMathDependencyNode * > CMathDependencyNode::mPrerequisites
private

◆ mRequested

bool CMathDependencyNode::mRequested
private

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