19 if (layout == NULL)
return;
24 while (generalIt != general.
end())
30 for (; refIt != (*generalIt)->getListOfReferenceGlyphs().
end(); ++refIt)
35 for (; subIt != (*generalIt)->getListOfSubglyphs().
end(); ++subIt)
44 while (compIt != comps.
end())
53 while (reactIt != reactions.
end())
59 for (; refIt != (*reactIt)->getListOfMetabReferenceGlyphs().
end(); ++refIt)
68 while (speciesIt != species.
end())
77 while (textIt != texts .end())
92 if (layout == NULL)
return;
97 while (generalIt != general.
end())
106 while (compIt != comps.
end())
115 while (reactIt != reactions.
end())
119 mCurves[(*reactIt)->getTag()] =
new CLCurve((*reactIt)->getCurve());
123 for (; refIt != (*reactIt)->getListOfMetabReferenceGlyphs().end(); ++refIt)
124 mCurves[(*refIt)->getTag()] =
new CLCurve((*refIt)->getCurve());
132 while (speciesIt != species.
end())
141 while (textIt != texts .end())
150 std::map<const std::string, CLBoundingBox*>::reverse_iterator it;
177 std::map<const std::string, CLCurve*>::reverse_iterator curveIt;
179 for (curveIt =
mCurves.rbegin(); curveIt !=
mCurves.rend(); ++curveIt)
181 delete curveIt->second;
185 #define STATE_SET_POSITIONS(objectMap, it, endIt)\
187 for (;it != endIt; ++it)\
189 const std::string& key = ((*it)->getTag());\
190 StringBoundMap::const_iterator boundIt = objectMap.find(key);\
191 if (boundIt == objectMap.end()) \
193 CLBoundingBox* current = boundIt->second;\
194 (*it)->setPosition(current->getPosition());\
200 if (layout == NULL)
return;
216 for (reactIt = reactions.
begin(); reactIt != reactions.
end(); ++reactIt)
218 const std::string& rkey = ((*reactIt)->getTag());
219 StringCurveMap::const_iterator cIt =
mCurves.find(rkey);
223 CLCurve* current = cIt->second;
224 (*reactIt)->setCurve(*current);
229 for (; refIt != (*reactIt)->getListOfMetabReferenceGlyphs().
end(); ++refIt)
231 const std::string& key = ((*refIt)->getTag());
237 CLCurve* current = cIt->second;
238 (*refIt)->setCurve(*current);
std::map< const std::string, CLCurve * > mCurves
static void tagLayout(CLayout *layout)
const CCopasiVector< CLTextGlyph > & getListOfTextGlyphs() const
#define STATE_SET_POSITIONS(objectMap, it, endIt)
const CCopasiVector< CLCompartmentGlyph > & getListOfCompartmentGlyphs() const
virtual const std::string & getKey() const
void tagKey(CLGraphicalObject *element)
void applyTo(CLayout *layout) const
std::map< const std::string, CLBoundingBox * > mCompartmentState
const CCopasiVector< CLMetabGlyph > & getListOfMetaboliteGlyphs() const
const CCopasiVector< CLGeneralGlyph > & getListOfGeneralGlyphs() const
CLayoutState(const CLayout *layout)
std::map< const std::string, CLBoundingBox * > mSpeciesState
std::map< const std::string, CLBoundingBox * > mAdditionalState
std::map< const std::string, CLBoundingBox * > mTextState
void setTag(const std::string &tag)
std::map< const std::string, CLBoundingBox * > mReactionState
const CCopasiVector< CLReactionGlyph > & getListOfReactionGlyphs() const