33 mInUpToDateList(false),
55 os <<
"digraph G {\n";
64 std::map<const CCopasiObject*, ObjectData>::const_iterator it, itEnd =
mObjects.end();
66 for (it =
mObjects.begin(); it != itEnd; ++it)
71 os <<
"}" << std::endl;
78 if (recursion > 10)
return;
86 if ((*it)->hasUpdateMethod())
87 objectSet.insert(*it);
104 if ((*it)->getObjectParent() && ((*it)->getObjectParent()->getObjectType() ==
"Compartment"
105 || (*it)->getObjectType() ==
"Compartment"))
continue;
109 if ((*it)->hasUpdateMethod())
115 std::set<const CCopasiObject* > tmpObjectSet;
117 std::set<const CCopasiObject* >::const_iterator tmpIt, tmpItEnd = tmpObjectSet.end();
119 for (tmpIt = tmpObjectSet.begin(); tmpIt != tmpItEnd; ++tmpIt)
136 CCopasiContainer::objectMap::const_iterator it = container->
getObjects().begin();
138 for (; it != container->
getObjects().end(); ++it)
141 if (it->second->getObjectName() ==
"Name")
continue;
143 if (it->second->getObjectType() ==
"Function")
continue;
146 if (it->second->getObjectParent() != container)
continue;
157 os <<
"//" << std::endl;
163 std::ostringstream oss;
176 os <<
"<TABLE CELLSPACING=\"0\">\n";
179 os <<
" <TD " << (flagUM ?
"BGCOLOR=\"red\"" :
" ") <<
"><FONT POINT-SIZE=\"7.0\">UM</FONT>" <<
"" <<
"</TD>\n";
180 os <<
" <TD " << (flagRM ?
"BGCOLOR=\"green\"" :
" ") <<
"><FONT POINT-SIZE=\"7.0\">RM</FONT>" <<
"" <<
"</TD>\n";
181 os <<
" <TD " << (flagInUpToDateList ?
"BGCOLOR=\"blue\"" :
" ") <<
"><FONT POINT-SIZE=\"7.0\">UtD</FONT>" <<
"" <<
"</TD>\n";
182 os <<
" <TD><FONT POINT-SIZE=\"7.0\">" << oss.str() <<
" </FONT></TD>\n";
199 if (indirect) os <<
" [color=blue]";
208 std::set< const CCopasiObject * >::const_iterator it, itEnd = objectSet.end();
210 for (it = objectSet.begin(); it != itEnd; ++it)
212 mObjects[*it].mInUpToDateList =
true;
219 for (i = 0; i < imax; ++i)
228 for (i = 0; i < imax; ++i)
237 for (i = 0; i < imax; ++i)
252 std::map <const CCopasiObject*, ObjectData>::iterator it, itEnd =
mObjects.end();
254 for (it =
mObjects.begin(); it != itEnd; ++it)
256 if (it->first->getRefresh() == ref)
return &it->second;
265 os.open(
"CopasiDependencies.dot", std::ios::out);
CCopasiDataModel * getObjectDataModel()
virtual Refresh * getRefresh() const
void findObjectsWithUpdateMethod(const CCopasiObject *obj, std::set< const CCopasiObject * > &objectSet, size_t recursion=0) const
ObjectData * getObjectDataFromRefresh(const Refresh *ref)
virtual std::string getObjectDisplayName(bool regular=true, bool richtext=false) const
void setOnlyAlgebraicDependencies(bool b)
std::map< const CCopasiObject *, ObjectData > mObjects
const std::vector< Refresh * > & getListOfConstantRefreshes() const
virtual const objectMap & getObjects() const
void writeEdge(std::ostream &os, const CCopasiObject *ptr1, const CCopasiObject *ptr2, bool indirect=false)
const std::set< const CCopasiObject * > & getUptoDateObjects() const
size_t mSimulatedRefreshesIndex
const std::vector< Refresh * > & getListOfSimulatedRefreshes() const
void simpleCall(const CModel *pModel)
void writeDependencies(std::ostream &os, const CModel *pModel, const CCopasiObject *rootNode=NULL)
void writeObjectNode(std::ostream &os, const CCopasiObject *ptr, const ObjectData &od) const
const std::vector< Refresh * > & getListOfNonSimulatedRefreshes() const
void writeDotRecursively(const CCopasiObject *obj, std::ostream &os)
void updateObjectNodesFromModel(const CModel *model)
void setSkipDependenciesOnCompartments(bool b)
Header file of class CCopasiContainer.
bool hasUpdateMethod() const
virtual const DataObjectSet & getDirectDependencies(const DataObjectSet &context=DataObjectSet()) const
size_t mNonSimulatedRefreshesIndex
bool mOnlyAlgebraicDependencies
size_t mConstantRefreshesIndex