COPASI API
4.40.278
|
#include <CCopasiXMLInterface.h>
Public Member Functions | |
bool | add (const std::string &name, const C_FLOAT64 &value) |
template<class CType > | |
bool | add (const std::string &name, const CType &value) |
template<class CType > | |
bool | add (const std::string &name, const CType &value, const CCopasiXMLInterface::EncodingType &encodingType) |
CXMLAttributeList () | |
CXMLAttributeList (const CXMLAttributeList &src) | |
bool | erase () |
std::string | getAttribute (const size_t &index) const |
const std::string & | getName (const size_t &index) const |
const std::string & | getValue (const size_t &index) const |
template<class CType > | |
bool | set (const size_t &index, const std::string &name, const CType &value) |
template<class CType > | |
bool | set (const size_t &index, const std::string &name, const CType &value, const CCopasiXMLInterface::EncodingType &encodingType) |
bool | setName (const size_t &index, const std::string &name) |
template<class CType > | |
bool | setValue (const size_t &index, const CType &value) |
template<class CType > | |
bool | setValue (const size_t &index, const CType &value, const CCopasiXMLInterface::EncodingType &encodingType) |
size_t | size () |
bool | skip (const size_t &index) |
~CXMLAttributeList () | |
Private Attributes | |
std::vector< std::string > | mAttributeList |
std::vector< bool > | mSaveList |
Friends | |
std::ostream & | operator<< (std::ostream &os, const CXMLAttributeList &attr) |
A list of XML attributes used by saveElement and startSaveElement.
CXMLAttributeList::CXMLAttributeList | ( | ) |
Constructor.
CXMLAttributeList::CXMLAttributeList | ( | const CXMLAttributeList & | src | ) |
Copy constructor.
const | CXMLAttributeList & src |
CXMLAttributeList::~CXMLAttributeList | ( | ) |
Destructor.
bool CXMLAttributeList::add | ( | const std::string & | name, |
const C_FLOAT64 & | value | ||
) |
Add an attribute to the end of the list. Note: the value will be XML encoded
const | std::string & name |
const | C_FLOAT64 & value |
References add(), and CCopasiXMLInterface::attribute.
|
inline |
Add an attribute to the end of the list. Note: the value will be XML encoded
const | std::string & name |
const | CType & value |
References CCopasiXMLInterface::attribute.
Referenced by add(), CCopasiXML::save(), CCopasiXML::save1DAttributes(), CCopasiXML::save2DAttributes(), CCopasiXML::saveAnnotation(), CCopasiXML::saveArrowHeadAttributes(), CCopasiXML::saveColorDefinition(), CCopasiXML::saveCurve(), CCopasiXML::saveDimensions(), CCopasiXML::saveEllipseElement(), CCopasiXML::saveFunctionList(), CCopasiXML::saveGradientAttributes(), CCopasiXML::saveGradientStop(), CCopasiXML::saveGUI(), CCopasiXML::saveImageElement(), CCopasiXML::saveLayoutList(), CCopasiXML::saveLinearGradient(), CCopasiXML::saveLineEnding(), CCopasiXML::saveLocalStyle(), CCopasiXML::saveModel(), CCopasiXML::saveModelParameter(), CCopasiXML::saveModelParameterSets(), CCopasiXMLInterface::saveParameter(), CCopasiXML::savePlotList(), CCopasiXML::savePosition(), CCopasiXML::saveRadialGradient(), CCopasiXML::saveRectangleElement(), CCopasiXML::saveRenderInformationAttributes(), CCopasiXML::saveRenderPoint(), CCopasiXML::saveRenderTextElement(), CCopasiXML::saveReportList(), CCopasiXML::saveReportSection(), CCopasiXML::saveSBMLReference(), CCopasiXML::saveStyleAttributes(), CCopasiXML::saveTaskList(), CCopasiXML::saveTextAttributes(), CCopasiXML::saveTransformationAttributes(), and CCopasiXML::saveUnitDefinitionList().
|
inline |
Add an attribute to the end of the list. Note: the value will be XML encoded
const | std::string & name |
const | CType & value |
const | CCopasiXMLInterface::EncodingType & encodingType |
References CCopasiXMLInterface::encode(), mAttributeList, and mSaveList.
bool CXMLAttributeList::erase | ( | ) |
Erase the content of the attribute list.
References mAttributeList, and mSaveList.
Referenced by CCopasiXML::saveCurve(), CCopasiXML::saveDimensions(), CCopasiXML::saveFunctionList(), CCopasiXML::saveLayoutList(), CCopasiXML::saveModel(), CCopasiXML::saveModelParameterSets(), CCopasiXML::savePlotList(), CCopasiXML::savePosition(), CCopasiXML::saveReportList(), CCopasiXML::saveSBMLReference(), CCopasiXML::saveTaskList(), and CCopasiXML::saveUnitDefinitionList().
std::string CXMLAttributeList::getAttribute | ( | const size_t & | index | ) | const |
Retrieve the indexed attribute (' name="value"' or '' if skipped).
const | size_t & index |
References mAttributeList, and mSaveList.
const std::string & CXMLAttributeList::getName | ( | const size_t & | index | ) | const |
Retrieve the name of the indexed attribute.
const | size_t & index |
References mAttributeList.
const std::string & CXMLAttributeList::getValue | ( | const size_t & | index | ) | const |
Retrieve the value of the indexed attribute.
const | size_t & index |
References mAttributeList.
|
inline |
Set the name and value of the indexed attribute Note: the value will be XML encoded
const | size_t & index |
const | std::string & name |
const | CType & value |
References CCopasiXMLInterface::attribute.
Referenced by CCopasiXML::saveReportSection().
|
inline |
Set the name and value of the indexed attribute Note: the value will be XML encoded
const | size_t & index |
const | std::string & name |
const | CType & value |
const | CCopasiXMLInterface::EncodingType & encodingType |
References CCopasiXMLInterface::encode(), mAttributeList, and mSaveList.
bool CXMLAttributeList::setName | ( | const size_t & | index, |
const std::string & | name | ||
) |
Set the name of the indexed attribute
const | size_t & index |
const | std::string & name |
References mAttributeList.
|
inline |
Set the value of the indexed attribute Note: the value will be XML encoded
const | size_t & index |
const | CType & value |
References CCopasiXMLInterface::attribute.
Referenced by CCopasiXML::saveAnnotation(), CCopasiXML::saveFunctionList(), CCopasiXML::saveGUI(), CCopasiXML::saveModel(), CCopasiXML::saveModelParameterSets(), CCopasiXML::saveReportList(), and CCopasiXML::saveSBMLReference().
|
inline |
Set the value of the indexed attribute Note: the value will be XML encoded
const | size_t & index |
const | CType & value |
const | CCopasiXMLInterface::EncodingType & encodingType |
References CCopasiXMLInterface::encode(), mAttributeList, and mSaveList.
size_t CXMLAttributeList::size | ( | ) |
bool CXMLAttributeList::skip | ( | const size_t & | index | ) |
Set whether the indexed attribute shall be skipped during save.
const | size_t & index |
References mSaveList.
Referenced by CCopasiXML::saveModel(), and CCopasiXMLInterface::saveParameter().
|
friend |
|
private |
The attribute list.
Referenced by add(), erase(), getAttribute(), getName(), getValue(), set(), setName(), setValue(), and size().
|
private |
The list whether an attribute is to be saved.
Referenced by add(), erase(), getAttribute(), set(), setValue(), and skip().