/** * Copy constructor. */ ReactionGlyph::ReactionGlyph(const ReactionGlyph& source):GraphicalObject(source) { this->mReaction=source.getReactionId(); this->mCurve=*source.getCurve(); this->mSpeciesReferenceGlyphs=*source.getListOfSpeciesReferenceGlyphs(); connectToChild(); }
CLReactionGlyph::CLReactionGlyph(const ReactionGlyph & sbml, const std::map<std::string, std::string> & modelmap, std::map<std::string, std::string> & layoutmap, const CCopasiContainer * pParent) : CLGlyphWithCurve(sbml, modelmap, layoutmap, pParent), mvMetabReferences("ListOfMetabReferenceGlyphs", this) { //get the copasi key corresponding to the sbml id for the reaction if (sbml.getReactionId() != "") { std::map<std::string, std::string>::const_iterator it = modelmap.find(sbml.getReactionId()); if (it != modelmap.end()) setModelObjectKey(it->second); } //species reference glyphs C_INT32 i, imax = sbml.getListOfSpeciesReferenceGlyphs()->size(); for (i = 0; i < imax; ++i) { const SpeciesReferenceGlyph* tmp = dynamic_cast<const SpeciesReferenceGlyph*>(sbml.getListOfSpeciesReferenceGlyphs()->get(i)); if (tmp) addMetabReferenceGlyph(new CLMetabReferenceGlyph(*tmp, modelmap, layoutmap)); } //curve if (sbml.getCurve()) { CLCurve copy(*sbml.getCurve()); mCurve = copy; } }