23 #ifndef COPASI_CCopasiXMLInterface
24 #define COPASI_CCopasiXMLInterface
58 const std::string & type =
"CN",
105 DBL(
const char * value);
111 friend std::ostream &
operator << (std::ostream & os,
const DBL & dbl);
158 virtual bool load(std::istream & is,
159 const std::string & relativeTo) = 0;
167 bool load(
const std::string & fileName,
168 const std::string & relativeTo);
176 virtual bool save(std::ostream & os,
177 const std::string & relativeTo) = 0;
185 bool save(
const std::string & fileName,
186 const std::string & relativeTo);
207 static std::string
utf8(
const std::string & str);
215 bool saveData(
const std::string & data);
222 bool saveXhtml(
const std::string & xhtml);
321 template <
class CType>
inline bool add(
const std::string & name,
332 bool add(
const std::string & name,
const C_FLOAT64 & value);
342 template <
class CType>
bool add(
const std::string & name,
346 std::ostringstream Value;
379 bool setName(
const size_t & index,
380 const std::string & name);
387 const std::string &
getName(
const size_t & index)
const;
397 template <
class CType>
inline bool set(
const size_t & index,
398 const std::string & name,
410 template <
class CType>
bool set(
const size_t & index,
411 const std::string & name,
417 std::ostringstream Value;
444 template <
class CType>
inline bool setValue(
const size_t & index,
456 template <
class CType>
bool setValue(
const size_t & index,
460 std::ostringstream Value;
485 const std::string &
getValue(
const size_t & index)
const;
492 bool skip(
const size_t & index);
504 #endif // COPASI_CCopasiXMLInterface
CCopasiVector< CSlider > * getSliderList()
SCopasiXMLGUI(const std::string &name, const CCopasiContainer *pParent=NULL, const std::string &type="CN", const unsigned C_INT32 &flag=CCopasiObject::Container)
friend std::ostream & operator<<(std::ostream &os, const CXMLAttributeList &attr)
bool set(const size_t &index, const std::string &name, const CType &value)
bool setValue(const size_t &index, const CType &value, const CCopasiXMLInterface::EncodingType &encodingType)
friend std::ostream & operator<<(std::ostream &os, const DBL &dbl)
bool saveElement(const std::string &name, CXMLAttributeList &attributeList)
CCopasiVector< CSlider > * mpSliderList
bool startSaveElement(const std::string &name)
bool saveParameterGroup(const std::vector< CCopasiParameter * > &group)
bool saveData(const std::string &data)
const std::string & getValue(const size_t &index) const
bool saveXhtml(const std::string &xhtml)
DBL(const C_FLOAT64 &value=0.0)
const std::string & getName(const size_t &index) const
bool skip(const size_t &index)
bool setValue(const size_t &index, const CType &value)
virtual ~CCopasiXMLInterface()
bool setName(const size_t &index, const std::string &name)
bool set(const size_t &index, const std::string &name, const CType &value, const CCopasiXMLInterface::EncodingType &encodingType)
virtual bool load(std::istream &is, const std::string &relativeTo)=0
std::string getAttribute(const size_t &index) const
Header file of class CCopasiContainer.
bool add(const std::string &name, const CType &value, const CCopasiXMLInterface::EncodingType &encodingType)
std::vector< std::string > mAttributeList
static std::string encode(const std::string &str, const EncodingType &type=standard)
bool endSaveElement(const std::string &name)
std::vector< bool > mSaveList
static std::string utf8(const std::string &str)
virtual bool save(std::ostream &os, const std::string &relativeTo)=0
bool saveParameter(const CCopasiParameter ¶meter)
bool add(const std::string &name, const CType &value)