COPASI API
4.40.278
|
#include <CCopasiXML.h>
Public Member Functions | |
CCopasiXML () | |
bool | freeFunctionList () |
bool | freeGUI () |
bool | freeLayoutList () |
bool | freeModel () |
bool | freePlotList () |
bool | freeReportList () |
bool | freeTaskList () |
CDataVectorN< CFunction > * | getFunctionList () const |
SCopasiXMLGUI * | getGUI () const |
CListOfLayouts * | getLayoutList () const |
CModel * | getModel () const |
COutputDefinitionVector * | getPlotList () const |
CReportDefinitionVector * | getReportList () const |
CDataVectorN< CCopasiTask > * | getTaskList () const |
bool | haveFunctionList () const |
bool | haveGUI () const |
bool | haveLayoutList () const |
bool | haveModel () const |
bool | havePlotList () const |
bool | haveReportList () const |
bool | haveTaskList () const |
virtual bool | load (std::istream &is, const std::string &pwd) |
virtual bool | save (std::ostream &os, const std::string &relativeTo) |
virtual bool | saveModelParameterSets (std::ostream &os, const std::string &relativeTo) |
bool | saveUnitDefinitionList () |
bool | setDatamodel (CDataModel *pDataModel) |
bool | setFunctionList (CDataVectorN< CFunction > *pFunctionList) |
bool | setGUI (SCopasiXMLGUI *pGUI) |
bool | setLayoutList (const CListOfLayouts &reportList) |
bool | setModel (CModel *pModel) |
bool | setPlotList (COutputDefinitionVector *pPlotList) |
bool | setReportList (CReportDefinitionVector *pReportList) |
bool | setTaskList (CDataVectorN< CCopasiTask > *pTaskList) |
~CCopasiXML () | |
Public Member Functions inherited from CCopasiXMLInterface | |
CCopasiXMLInterface () | |
bool | load (const std::string &fileName, const std::string &relativeTo) |
bool | save (const std::string &fileName, const std::string &relativeTo) |
virtual | ~CCopasiXMLInterface () |
Private Attributes | |
bool | mMCXML21Issued |
CDataModel * | mpDataModel |
CDataVectorN< CFunction > * | mpFunctionList |
SCopasiXMLGUI * | mpGUI |
CListOfLayouts * | mpLayoutList |
CModel * | mpModel |
COutputDefinitionVector * | mpPlotList |
CReportDefinitionVector * | mpReportList |
CDataVectorN< CCopasiTask > * | mpTaskList |
std::map< std::string, std::string > | mSBMLReference |
Additional Inherited Members | |
Public Types inherited from CCopasiXMLInterface | |
enum | EncodingType { none = 0 , standard , attribute , character } |
Static Public Member Functions inherited from CCopasiXMLInterface | |
static std::string | encode (const std::string &str, const EncodingType &type=standard) |
static std::string | utf8 (const std::string &str) |
Protected Member Functions inherited from CCopasiXMLInterface | |
bool | endSaveElement (const std::string &name) |
bool | saveData (const std::string &data) |
bool | saveElement (const std::string &name, CXMLAttributeList &attributeList) |
bool | saveParameter (const CCopasiParameter ¶meter) |
bool | saveParameterGroup (const std::vector< CCopasiParameter * > &group) |
bool | saveXhtml (const std::string &xhtml) |
bool | startSaveElement (const std::string &name) |
bool | startSaveElement (const std::string &name, CXMLAttributeList &attributeList) |
Protected Attributes inherited from CCopasiXMLInterface | |
std::string | mIndent |
std::istream * | mpIstream |
std::ostream * | mpOstream |
std::string | mPWD |
CCopasiXML::CCopasiXML | ( | ) |
Constructor
CCopasiXML class. This class implements a CCopasiXMLInterface to the COPASI XML specified in http://www.copasi.org/schema/copasi.xsd
Created for COPASI by Stefan Hoops 2003 Copyright Stefan Hoops
CCopasiXML::~CCopasiXML | ( | ) |
Destructor
|
private |
Build a list of functions.
References CRootContainer::getFunctionList(), CDataModel::getModel(), CFunctionDB::getUsedFunctions(), mpDataModel, and setFunctionList().
Referenced by save().
|
private |
The default kinetic law unit type needs to be corrected in rare cases.
References CDataVector< CType >::begin(), CReaction::ConcentrationPerTime, CDataVector< CType >::end(), CModel::getReactions(), and mpModel.
Referenced by load().
|
private |
The object names no longer may have special character and are sanitized. This invalidates common names (CNs).
References CRegisteredCommonName::sanitizeObjectNames().
Referenced by load().
|
private |
Fix files written with Version 4.0.18, which used units Mol, etc., instead of mol, . . .
References CModel::getQuantityUnit(), mpModel, CCore::ParticleNumbers, and CModel::setQuantityUnit().
Referenced by load().
|
private |
Fix files written with Version 4.10.55, which wrote the square root of user defined weights for the parameter fitting task
References C_INVALID_INDEX, CFitTask::fixBuild55(), CDataVectorN< CType >::getIndex(), and mpTaskList.
Referenced by load().
|
private |
Fix files written with Version 4.12.81 and earlier, which wrote the exp(mean) and exp(std. deviation) for normal random distributions in the scan task.
References C_INVALID_INDEX, CScanTask::fixBuild81(), CDataVectorN< CType >::getIndex(), and mpTaskList.
Referenced by load().
|
private |
After Build 104, at least, we shouldn't see any "m" in place of "min" for timeUnit.
References CModel::getTimeUnit(), mpModel, and CModel::setTimeUnit().
Referenced by load().
bool CCopasiXML::freeFunctionList | ( | ) |
Free the function list.
References mpFunctionList, and pdelete.
Referenced by save().
bool CCopasiXML::freeGUI | ( | ) |
Free the GUI.
References mpGUI, and pdelete.
Referenced by CDataModel::loadModel().
bool CCopasiXML::freeLayoutList | ( | ) |
Free the layout list.
References mpLayoutList, and pdelete.
Referenced by CDataModel::loadModel().
bool CCopasiXML::freeModel | ( | ) |
Free the model.
References mpModel, and pdelete.
Referenced by CDataModel::loadModel().
bool CCopasiXML::freePlotList | ( | ) |
Free the plot list.
References mpPlotList, and pdelete.
Referenced by CDataModel::loadModel().
bool CCopasiXML::freeReportList | ( | ) |
Free the report list.
References mpReportList, and pdelete.
Referenced by CDataModel::loadModel().
bool CCopasiXML::freeTaskList | ( | ) |
Free the task list.
References mpTaskList, and pdelete.
Referenced by CDataModel::loadModel().
CDataVectorN< CFunction > * CCopasiXML::getFunctionList | ( | ) | const |
Retrieve the function list.
References mpFunctionList.
SCopasiXMLGUI * CCopasiXML::getGUI | ( | ) | const |
CListOfLayouts * CCopasiXML::getLayoutList | ( | ) | const |
Retrieve the layout list.
References mpLayoutList.
Referenced by CDataModel::loadModel().
CModel * CCopasiXML::getModel | ( | ) | const |
Retreive the model.
References mpModel.
Referenced by CDataModel::loadModel().
COutputDefinitionVector * CCopasiXML::getPlotList | ( | ) | const |
Retrieve the plot list.
References mpPlotList.
Referenced by CDataModel::loadModel().
CReportDefinitionVector * CCopasiXML::getReportList | ( | ) | const |
Retrieve the report list.
References mpReportList.
Referenced by CDataModel::loadModel().
CDataVectorN< CCopasiTask > * CCopasiXML::getTaskList | ( | ) | const |
Retrieve the task list.
References mpTaskList.
Referenced by CDataModel::loadModel().
bool CCopasiXML::haveFunctionList | ( | ) | const |
Retrieve whether the XML contains a function list.
References mpFunctionList.
Referenced by save(), and saveFunctionList().
bool CCopasiXML::haveGUI | ( | ) | const |
bool CCopasiXML::haveLayoutList | ( | ) | const |
Retrieve whether the XML contains a layout list.
References mpLayoutList.
Referenced by saveLayoutList().
bool CCopasiXML::haveModel | ( | ) | const |
Retreive whether the XML contains a model.
References mpModel.
Referenced by save(), saveModel(), and saveModelParameterSets().
bool CCopasiXML::havePlotList | ( | ) | const |
Retrieve whether the XML contains a plot list.
References mpPlotList.
Referenced by savePlotList().
bool CCopasiXML::haveReportList | ( | ) | const |
Retrieve whether the XML contains a report list.
References mpReportList.
Referenced by saveReportList().
bool CCopasiXML::haveTaskList | ( | ) | const |
Retrieve whether the XML contains a task list.
References mpTaskList.
Referenced by saveTaskList().
|
virtual |
Load information from a given istream.
std::istream | & is |
const | std::string & pwd |
Implements CCopasiXMLInterface.
References BUFFER_SIZE, fatalError, fixBuild113(), fixBuild171(), fixBuild18(), fixBuild55(), fixBuild81(), fixBuildBefore104(), CExpatTemplate< CType >::getCurrentColumnNumber(), CExpatTemplate< CType >::getCurrentLineNumber(), CExpatTemplate< CType >::getErrorString(), CXMLParser::getLayoutList(), CXMLParser::getModel(), CXMLParser::getPlotList(), CXMLParser::getReportList(), CXMLParser::getTaskList(), CXMLParser::getUnitDefinitionImportList(), CVersion::getVersion(), CVersion::getVersionDevel(), MCXML, mergeUnitDefinitions(), mpDataModel, mpFunctionList, mpGUI, CCopasiXMLInterface::mpIstream, mpLayoutList, mpModel, mpPlotList, mpReportList, mpTaskList, CCopasiXMLInterface::mPWD, CExpatTemplate< CType >::parse(), pdelete, CCopasiMessage::RAW, CXMLParser::setDatamodel(), CXMLParser::setFunctionList(), CXMLParser::setGUI(), CXMLParser::setLayoutList(), CVersion::VERSION, and CCopasiMessage::WARNING.
Referenced by CFunctionDB::load(), and CDataModel::loadModel().
|
private |
Load in Unit Definitions we don't already have. Create new names and symbols for conflicts. Update model to use any created symbols.
References CUnitDefinitionDB::add(), CDataVector< CType >::begin(), C_INVALID_INDEX, CModel::changeUnitExpressionSymbols(), CUnitDefinitionDB::containsSymbol(), CDataVector< CType >::end(), CUnit::getExpression(), CDataVectorN< CType >::getIndex(), CCopasiMessage::getLastMessage(), CDataObject::getObjectName(), CUnitDefinition::getSymbol(), CRootContainer::getUnitList(), mpModel, CUnit::replaceSymbol(), CUnitDefinition::setExpression(), CUnitDefinition::setSymbol(), and CCopasiMessage::size().
Referenced by load().
|
virtual |
Save information to a given ostream.
std::ostream | & os |
const | std::string & relativeTo |
Implements CCopasiXMLInterface.
References CXMLAttributeList::add(), buildFunctionList(), CCopasiXMLInterface::endSaveElement(), freeFunctionList(), CVersion::getVersion(), haveFunctionList(), haveModel(), CCopasiXMLInterface::mpOstream, CCopasiXMLInterface::mPWD, saveFunctionList(), saveGUI(), saveLayoutList(), saveModel(), savePlotList(), saveReportList(), saveSBMLReference(), saveTaskList(), saveUnitDefinitionList(), CCopasiXMLInterface::startSaveElement(), UTCTimeStamp(), and CVersion::VERSION.
Referenced by CDataModel::saveModelToString().
|
private |
Saves the attributes for a 1D element
References CXMLAttributeList::add(), CLGraphicalPrimitive1D::getDashArray(), CLGraphicalPrimitive1D::getStroke(), CLGraphicalPrimitive1D::getStrokeWidth(), CLGraphicalPrimitive1D::isSetDashArray(), CLGraphicalPrimitive1D::isSetStroke(), CLGraphicalPrimitive1D::isSetStrokeWidth(), and saveTransformationAttributes().
Referenced by save2DAttributes(), saveRenderCurveElement(), and saveRenderTextElement().
|
private |
Saves the attributes for a 2D element
References CXMLAttributeList::add(), CLGraphicalPrimitive2D::EVENODD, CLGraphicalPrimitive2D::getFillColor(), CLGraphicalPrimitive2D::getFillRule(), CLGraphicalPrimitive2D::isSetFill(), CLGraphicalPrimitive2D::isSetFillRule(), CLGraphicalPrimitive2D::NONZERO, and save1DAttributes().
Referenced by saveEllipseElement(), saveGroupElement(), savePolygonElement(), and saveRectangleElement().
|
private |
References CXMLAttributeList::add(), CCopasiXMLInterface::endSaveElement(), CAnnotation::getMiriamAnnotation(), CAnnotation::getNotes(), CAnnotation::getUnsupportedAnnotations(), CCopasiXMLInterface::mpOstream, CCopasiXMLInterface::saveXhtml(), CXMLAttributeList::setValue(), and CCopasiXMLInterface::startSaveElement().
Referenced by saveFunctionList(), saveModel(), saveModelParameterSets(), and saveUnitDefinitionList().
|
private |
Saves the startHead and endHead attribute as found in group and curves. We write it as a template so that it can be used on curves and group elements.
References CXMLAttributeList::add().
|
private |
|
private |
Save a single color definition element.
References CXMLAttributeList::add(), CLColorDefinition::createValueString(), CLColorDefinition::getId(), and CCopasiXMLInterface::saveElement().
Referenced by saveRenderInformationDefinitionElements().
|
private |
References CXMLAttributeList::add(), CCopasiXMLInterface::endSaveElement(), CXMLAttributeList::erase(), CLLineSegment::getBase1(), CLLineSegment::getBase2(), CLCurve::getCurveSegments(), CLLineSegment::getEnd(), CLCurve::getNumCurveSegments(), CLLineSegment::getStart(), CLLineSegment::isBezier(), savePosition(), and CCopasiXMLInterface::startSaveElement().
Referenced by saveLayoutList().
|
private |
saves a vector of curve elements. This can be called from the polygon as well as the curve.
References CCopasiXMLInterface::endSaveElement(), saveRenderPoint(), and CCopasiXMLInterface::startSaveElement().
Referenced by savePolygonElement(), and saveRenderCurveElement().
|
private |
References CXMLAttributeList::add(), CXMLAttributeList::erase(), CLDimensions::getHeight(), CLDimensions::getWidth(), and CCopasiXMLInterface::saveElement().
Referenced by saveBoundingBox().
|
private |
saves a single ellipse element.
References CXMLAttributeList::add(), CLEllipse::getCX(), CLEllipse::getCY(), CLEllipse::getCZ(), CLEllipse::getRX(), CLEllipse::getRY(), save2DAttributes(), CCopasiXMLInterface::saveElement(), and CLRelAbsVector::toString().
Referenced by saveTransformation2D().
|
private |
Save the list of functions.
References CXMLAttributeList::add(), CCopasiXMLInterface::endSaveElement(), CXMLAttributeList::erase(), CEvaluationTree::getInfix(), CFunction::getKey(), CFunctionParameter::getKey(), CDataObject::getObjectName(), CFunction::getSBMLId(), CEvaluationTree::getType(), CFunctionParameter::getUsage(), CFunction::getVariables(), haveFunctionList(), CFunction::isReversible(), mpFunctionList, mSBMLReference, CFunctionParameter::RoleNameXML, saveAnnotation(), CCopasiXMLInterface::saveData(), CCopasiXMLInterface::saveElement(), CXMLAttributeList::setValue(), CDataVector< CType >::size(), CFunctionParameters::size(), CCopasiXMLInterface::startSaveElement(), TriFalse, TriTrue, TriUnspecified, and CEvaluationTree::XMLType.
Referenced by save().
|
private |
Saves a single global render information object.
References CCopasiXMLInterface::endSaveElement(), CLGlobalRenderInformation::getNumStyles(), CLGlobalRenderInformation::getStyle(), saveGlobalStyle(), saveRenderInformationAttributes(), saveRenderInformationDefinitionElements(), and CCopasiXMLInterface::startSaveElement().
Referenced by saveListOfGlobalRenderInformation().
|
private |
Saves a single local style element.
References CCopasiXMLInterface::endSaveElement(), saveStyleAttributes(), saveStyleElements(), and CCopasiXMLInterface::startSaveElement().
Referenced by saveGlobalRenderInformation().
|
private |
Adds the attributes common to radial and linear gradient.
References CXMLAttributeList::add(), CLGradientBase::getId(), CLGradientBase::getSpreadMethod(), CLGradientBase::PAD, CLGradientBase::REFLECT, and CLGradientBase::REPEAT.
Referenced by saveLinearGradient(), and saveRadialGradient().
|
private |
Saves the elements that are common to linear and radial gradients.
References CLGradientBase::getGradientStop(), CLGradientBase::getNumGradientStops(), and saveGradientStop().
Referenced by saveLinearGradient(), and saveRadialGradient().
|
private |
Saves a single gradient stop element.
References CXMLAttributeList::add(), CLGradientStop::getOffset(), CLGradientStop::getStopColor(), CCopasiXMLInterface::saveElement(), and CLRelAbsVector::toString().
Referenced by saveGradientElements().
|
private |
Saves a group element.
References CCopasiXMLInterface::endSaveElement(), CLGroup::getElement(), CLGroup::getNumElements(), save2DAttributes(), saveTransformation2D(), and CCopasiXMLInterface::startSaveElement().
Referenced by saveLineEnding(), saveStyleElements(), and saveTransformation2D().
|
private |
Save GUI information
References CXMLAttributeList::add(), CSlider::convertScaleToScaleName(), CCopasiXMLInterface::endSaveElement(), CSlider::getAssociatedEntityKey(), CSlider::getKey(), CSlider::getMaxValue(), CSlider::getMinValue(), CSlider::getScaling(), SCopasiXMLGUI::getSliderList(), CSlider::getSliderObjectCN(), CSlider::getSliderType(), CSlider::getSliderValue(), CSlider::getTickFactor(), CSlider::getTickNumber(), haveGUI(), mpGUI, CCopasiXMLInterface::saveElement(), CXMLAttributeList::setValue(), CDataVector< CType >::size(), CCopasiXMLInterface::startSaveElement(), and CSlider::TypeName.
Referenced by save().
|
private |
saves a single image element.
References CXMLAttributeList::add(), CLImage::getHeight(), CLImage::getImageReference(), CLImage::getWidth(), CLImage::getX(), CLImage::getY(), CLImage::getZ(), CCopasiXMLInterface::saveElement(), saveTransformationAttributes(), and CLRelAbsVector::toString().
Referenced by saveTransformation2D().
|
private |
Save the list of layout.
References CXMLAttributeList::add(), CCopasiXMLInterface::endSaveElement(), CXMLAttributeList::erase(), CLGraphicalObject::getBoundingBox(), CLGlyphWithCurve::getCurve(), CLayout::getDimensions(), CLTextGlyph::getGraphicalObjectKey(), CLDimensions::getHeight(), CLayout::getKey(), CLGraphicalObject::getKey(), CLayout::getListOfCompartmentGlyphs(), CLayout::getListOfGeneralGlyphs(), CListOfLayouts::getListOfGlobalRenderInformationObjects(), CLayout::getListOfLocalRenderInformationObjects(), CLayout::getListOfMetaboliteGlyphs(), CLReactionGlyph::getListOfMetabReferenceGlyphs(), CLayout::getListOfReactionGlyphs(), CLayout::getListOfTextGlyphs(), CLMetabReferenceGlyph::getMetabGlyphKey(), CLGraphicalObject::getModelObjectKey(), CLCurve::getNumCurveSegments(), CDataObject::getObjectName(), CLGraphicalObject::getObjectRole(), CLMetabReferenceGlyph::getRole(), CLTextGlyph::getText(), CLDimensions::getWidth(), CLGraphicalObject::hasValidModelReference(), haveLayoutList(), CLBoundingBox::isEmpty(), CLTextGlyph::isTextSet(), MCXML, mMCXML21Issued, mpLayoutList, saveBoundingBox(), saveCurve(), CCopasiXMLInterface::saveElement(), saveListOfGlobalRenderInformation(), saveListOfLocalRenderInformation(), CDataVector< CType >::size(), CCopasiXMLInterface::startSaveElement(), CCopasiMessage::WARNING, and CLMetabReferenceGlyph::XMLRole.
Referenced by save().
|
private |
Saves a single linear gradient definition.
References CXMLAttributeList::add(), CCopasiXMLInterface::endSaveElement(), CLLinearGradient::getXPoint1(), CLLinearGradient::getXPoint2(), CLLinearGradient::getYPoint1(), CLLinearGradient::getYPoint2(), CLLinearGradient::getZPoint1(), CLLinearGradient::getZPoint2(), saveGradientAttributes(), saveGradientElements(), CCopasiXMLInterface::startSaveElement(), and CLRelAbsVector::toString().
Referenced by saveRenderInformationDefinitionElements().
|
private |
Saves a line ending definiton,
References CXMLAttributeList::add(), CCopasiXMLInterface::endSaveElement(), CLLineEnding::getBoundingBox(), CLLineEnding::getGroup(), CLLineEnding::getId(), CLLineEnding::getIsEnabledRotationalMapping(), saveBoundingBox(), saveGroupElement(), and CCopasiXMLInterface::startSaveElement().
Referenced by saveRenderInformationDefinitionElements().
|
private |
Saves the list of global render information objects.
References CCopasiXMLInterface::endSaveElement(), saveGlobalRenderInformation(), CDataVector< CType >::size(), and CCopasiXMLInterface::startSaveElement().
Referenced by saveLayoutList().
|
private |
Saves the list of local render information objects.
References CCopasiXMLInterface::endSaveElement(), saveLocalRenderInformation(), CDataVector< CType >::size(), and CCopasiXMLInterface::startSaveElement().
Referenced by saveLayoutList().
|
private |
Saves a single local render information object.
References CCopasiXMLInterface::endSaveElement(), CLLocalRenderInformation::getNumStyles(), CLLocalRenderInformation::getStyle(), saveLocalStyle(), saveRenderInformationAttributes(), saveRenderInformationDefinitionElements(), and CCopasiXMLInterface::startSaveElement().
Referenced by saveListOfLocalRenderInformation().
|
private |
Saves a single local style element.
References CXMLAttributeList::add(), CLStyle::createStringFromSet(), CCopasiXMLInterface::endSaveElement(), CLLocalStyle::getKeyList(), CLLocalStyle::getNumKeys(), saveStyleAttributes(), saveStyleElements(), and CCopasiXMLInterface::startSaveElement().
Referenced by saveLocalRenderInformation().
|
private |
Save the model.
References CXMLAttributeList::add(), CVectorCore< CType >::array(), CDataVector< CType >::begin(), C_FLOAT64, CDataVector< CType >::end(), CCopasiXMLInterface::endSaveElement(), CXMLAttributeList::erase(), CModelEntity::FIXED, CModel::getAreaUnitName(), CEvent::getAssignments(), CModel::getAvogadro(), CReaction::getChemEq(), CDataObject::getCN(), CMetab::getCompartment(), CModel::getCompartments(), CEvent::getDelayAssignment(), CEvent::getDelayExpression(), CCompartment::getDimensionality(), CStateTemplate::getEntities(), CModel::getEvents(), CModelEntity::getExpression(), CEvent::getFireAtInitialTime(), CReaction::getFunction(), CReaction::getFunctionParameters(), CModelEntity::getInitialExpression(), CDataObject::getKey(), CFunction::getKey(), CEvent::getKey(), CModel::getKey(), CReaction::getKey(), CModelEntity::getKey(), CCopasiParameterGroup::getKey(), CReaction::getKineticLawUnitType(), CModel::getLengthUnitName(), CModel::getMetabolites(), CModel::getModelType(), CModel::getModelValues(), CChemEq::getModifiers(), CCopasiParameterGroup::getName(), CModelEntity::getNoiseExpression(), CReaction::getNoiseExpression(), CDataObject::getObjectDataModel(), CDataObject::getObjectName(), CReaction::getParameterObjects(), CReaction::getParameters(), CEvent::getPersistentTrigger(), CEvent::getPriorityExpression(), CChemEq::getProducts(), CModel::getQuantityUnitName(), CModel::getReactions(), CEvent::getSBMLId(), CModelEntity::getSBMLId(), CReaction::getSBMLId(), CReaction::getScalingCompartment(), CModel::getStateTemplate(), CModelEntity::getStatus(), CChemEq::getSubstrates(), CModel::getTimeUnitName(), CEvent::getTriggerExpression(), CRootContainer::getUndefinedFunction(), CModelEntity::getUnitExpression(), CCopasiParameterGroup::getValue(), CFunction::getVariables(), CModel::getVolumeUnitName(), CModelEntity::hasNoise(), CReaction::hasNoise(), haveModel(), CReaction::isFast(), CReaction::isReversible(), CReaction::KineticLawUnitTypeName, CCopasiXMLInterface::mIndent, CModel::ModelTypeNames, mpModel, CCopasiXMLInterface::mpOstream, mSBMLReference, CModelEntity::REACTIONS, saveAnnotation(), CCopasiXMLInterface::saveData(), CCopasiXMLInterface::saveElement(), saveModelParameterSets(), CXMLAttributeList::setValue(), CDataVector< CType >::size(), CFunctionParameters::size(), CStateTemplate::size(), CCopasiParameterGroup::size(), CXMLAttributeList::skip(), CCopasiXMLInterface::startSaveElement(), and CModelEntity::XMLStatus.
Referenced by save().
|
private |
Save a model parameter
const | CModelParameter * pModelParameter |
References CXMLAttributeList::add(), CCopasiXMLInterface::endSaveElement(), CModelParameter::getCN(), CModelParameter::getCompareResult(), CModelParameter::getInitialExpression(), CModelParameter::getSimulationType(), CModelParameter::getType(), CModelParameter::getValue(), CModelParameter::Group, CModelParameter::Missing, CCore::ParticleNumbers, CModelParameter::Reaction, CCopasiXMLInterface::saveData(), CCopasiXMLInterface::saveElement(), CCopasiXMLInterface::startSaveElement(), CModelParameter::TypeNames, and CModelEntity::XMLStatus.
Referenced by saveModelParameterSets().
|
private |
Save the model parameter sets to stream
References CXMLAttributeList::add(), CModelParameterSet::begin(), CModelParameterSet::end(), CCopasiXMLInterface::endSaveElement(), CXMLAttributeList::erase(), CModel::getActiveModelParameterSet(), CModelParameterSet::getKey(), CModel::getModelParameterSets(), CDataObject::getObjectName(), mpModel, saveAnnotation(), saveModelParameter(), CXMLAttributeList::setValue(), CDataVector< CType >::size(), and CCopasiXMLInterface::startSaveElement().
Referenced by saveModel(), and saveModelParameterSets().
|
virtual |
Save information to a given ostream.
std::ostream | & os |
const | std::string & relativeTo |
References CXMLAttributeList::add(), CCopasiXMLInterface::endSaveElement(), CModel::getAreaUnitName(), CModel::getAvogadro(), CModel::getKey(), CModel::getLengthUnitName(), CModel::getModelType(), CDataObject::getObjectName(), CModel::getQuantityUnitName(), CModelEntity::getStatus(), CModel::getTimeUnitName(), CVersion::getVersion(), CModel::getVolumeUnitName(), haveModel(), CModel::ModelTypeNames, mpModel, CCopasiXMLInterface::mpOstream, CCopasiXMLInterface::mPWD, saveModelParameterSets(), CCopasiXMLInterface::startSaveElement(), UTCTimeStamp(), CVersion::VERSION, and CModelEntity::XMLStatus.
Referenced by CDataModel::saveModelParameterSets().
|
private |
Save the list of plots.
References CXMLAttributeList::add(), CCopasiXMLInterface::endSaveElement(), CXMLAttributeList::erase(), CPlotItem::getChannels(), CPlotSpecification::getItems(), CPlotItem::getNumChannels(), CDataObject::getObjectName(), CPlotSpecification::getTaskTypes(), CPlotItem::getType(), havePlotList(), CPlotSpecification::isActive(), CPlotDataChannelSpec::max, CPlotDataChannelSpec::maxAutoscale, CPlotDataChannelSpec::min, CPlotDataChannelSpec::minAutoscale, mpPlotList, CCopasiXMLInterface::saveElement(), CCopasiXMLInterface::saveParameterGroup(), CDataVector< CType >::size(), CCopasiXMLInterface::startSaveElement(), and CPlotItem::XMLType.
Referenced by save().
|
private |
saves a single image element.
References CCopasiXMLInterface::endSaveElement(), CLPolygon::getListOfElements(), save2DAttributes(), saveCurveElements(), and CCopasiXMLInterface::startSaveElement().
Referenced by saveTransformation2D().
|
private |
References CXMLAttributeList::add(), CXMLAttributeList::erase(), CLPoint::getX(), CLPoint::getY(), and CCopasiXMLInterface::saveElement().
Referenced by saveBoundingBox(), and saveCurve().
|
private |
Saves a single radial gradient definition.
References CXMLAttributeList::add(), CCopasiXMLInterface::endSaveElement(), CLRadialGradient::getCenterX(), CLRadialGradient::getCenterY(), CLRadialGradient::getCenterZ(), CLRadialGradient::getFocalPointX(), CLRadialGradient::getFocalPointY(), CLRadialGradient::getFocalPointZ(), CLRadialGradient::getRadius(), saveGradientAttributes(), saveGradientElements(), CCopasiXMLInterface::startSaveElement(), and CLRelAbsVector::toString().
Referenced by saveRenderInformationDefinitionElements().
|
private |
saves a single rectangle element.
References CXMLAttributeList::add(), CLRectangle::getHeight(), CLRectangle::getRadiusX(), CLRectangle::getRadiusY(), CLRectangle::getWidth(), CLRectangle::getX(), CLRectangle::getY(), CLRectangle::getZ(), save2DAttributes(), CCopasiXMLInterface::saveElement(), and CLRelAbsVector::toString().
Referenced by saveTransformation2D().
|
private |
saves a single image element.
References CCopasiXMLInterface::endSaveElement(), CLRenderCurve::getListOfCurveElements(), save1DAttributes(), saveCurveElements(), and CCopasiXMLInterface::startSaveElement().
Referenced by saveTransformation2D().
|
private |
Saves the attributes that render information objects have in common.
References CXMLAttributeList::add(), CLRenderInformationBase::getBackgroundColor(), CLRenderInformationBase::getKey(), CLRenderInformationBase::getName(), and CLRenderInformationBase::getReferenceRenderInformationKey().
Referenced by saveGlobalRenderInformation(), and saveLocalRenderInformation().
|
private |
Saves color definitions, gradient definitions and line endings.
Saves color definitions , gradient definitions and line endings.
References CCopasiXMLInterface::endSaveElement(), CLRenderInformationBase::getColorDefinition(), CLRenderInformationBase::getGradientDefinition(), CLRenderInformationBase::getLineEnding(), CLRenderInformationBase::getNumColorDefinitions(), CLRenderInformationBase::getNumGradientDefinitions(), CLRenderInformationBase::getNumLineEndings(), saveColorDefinition(), saveLinearGradient(), saveLineEnding(), saveRadialGradient(), and CCopasiXMLInterface::startSaveElement().
Referenced by saveGlobalRenderInformation(), and saveLocalRenderInformation().
|
private |
saves a single render point element.
References CXMLAttributeList::add(), CLRenderCubicBezier::basePoint1_X(), CLRenderCubicBezier::basePoint1_Y(), CLRenderCubicBezier::basePoint1_Z(), CLRenderCubicBezier::basePoint2_X(), CLRenderCubicBezier::basePoint2_Y(), CLRenderCubicBezier::basePoint2_Z(), CCopasiXMLInterface::saveElement(), CLRelAbsVector::toString(), CLRenderPoint::x(), CLRenderPoint::y(), and CLRenderPoint::z().
Referenced by saveCurveElements().
|
private |
saves a single text element.
References CXMLAttributeList::add(), CCopasiXMLInterface::endSaveElement(), CLText::getText(), CLText::getX(), CLText::getY(), CLText::getZ(), save1DAttributes(), CCopasiXMLInterface::saveData(), CCopasiXMLInterface::startSaveElement(), and CLRelAbsVector::toString().
Referenced by saveTransformation2D().
|
private |
Save the list of reports.
References CXMLAttributeList::add(), CCopasiXMLInterface::endSaveElement(), CXMLAttributeList::erase(), CReportDefinition::getBodyAddr(), CReportDefinition::getComment(), CReportDefinition::getFooterAddr(), CReportDefinition::getHeaderAddr(), CReportDefinition::getKey(), CDataObject::getObjectName(), CReportDefinition::getPrecision(), CReportDefinition::getSeparator(), CDataString::getStaticString(), CReportDefinition::getTableAddr(), CReportDefinition::getTaskType(), CReportDefinition::getTitle(), haveReportList(), CReportDefinition::isTable(), mpReportList, CCopasiXMLInterface::saveElement(), saveReportSection(), CCopasiXMLInterface::saveXhtml(), CXMLAttributeList::setValue(), CDataVector< CType >::size(), CCopasiXMLInterface::startSaveElement(), and CTaskEnum::TaskXML.
Referenced by save().
|
private |
Save a Report Section such as Header, Body or Footer.
const | std::string & name |
const | std::vector <CCommonName> & section |
References CXMLAttributeList::add(), CCopasiXMLInterface::endSaveElement(), CCopasiXMLInterface::saveElement(), CCopasiXMLInterface::saveXhtml(), CXMLAttributeList::set(), and CCopasiXMLInterface::startSaveElement().
Referenced by saveReportList().
|
private |
Save the SBML reference information
References CXMLAttributeList::add(), CCopasiXMLInterface::endSaveElement(), CXMLAttributeList::erase(), CDirEntry::fileName(), CDataModel::getSBMLFileName(), CDirEntry::isRelativePath(), CDirEntry::makePathRelative(), mpDataModel, CCopasiXMLInterface::mPWD, mSBMLReference, CCopasiXMLInterface::saveElement(), CXMLAttributeList::setValue(), and CCopasiXMLInterface::startSaveElement().
Referenced by save().
|
private |
Adds the attributes common to both style types.
References CXMLAttributeList::add(), CLStyle::createStringFromSet(), CLStyle::getKey(), CLStyle::getNumRoles(), CLStyle::getNumTypes(), CLStyle::getRoleList(), and CLStyle::getTypeList().
Referenced by saveGlobalStyle(), and saveLocalStyle().
|
private |
Saves the elements common to both style types.
References CLStyle::getGroup(), and saveGroupElement().
Referenced by saveGlobalStyle(), and saveLocalStyle().
|
private |
Save the list of tasks.
References CXMLAttributeList::add(), CReport::append(), CReport::confirmOverwrite(), CCopasiXMLInterface::endSaveElement(), CXMLAttributeList::erase(), CReportDefinition::getKey(), CCopasiTask::getKey(), CCopasiTask::getMethod(), CDataObject::getObjectName(), CCopasiTask::getProblem(), CCopasiTask::getReport(), CReport::getReportDefinition(), CCopasiMethod::getSubType(), CReport::getTarget(), CCopasiTask::getType(), haveTaskList(), CDirEntry::isRelativePath(), CCopasiTask::isScheduled(), CCopasiTask::isUpdateModel(), CDirEntry::makePathRelative(), CTaskEnum::MethodXML, mpTaskList, CCopasiXMLInterface::mPWD, CCopasiXMLInterface::saveElement(), CCopasiXMLInterface::saveParameterGroup(), CDataVector< CType >::size(), CCopasiXMLInterface::startSaveElement(), CTaskEnum::TaskXML, and CCopasiMessage::WARNING.
Referenced by save().
|
private |
Saves the attributes for a text element. We make this a template so that we can use it for a group as well as a text element.
References CXMLAttributeList::add(), CLText::ANCHOR_BOTTOM, CLText::ANCHOR_END, CLText::ANCHOR_MIDDLE, CLText::ANCHOR_START, CLText::ANCHOR_TOP, CLText::STYLE_ITALIC, and CLText::WEIGHT_BOLD.
|
private |
Saves a class that is subclasses from Transformation2D. This covers images, curves, rectangles, ellipses, polygons, text elements and groups.
References saveEllipseElement(), saveGroupElement(), saveImageElement(), savePolygonElement(), saveRectangleElement(), saveRenderCurveElement(), and saveRenderTextElement().
Referenced by saveGroupElement().
|
private |
Saves the attributes for a transformation.
References CXMLAttributeList::add(), CLTransformation2D::get2DTransformationString(), CLTransformation::get3DTransformationString(), CLTransformation::is2DTransformation(), CLTransformation::isIdentityMatrix(), and CLTransformation::isSetMatrix().
Referenced by save1DAttributes(), and saveImageElement().
bool CCopasiXML::saveUnitDefinitionList | ( | ) |
Save the Unit Definition list.
References CXMLAttributeList::add(), CCopasiXMLInterface::endSaveElement(), CXMLAttributeList::erase(), CUnit::getExpression(), CUnitDefinition::getKey(), CDataObject::getObjectName(), CUnitDefinition::getSymbol(), CRootContainer::getUnitList(), CModel::getUnitSymbolUsage(), CUnitDefinition::isReadOnly(), mpModel, saveAnnotation(), CCopasiXMLInterface::saveData(), CDataVector< CType >::size(), and CCopasiXMLInterface::startSaveElement().
Referenced by save().
bool CCopasiXML::setDatamodel | ( | CDataModel * | pDataModel | ) |
Set the datamodel.
CDataModel* | pDataModel |
References mpDataModel.
Referenced by CDataModel::loadModel(), CDataModel::saveModel(), and CDataModel::saveModelToString().
bool CCopasiXML::setFunctionList | ( | CDataVectorN< CFunction > * | pFunctionList | ) |
Set the function list.
CopasiVectorN< | CFunction > * pFunctionList |
References mpFunctionList.
Referenced by buildFunctionList(), CFunctionDB::load(), CDataModel::loadModel(), and CFunctionDB::save().
bool CCopasiXML::setGUI | ( | SCopasiXMLGUI * | pGUI | ) |
Set the GUI.
SCopasiXMLGUI | *pGUI |
References mpGUI.
Referenced by CDataModel::loadModel(), CDataModel::saveModel(), and CDataModel::saveModelToString().
bool CCopasiXML::setLayoutList | ( | const CListOfLayouts & | reportList | ) |
Set the layout list.
const | CListOfLayouts & reportList |
References mpLayoutList.
Referenced by CDataModel::saveModel(), and CDataModel::saveModelToString().
bool CCopasiXML::setModel | ( | CModel * | pModel | ) |
Set the model.
CModel | * pModel |
References mpModel.
Referenced by CDataModel::saveModel(), CDataModel::saveModelParameterSets(), and CDataModel::saveModelToString().
bool CCopasiXML::setPlotList | ( | COutputDefinitionVector * | pPlotList | ) |
Set the plot list.
COutputDefinitionVector | * pPlotList |
References mpPlotList.
Referenced by CDataModel::saveModel(), and CDataModel::saveModelToString().
bool CCopasiXML::setReportList | ( | CReportDefinitionVector * | pReportList | ) |
Set the report list.
CReportDefinitionVector | *pReportList |
References mpReportList.
Referenced by CDataModel::saveModel(), and CDataModel::saveModelToString().
bool CCopasiXML::setTaskList | ( | CDataVectorN< CCopasiTask > * | pTaskList | ) |
Set the task list.
CDataVectorN< | CCopasiTask > *pTaskList |
References mpTaskList.
Referenced by CDataModel::saveModel(), and CDataModel::saveModelToString().
|
private |
Remember if we already issued MCXML21
Referenced by saveLayoutList().
|
private |
Pointer to the datamodel
Referenced by buildFunctionList(), load(), saveSBMLReference(), and setDatamodel().
|
private |
Pointer to a vector of functions which has been loaded or is to be saved. The ownership is handed to the user.
Referenced by freeFunctionList(), getFunctionList(), haveFunctionList(), load(), saveFunctionList(), and setFunctionList().
|
private |
|
private |
Pointer to a vector of plots which has been loaded or is to be saved. The ownership is handed to the user.
Referenced by freeLayoutList(), getLayoutList(), haveLayoutList(), load(), saveLayoutList(), and setLayoutList().
|
private |
Pointer to a model which has been loaded or is to be saved. The ownership is handed to the user.
Referenced by fixBuild113(), fixBuild18(), fixBuildBefore104(), freeModel(), getModel(), haveModel(), load(), mergeUnitDefinitions(), saveModel(), saveModelParameterSets(), saveUnitDefinitionList(), and setModel().
|
private |
Pointer to a vector of plots which has been loaded or is to be saved. The ownership is handed to the user.
Referenced by freePlotList(), getPlotList(), havePlotList(), load(), savePlotList(), and setPlotList().
|
private |
Pointer to a vector of reports which has been loaded or is to be saved. The ownership is handed to the user.
Referenced by freeReportList(), getReportList(), haveReportList(), load(), saveReportList(), and setReportList().
|
private |
Pointer to a vector of tasks which has been loaded or is to be saved. The ownership is handed to the user.
Referenced by fixBuild55(), fixBuild81(), freeTaskList(), getTaskList(), haveTaskList(), load(), saveTaskList(), and setTaskList().
|
private |
SBML Reference
Referenced by saveFunctionList(), saveModel(), and saveSBMLReference().