|
COPASI API
4.40.278
|
#include <CLayout.h>
Public Member Functions | |
| void | addCompartmentGlyph (CLCompartmentGlyph *glyph) |
| void | addGeneralGlyph (CLGeneralGlyph *glyph) |
| void | addLocalRenderInformation (CLLocalRenderInformation *pRenderInfo) |
| void | addMetaboliteGlyph (CLMetabGlyph *glyph) |
| void | addReactionGlyph (CLReactionGlyph *glyph) |
| void | addTextGlyph (CLTextGlyph *glyph) |
| virtual bool | applyData (const CData &data, CUndoData::CChangeSet &changes) |
| void | calculateAndAssignBounds () |
| CLBoundingBox | calculateBoundingBox () const |
| CLayout (const CLayout &src, const CDataContainer *pParent) | |
| CLayout (const Layout &sbml, std::map< std::string, std::string > &layoutmap, const CDataContainer *pParent=NO_PARENT) | |
| CLayout (const std::string &name="Layout", const CDataContainer *pParent=NO_PARENT) | |
| void | exportToDotFile (std::ostream &os) const |
| void | exportToSBML (Layout *layout, const std::map< const CDataObject *, SBase * > &copasimodelmap, std::map< std::string, const SBase * > &sbmlIDs, const std::map< std::string, std::string > &globalKeyToIdMap) const |
| const CLDimensions & | getDimensions () const |
| virtual const std::string & | getKey () const |
| CDataVector< CLCompartmentGlyph > & | getListOfCompartmentGlyphs () |
| const CDataVector< CLCompartmentGlyph > & | getListOfCompartmentGlyphs () const |
| CDataVector< CLGeneralGlyph > & | getListOfGeneralGlyphs () |
| const CDataVector< CLGeneralGlyph > & | getListOfGeneralGlyphs () const |
| CDataVector< CLLocalRenderInformation > & | getListOfLocalRenderInformationObjects () |
| const CDataVector< CLLocalRenderInformation > & | getListOfLocalRenderInformationObjects () const |
| CDataVector< CLMetabGlyph > & | getListOfMetaboliteGlyphs () |
| const CDataVector< CLMetabGlyph > & | getListOfMetaboliteGlyphs () const |
| CDataVector< CLReactionGlyph > & | getListOfReactionGlyphs () |
| const CDataVector< CLReactionGlyph > & | getListOfReactionGlyphs () const |
| CDataVector< CLTextGlyph > & | getListOfTextGlyphs () |
| const CDataVector< CLTextGlyph > & | getListOfTextGlyphs () const |
| CLLocalRenderInformation * | getRenderInformation (size_t index) |
| const CLLocalRenderInformation * | getRenderInformation (size_t index) const |
| virtual void | moveBy (const CLPoint &p) |
| void | print (std::ostream *ostream) const |
| virtual void | scale (const double &scaleFactor) |
| void | setDimensions (const CLDimensions &d) |
| virtual CData | toData () const |
| ~CLayout () | |
Public Member Functions inherited from CLBase | |
| CLBase () | |
| CLBase (const CLBase &b) | |
| CLBase (const SBase &) | |
| const std::string & | getTag () const |
| bool | hasTag () const |
| void | setTag (const std::string &tag) |
| virtual | ~CLBase () |
Public Member Functions inherited from CDataContainer | |
| virtual bool | add (CDataObject *pObject, const bool &adopt=true) |
| virtual bool | appendDeletedDependentData (CUndoData &undoData) const |
| CDataContainer (const CDataContainer &src, const CDataContainer *pParent) | |
| CDataContainer (const std::string &name, const CDataContainer *pParent=NO_PARENT, const std::string &type="CN", const CFlags< Flag > &flag=CFlags< Flag >::None) | |
| virtual void | createUndoData (CUndoData &undoData, const CUndoData::Type &type, const CData &oldData=CData(), const CCore::Framework &framework=CCore::Framework::ParticleNumbers) const override |
| virtual std::string | getChildObjectUnits (const CDataObject *pObject) const |
| void | getDescendants (CDataObject::DataObjectSet &descendants, const bool &recursive=false) const |
| virtual size_t | getIndex (const CDataObject *pObject) const |
| virtual const CObjectInterface * | getObject (const CCommonName &cn) const override |
| virtual objectMap & | getObjects () |
| virtual const objectMap & | getObjects () const |
| virtual const std::string | getUnits () const override |
| virtual const CDataObject * | getValueObject () const override |
| virtual CUndoObjectInterface * | insert (const CData &data) override |
| void | objectRenamed (CDataObject *pObject, const std::string &oldName) |
| virtual bool | remove (CDataObject *pObject) |
| virtual | ~CDataContainer () |
Public Member Functions inherited from CDataObject | |
| void | addIssue (const CIssue &issue) |
| void | addReference (const CDataContainer *pReference) |
| virtual void | calculateValue () override |
| CDataObject (const CDataObject &src, const CDataContainer *pParent=NULL) | |
| virtual void | destruct () override |
| virtual CCommonName | getCN () const override |
| virtual const CDataObject * | getDataObject () const override |
| CDataContainer * | getObjectAncestor (const std::string &type) const |
| CDataModel * | getObjectDataModel () const |
| virtual std::string | getObjectDisplayName () const override |
| const CObjectInterface * | getObjectFromCN (const CCommonName &cn) const |
| const std::string & | getObjectName () const |
| CDataContainer * | getObjectParent () const |
| const std::string & | getObjectType () const |
| virtual const CObjectInterface::ObjectSet & | getPrerequisites () const override |
| virtual const CValidity & | getValidity () const override |
| virtual void * | getValuePointer () const override |
| bool | hasFlag (const Flag &flag) const |
| virtual bool | isPrerequisiteForContext (const CObjectInterface *pObject, const CCore::SimulationContextFlag &context, const CObjectInterface::ObjectSet &changedObjects) const override |
| bool | prerequisitsContains (const DataObjectSet &objects) const |
| void | removeIssue (const CIssue &issue) |
| void | removeReference (const CDataContainer *pReference) |
| bool | setObjectName (const std::string &name) |
| virtual bool | setObjectParent (const CDataContainer *pParent) |
| void | validityChanged (const CValidity &changedValidity) override |
| void | validityRemoved (const CValidity &changedValidity) |
| virtual | ~CDataObject () |
Public Member Functions inherited from CObjectInterface | |
| CObjectInterface () | |
| CObjectInterface (const CObjectInterface &src) | |
| virtual | ~CObjectInterface () |
Public Member Functions inherited from CUndoObjectInterface | |
| CUndoObjectInterface () | |
| CUndoObjectInterface (const CUndoObjectInterface &src) | |
| bool | generateUuid () |
| const xg::Guid & | getUuid () const |
| bool | setUuid (const std::string &uuid) |
| bool | setUuid (const xg::Guid &uuid) |
| virtual void | updateIndex (const size_t &index, const CUndoObjectInterface *pUndoObject) |
| virtual | ~CUndoObjectInterface () |
Static Public Member Functions | |
| static CLayout * | fromData (const CData &data, CUndoObjectInterface *pParent) |
Static Public Member Functions inherited from CDataContainer | |
| static CDataContainer * | fromData (const CData &data, CUndoObjectInterface *pParent) |
Static Public Member Functions inherited from CDataObject | |
| static CDataObject * | fromData (const CData &data, CUndoObjectInterface *pParent) |
| static void | sanitizeObjectName (std::string &name) |
Static Public Member Functions inherited from CObjectInterface | |
| static const CDataObject * | DataObject (const CObjectInterface *pInterface) |
| static CObjectInterface * | GetObjectFromCN (const ContainerList &listOfContainer, const CCommonName &objName) |
Static Public Member Functions inherited from CUndoObjectInterface | |
| template<class CType > | |
| static CType * | fromData (const CData &, CUndoObjectInterface *) |
Protected Member Functions | |
| CLayout (const CLayout &src) | |
| void | writeDotEdge (std::ostream &os, const std::string &id1, const std::string &id2, int t=0) const |
| void | writeDotNode (std::ostream &os, const std::string &id, const std::string &label, int t=0) const |
Protected Member Functions inherited from CDataContainer | |
| template<class CType > | |
| CDataMatrixReference< CType > * | addMatrixReference (const std::string &name, CType &reference, const CFlags< Flag > &flag=CFlags< Flag >::None) |
| template<class CType > | |
| CDataObjectReference< CType > * | addObjectReference (const std::string &name, CType &reference, const CFlags< Flag > &flag=CFlags< Flag >::None) |
| template<class CType > | |
| CDataVectorReference< CType > * | addVectorReference (const std::string &name, CType &reference, const CFlags< Flag > &flag=CFlags< Flag >::None) |
| CDataContainer (const CDataContainer &src) | |
| void | initObjects () |
Protected Member Functions inherited from CDataObject | |
| CDataObject () | |
| CDataObject (const std::string &name, const CDataContainer *pParent=static_cast< CDataContainer * >((void *) 0), const std::string &type="CN", const CFlags< Flag > &flag=CFlags< Flag >::None) | |
Protected Attributes | |
| CLDimensions | mDimensions |
| std::string | mKey |
| CDataVector< CLCompartmentGlyph > | mvCompartments |
| CDataVector< CLGeneralGlyph > | mvGraphicalObjects |
| CDataVector< CLTextGlyph > | mvLabels |
| CDataVector< CLLocalRenderInformation > | mvLocalRenderInformationObjects |
| CDataVector< CLMetabGlyph > | mvMetabs |
| CDataVector< CLReactionGlyph > | mvReactions |
Protected Attributes inherited from CLBase | |
| std::string | mTag |
Protected Attributes inherited from CDataContainer | |
| objectMap | mObjects |
Protected Attributes inherited from CDataObject | |
| ObjectSet | mPrerequisits |
| std::set< CDataContainer * > | mReferences |
Protected Attributes inherited from CObjectInterface | |
| CValidity | mValidity |
Friends | |
| std::ostream & | operator<< (std::ostream &os, const CLayout &g) |
Additional Inherited Members | |
Public Types inherited from CDataContainer | |
| typedef CDataObjectMap | objectMap |
Public Types inherited from CDataObject | |
| typedef std::set< const CDataObject * > | DataObjectSet |
| enum | Flag { Container , Vector , Matrix , NameVector , Reference , ValueBool , ValueInt , ValueInt64 , ValueDbl , NonUniqueName , StaticString , ValueString , Separator , DisplayName , ModelEntity , Array , DataModel , Root , Gui , __SIZE } |
Public Types inherited from CObjectInterface | |
| typedef std::vector< const CDataContainer * > | ContainerList |
| typedef std::set< const CObjectInterface * > | ObjectSet |
Static Public Attributes inherited from CDataContainer | |
| static const CObjectInterface::ContainerList | EmptyList |
This class describes a reaction network layout. Its structure is exactly corresponding to the sbml layout extension
|
protected |
Referenced by fromData().
| CLayout::CLayout | ( | const std::string & | name = "Layout", |
| const CDataContainer * | pParent = NO_PARENT |
||
| ) |
| CLayout::CLayout | ( | const CLayout & | src, |
| const CDataContainer * | pParent | ||
| ) |
References CDataVector< CType >::add(), CDataVector< CType >::begin(), CDataVector< CType >::end(), CLTextGlyph::getGraphicalObjectKey(), CDataObject::getKey(), CLGraphicalObject::getKey(), CLReactionGlyph::getListOfMetabReferenceGlyphs(), CLGeneralGlyph::getListOfReferenceGlyphs(), CLGeneralGlyph::getListOfSubglyphs(), CLMetabReferenceGlyph::getMetabGlyphKey(), CLReferenceGlyph::getTargetGlyphKey(), mvCompartments, mvGraphicalObjects, mvLabels, mvMetabs, mvReactions, NO_PARENT, CLTextGlyph::setGraphicalObjectKey(), CLMetabReferenceGlyph::setMetabGlyphKey(), and CLReferenceGlyph::setTargetGlyphKey().
| CLayout::CLayout | ( | const Layout & | sbml, |
| std::map< std::string, std::string > & | layoutmap, | ||
| const CDataContainer * | pParent = NO_PARENT |
||
| ) |
constructor from libsbml object. Does not read the whole libsbml tree. Additional work is done in SBMLDocumentLoader
References mKey, and CDataObject::setObjectName().
| CLayout::~CLayout | ( | ) |
References CRootContainer::getKeyFactory(), mKey, and CKeyFactory::remove().
| void CLayout::addCompartmentGlyph | ( | CLCompartmentGlyph * | glyph | ) |
add Glyph to layout. The layout takes ownership of the glyph.
References CDataVector< CType >::add(), and mvCompartments.
Referenced by CCopasiSpringLayout::createLayout(), SBMLDocumentLoader::createLayout(), and CompartmentGlyphHandler::processStart().
| void CLayout::addGeneralGlyph | ( | CLGeneralGlyph * | glyph | ) |
add Glyph to layout. The layout takes ownership of the glyph.
References CDataVector< CType >::add(), and mvGraphicalObjects.
Referenced by CCopasiSpringLayout::createLayout(), SBMLDocumentLoader::createLayout(), and AdditionalGraphicalObjectHandler::processStart().
| void CLayout::addLocalRenderInformation | ( | CLLocalRenderInformation * | pRenderInfo | ) |
add local render information to layout. The layout takes ownership of the object.
References CDataVector< CType >::add(), and mvLocalRenderInformationObjects.
Referenced by SBMLDocumentLoader::createLayout(), and CXMLParserData::createRenderInformation().
| void CLayout::addMetaboliteGlyph | ( | CLMetabGlyph * | glyph | ) |
add Glyph to layout. The layout takes ownership of the glyph.
References CDataVector< CType >::add(), and mvMetabs.
Referenced by CCopasiSpringLayout::createLayout(), SBMLDocumentLoader::createLayout(), and MetaboliteGlyphHandler::processStart().
| void CLayout::addReactionGlyph | ( | CLReactionGlyph * | glyph | ) |
add Glyph to layout. The layout takes ownership of the glyph.
References CDataVector< CType >::add(), and mvReactions.
Referenced by CCopasiSpringLayout::createLayout(), SBMLDocumentLoader::createLayout(), and ReactionGlyphHandler::processStart().
| void CLayout::addTextGlyph | ( | CLTextGlyph * | glyph | ) |
add Glyph to layout. The layout takes ownership of the glyph.
References CDataVector< CType >::add(), and mvLabels.
Referenced by CCopasiSpringLayout::createLayout(), SBMLDocumentLoader::createLayout(), and TextGlyphHandler::processStart().
|
virtual |
Apply the provided data to the object
| const | CData & data |
Reimplemented from CDataContainer.
References fatalError.
| void CLayout::calculateAndAssignBounds | ( | ) |
Calculates the Bounding Box, moves the layout to the origin and assigns it to the layout.
References calculateBoundingBox(), CLBoundingBox::getDimensions(), CLBoundingBox::getPosition(), CLPoint::getX(), CLPoint::getY(), CLPoint::getZ(), moveBy(), and setDimensions().
Referenced by CCopasiSpringLayout::finalizeState().
| CLBoundingBox CLayout::calculateBoundingBox | ( | ) | const |
This methods calculates the bounding box of the layout. It traverses all layout objects and looks for the minimal and maximal x and y values that occur in the layout. These values are returned in the form of a bounding box where the minimal values are stored in the position and the maxima are given as the minimal values plus the corresponding dimension.
References CLCurve::calculateBoundingBox(), CLGraphicalObject::getBoundingBox(), CLGlyphWithCurve::getCurve(), CLBoundingBox::getDimensions(), CLDimensions::getHeight(), getListOfCompartmentGlyphs(), getListOfGeneralGlyphs(), getListOfMetaboliteGlyphs(), CLReactionGlyph::getListOfMetabReferenceGlyphs(), getListOfReactionGlyphs(), CLGeneralGlyph::getListOfReferenceGlyphs(), getListOfTextGlyphs(), CLCurve::getNumCurveSegments(), CLBoundingBox::getPosition(), CLDimensions::getWidth(), CLPoint::getX(), CLPoint::getY(), max, and CDataVector< CType >::size().
Referenced by calculateAndAssignBounds(), and CCopasiSpringLayout::createLayout().
| void CLayout::exportToDotFile | ( | std::ostream & | os | ) | const |
| void CLayout::exportToSBML | ( | Layout * | layout, |
| const std::map< const CDataObject *, SBase * > & | copasimodelmap, | ||
| std::map< std::string, const SBase * > & | sbmlIDs, | ||
| const std::map< std::string, std::string > & | globalKeyToIdMap | ||
| ) | const |
This method writes the information of the copasi layout object into the corresponding sbml object
References SBMLDocumentLoader::convertLayoutObjectKeys(), CSBMLExporter::createUniqueId(), CLTextGlyph::exportReferenceToSBML(), CLCompartmentGlyph::exportToSBML(), CLGeneralGlyph::exportToSBML(), CLReactionGlyph::exportToSBML(), CLMetabGlyph::exportToSBML(), CLTextGlyph::exportToSBML(), getKey(), CLGraphicalObject::getKey(), CLGeneralGlyph::getListOfReferenceGlyphs(), CDataObject::getObjectName(), CLDimensions::getSBMLDimensions(), CDataVector< CType >::insert(), CDataContainer::insert(), mDimensions, mvCompartments, mvGraphicalObjects, mvLabels, mvLocalRenderInformationObjects, mvMetabs, mvReactions, and CDataVector< CType >::size().
Referenced by CListOfLayouts::exportToSBML().
|
static |
Static method to create a CDataObject based on the provided data
| const | CData & data |
References CLayout(), CData::getProperty(), NO_PARENT, CData::OBJECT_NAME, and CDataValue::toString().
|
inline |
References mDimensions.
Referenced by CLLayoutRenderer::draw_layout(), CCopasiSpringLayout::randomize(), and CCopasiXML::saveLayoutList().
|
inlinevirtual |
Retrieves the key of the layout
Reimplemented from CDataObject.
References mKey.
Referenced by exportToDotFile(), exportToSBML(), and CCopasiXML::saveLayoutList().
|
inline |
References mvCompartments.
|
inline |
References mvCompartments.
Referenced by CLayoutState::applyTo(), calculateBoundingBox(), CLayoutState::CLayoutState(), CLLayoutRenderer::getObjectsAt(), CLLayoutRenderer::getObjectsInBoundingBox(), CCopasiSpringLayout::initFromLayout(), moveBy(), CCopasiSpringLayout::randomize(), CCopasiXML::saveLayoutList(), CLayoutState::tagLayout(), and CLLayoutRenderer::update_associations().
|
inline |
References mvGraphicalObjects.
|
inline |
References mvGraphicalObjects.
Referenced by CLayoutState::applyTo(), calculateBoundingBox(), CLayoutState::CLayoutState(), CCopasiSpringLayout::createVariables(), CCopasiSpringLayout::finalizeState(), CLLayoutRenderer::getObjectsAt(), CLLayoutRenderer::getObjectsInBoundingBox(), CCopasiSpringLayout::getPotential(), moveBy(), CCopasiXML::saveLayoutList(), CLayoutState::tagLayout(), and CLLayoutRenderer::update_associations().
|
inline |
Returns a reference to the list of local render information objects.
References mvLocalRenderInformationObjects.
|
inline |
Returns a const reference to the list of local render information objects.
References mvLocalRenderInformationObjects.
Referenced by CLLayoutRenderer::change_style(), SBMLDocumentLoader::createLayout(), CXMLParserData::createRenderInformation(), and CCopasiXML::saveLayoutList().
|
inline |
References mvMetabs.
|
inline |
References mvMetabs.
Referenced by CLayoutState::applyTo(), calculateBoundingBox(), CLayoutState::CLayoutState(), CCopasiSpringLayout::createLayout(), CCopasiSpringLayout::createVariables(), CLLayoutRenderer::getObjectsAt(), CLLayoutRenderer::getObjectsInBoundingBox(), CCopasiSpringLayout::getPotential(), CCopasiSpringLayout::initFromLayout(), moveBy(), CCopasiSpringLayout::randomize(), CCopasiXML::saveLayoutList(), CLayoutState::tagLayout(), and CLLayoutRenderer::update_associations().
|
inline |
References mvReactions.
|
inline |
References mvReactions.
Referenced by CLayoutState::applyTo(), calculateBoundingBox(), CLayoutState::CLayoutState(), CCopasiSpringLayout::createVariables(), CCopasiSpringLayout::finalizeState(), CLLayoutRenderer::getObjectsAt(), CLLayoutRenderer::getObjectsInBoundingBox(), CCopasiSpringLayout::getPotential(), CCopasiSpringLayout::initFromLayout(), moveBy(), CCopasiSpringLayout::randomize(), CCopasiXML::saveLayoutList(), CLLayoutRenderer::setDeduceSpeciesReferenceRoles(), CLayoutState::tagLayout(), and CLLayoutRenderer::update_associations().
|
inline |
References mvLabels.
|
inline |
References mvLabels.
Referenced by CLayoutState::applyTo(), calculateBoundingBox(), CLayoutState::CLayoutState(), CLLayoutRenderer::getObjectsAt(), CLLayoutRenderer::getObjectsInBoundingBox(), CCopasiSpringLayout::initFromLayout(), moveBy(), placeTextGlyphs(), CCopasiXML::saveLayoutList(), CLayoutState::tagLayout(), and CLLayoutRenderer::update_associations().
| CLLocalRenderInformation * CLayout::getRenderInformation | ( | size_t | index | ) |
Returns a pointer to the local render information with the given index or NULL if the index is invalid.
References mvLocalRenderInformationObjects, and CDataVector< CType >::size().
| const CLLocalRenderInformation * CLayout::getRenderInformation | ( | size_t | index | ) | const |
Returns a const pointer to the local render information with the given index or NULL if the index is invalid.
References mvLocalRenderInformationObjects, and CDataVector< CType >::size().
|
virtual |
Reimplemented from CLBase.
References getListOfCompartmentGlyphs(), getListOfGeneralGlyphs(), getListOfMetaboliteGlyphs(), getListOfReactionGlyphs(), getListOfTextGlyphs(), CLPoint::isEmpty(), CLGraphicalObject::moveBy(), and CDataVector< CType >::size().
Referenced by calculateAndAssignBounds().
|
virtual |
This is the output method for any object. The default implementation provided with CDataObject uses the ostream operator<< of the object to print the object.To override this default behavior one needs to reimplement the virtual print function.
| std::ostream | * ostream |
Reimplemented from CDataObject.
|
inlinevirtual |
References CLDimensions::scale().
|
inline |
References mDimensions.
Referenced by calculateAndAssignBounds(), CCopasiSpringLayout::createLayout(), and LayoutHandler::processEnd().
|
virtual |
Retrieve the data describing the object
Reimplemented from CDataContainer.
References fatalError.
|
protected |
Referenced by exportToDotFile().
|
protected |
Referenced by exportToDotFile().
|
friend |
insert operator
|
protected |
Referenced by exportToSBML(), getDimensions(), and setDimensions().
|
protected |
Referenced by CLayout(), getKey(), and ~CLayout().
|
protected |
Referenced by addCompartmentGlyph(), CLayout(), exportToSBML(), and getListOfCompartmentGlyphs().
|
protected |
Referenced by addGeneralGlyph(), CLayout(), exportToSBML(), and getListOfGeneralGlyphs().
|
protected |
Referenced by addTextGlyph(), CLayout(), exportToSBML(), and getListOfTextGlyphs().
|
protected |
|
protected |
Referenced by addMetaboliteGlyph(), CLayout(), exportToDotFile(), exportToSBML(), and getListOfMetaboliteGlyphs().
|
protected |
Referenced by addReactionGlyph(), CLayout(), exportToDotFile(), exportToSBML(), and getListOfReactionGlyphs().