#include <CCopasiXMLInterface.h>
|
| CCopasiXMLInterface () |
|
bool | load (const std::string &fileName, const std::string &relativeTo) |
|
virtual bool | load (std::istream &is, const std::string &relativeTo)=0 |
|
bool | save (const std::string &fileName, const std::string &relativeTo) |
|
virtual bool | save (std::ostream &os, const std::string &relativeTo)=0 |
|
virtual | ~CCopasiXMLInterface () |
|
◆ EncodingType
Enumeration of encoding type.
Enumerator |
---|
none | |
standard | |
attribute | |
character | |
◆ CCopasiXMLInterface()
CCopasiXMLInterface::CCopasiXMLInterface |
( |
| ) |
|
◆ ~CCopasiXMLInterface()
CCopasiXMLInterface::~CCopasiXMLInterface |
( |
| ) |
|
|
virtual |
◆ encode()
std::string CCopasiXMLInterface::encode |
( |
const std::string & |
str, |
|
|
const EncodingType & |
type = standard |
|
) |
| |
|
static |
Encode a given string to a valid XML string
- Parameters
-
- Returns
- std::string encoded
References attribute, character, encodeATTRIBUTE(), encodeCHARACTER(), encodeNONE(), encodeSTD(), none, and standard.
Referenced by CXMLAttributeList::add(), CMathMl::fixName(), CXMLParser::onCharacterData(), MiriamAnnotationHandler::processEnd(), UnsupportedAnnotationHandler::processEnd(), CommentHandler::processStart(), MiriamAnnotationHandler::processStart(), UnsupportedAnnotationHandler::processStart(), saveData(), CXMLAttributeList::set(), and CXMLAttributeList::setValue().
◆ endSaveElement()
bool CCopasiXMLInterface::endSaveElement |
( |
const std::string & |
name | ) |
|
|
protected |
End saving an XML element to the ostream started by startSaveElement.
- Parameters
-
- Returns
- bool success
References mIndent, and mpOstream.
Referenced by CCopasiXML::save(), CCopasiXML::saveAnnotation(), CCopasiXML::saveBoundingBox(), CCopasiXML::saveCurve(), CCopasiXML::saveCurveElements(), CCopasiXML::saveFunctionList(), CCopasiXML::saveGlobalRenderInformation(), CCopasiXML::saveGlobalStyle(), CCopasiXML::saveGroupElement(), CCopasiXML::saveGUI(), CCopasiXML::saveLayoutList(), CCopasiXML::saveLinearGradient(), CCopasiXML::saveLineEnding(), CCopasiXML::saveListOfGlobalRenderInformation(), CCopasiXML::saveListOfLocalRenderInformation(), CCopasiXML::saveLocalRenderInformation(), CCopasiXML::saveLocalStyle(), CCopasiXML::saveModel(), CCopasiXML::saveModelParameter(), CCopasiXML::saveModelParameterSets(), saveParameter(), CCopasiXML::savePlotList(), CCopasiXML::savePolygonElement(), CCopasiXML::saveRadialGradient(), CCopasiXML::saveRenderCurveElement(), CCopasiXML::saveRenderInformationDefinitionElements(), CCopasiXML::saveRenderTextElement(), CCopasiXML::saveReportList(), CCopasiXML::saveReportSection(), CCopasiXML::saveSBMLReference(), CCopasiXML::saveTaskList(), and CCopasiXML::saveUnitDefinitionList().
◆ load() [1/2]
bool CCopasiXMLInterface::load |
( |
const std::string & |
fileName, |
|
|
const std::string & |
relativeTo |
|
) |
| |
◆ load() [2/2]
virtual bool CCopasiXMLInterface::load |
( |
std::istream & |
is, |
|
|
const std::string & |
relativeTo |
|
) |
| |
|
pure virtual |
◆ save() [1/2]
bool CCopasiXMLInterface::save |
( |
const std::string & |
fileName, |
|
|
const std::string & |
relativeTo |
|
) |
| |
◆ save() [2/2]
virtual bool CCopasiXMLInterface::save |
( |
std::ostream & |
os, |
|
|
const std::string & |
relativeTo |
|
) |
| |
|
pure virtual |
◆ saveData()
bool CCopasiXMLInterface::saveData |
( |
const std::string & |
data | ) |
|
|
protected |
◆ saveElement()
bool CCopasiXMLInterface::saveElement |
( |
const std::string & |
name, |
|
|
CXMLAttributeList & |
attributeList |
|
) |
| |
|
protected |
Save an XML element to the ostream
- Parameters
-
- Returns
- bool success
References mIndent, and mpOstream.
Referenced by CCopasiXML::saveColorDefinition(), CCopasiXML::saveDimensions(), CCopasiXML::saveEllipseElement(), CCopasiXML::saveFunctionList(), CCopasiXML::saveGradientStop(), CCopasiXML::saveGUI(), CCopasiXML::saveImageElement(), CCopasiXML::saveLayoutList(), CCopasiXML::saveModel(), CCopasiXML::saveModelParameter(), saveParameter(), CCopasiXML::savePlotList(), CCopasiXML::savePosition(), CCopasiXML::saveRectangleElement(), CCopasiXML::saveRenderPoint(), CCopasiXML::saveReportList(), CCopasiXML::saveReportSection(), CCopasiXML::saveSBMLReference(), and CCopasiXML::saveTaskList().
◆ saveParameter()
Save a Parameter.
- Parameters
-
- Returns
- bool success
References CXMLAttributeList::add(), CCopasiParameter::BOOL, C_FLOAT64, C_INT32, CCopasiParameter::CN, CCopasiParameter::DOUBLE, endSaveElement(), CCopasiParameter::EXPRESSION, CCopasiParameter::FILE, CDataObject::getObjectName(), CCopasiParameter::getType(), CCopasiParameter::getValue(), CCopasiParameter::GROUP, CCopasiParameter::INT, CCopasiParameter::INVALID, CDirEntry::isRelativePath(), CCopasiParameter::KEY, CDirEntry::makePathRelative(), mPWD, saveData(), saveElement(), saveParameterGroup(), CXMLAttributeList::skip(), startSaveElement(), CCopasiParameter::STRING, CCopasiParameter::UDOUBLE, CCopasiParameter::UINT, CCopasiMessage::WARNING, and CCopasiParameter::XMLType.
Referenced by saveParameterGroup().
◆ saveParameterGroup()
bool CCopasiXMLInterface::saveParameterGroup |
( |
const std::vector< CCopasiParameter * > & |
group | ) |
|
|
protected |
◆ saveXhtml()
bool CCopasiXMLInterface::saveXhtml |
( |
const std::string & |
xhtml | ) |
|
|
protected |
◆ startSaveElement() [1/2]
bool CCopasiXMLInterface::startSaveElement |
( |
const std::string & |
name | ) |
|
|
protected |
Start saving an XML element to the ostream. Call endSaveElement to conclude.
- Parameters
-
- Returns
- bool success
References mIndent, and mpOstream.
Referenced by CCopasiXML::save(), CCopasiXML::saveAnnotation(), CCopasiXML::saveBoundingBox(), CCopasiXML::saveCurve(), CCopasiXML::saveCurveElements(), CCopasiXML::saveFunctionList(), CCopasiXML::saveGlobalRenderInformation(), CCopasiXML::saveGlobalStyle(), CCopasiXML::saveGroupElement(), CCopasiXML::saveGUI(), CCopasiXML::saveLayoutList(), CCopasiXML::saveLinearGradient(), CCopasiXML::saveLineEnding(), CCopasiXML::saveListOfGlobalRenderInformation(), CCopasiXML::saveListOfLocalRenderInformation(), CCopasiXML::saveLocalRenderInformation(), CCopasiXML::saveLocalStyle(), CCopasiXML::saveModel(), CCopasiXML::saveModelParameter(), CCopasiXML::saveModelParameterSets(), saveParameter(), CCopasiXML::savePlotList(), CCopasiXML::savePolygonElement(), CCopasiXML::saveRadialGradient(), CCopasiXML::saveRenderCurveElement(), CCopasiXML::saveRenderInformationDefinitionElements(), CCopasiXML::saveRenderTextElement(), CCopasiXML::saveReportList(), CCopasiXML::saveReportSection(), CCopasiXML::saveSBMLReference(), CCopasiXML::saveTaskList(), and CCopasiXML::saveUnitDefinitionList().
◆ startSaveElement() [2/2]
bool CCopasiXMLInterface::startSaveElement |
( |
const std::string & |
name, |
|
|
CXMLAttributeList & |
attributeList |
|
) |
| |
|
protected |
Start saving an XML element to the ostream. Call endSaveElement to conclude.
- Parameters
-
- Returns
- bool success
References mIndent, and mpOstream.
◆ utf8()
std::string CCopasiXMLInterface::utf8 |
( |
const std::string & |
str | ) |
|
|
static |
Encode a given string to a valid XML string
- Parameters
-
- Returns
- std::string encoded Encode a given string to a utf-8 string
- Parameters
-
- Returns
- std::string encoded
Referenced by CMIRIAMResourceObject::unescapeId().
◆ mIndent
std::string CCopasiXMLInterface::mIndent |
|
protected |
◆ mpIstream
std::istream* CCopasiXMLInterface::mpIstream |
|
protected |
◆ mpOstream
std::ostream* CCopasiXMLInterface::mpOstream |
|
protected |
◆ mPWD
std::string CCopasiXMLInterface::mPWD |
|
protected |
The documentation for this class was generated from the following files: