copasi API  0.1
Public Member Functions | Friends
CXMLAttributeList Class Reference

#include <CCopasiXMLInterface.h>

List of all members.

Public Member Functions

 CXMLAttributeList ()
 CXMLAttributeList (const CXMLAttributeList &src)
 ~CXMLAttributeList ()
bool erase ()
template<class CType >
bool add (const std::string &name, const CType &value)
bool add (const std::string &name, const C_FLOAT64 &value)
template<class CType >
bool add (const std::string &name, const CType &value, const CCopasiXMLInterface::EncodingType &encodingType)
unsigned C_INT32 size ()
bool setName (const unsigned C_INT32 &index, const std::string &name)
const std::string & getName (const unsigned C_INT32 &index) const
template<class CType >
bool set (const unsigned C_INT32 &index, const std::string &name, const CType &value)
template<class CType >
bool set (const unsigned C_INT32 &index, const std::string &name, const CType &value, const CCopasiXMLInterface::EncodingType &encodingType)
template<class CType >
bool setValue (const unsigned C_INT32 &index, const CType &value)
template<class CType >
bool setValue (const unsigned C_INT32 &index, const CType &value, const CCopasiXMLInterface::EncodingType &encodingType)
const std::string & getValue (const unsigned C_INT32 &index) const
bool skip (const unsigned C_INT32 &index)
std::string getAttribute (const unsigned C_INT32 &index) const

Friends

std::ostream & operator<< (std::ostream &os, const CXMLAttributeList &attr)

Detailed Description

A list of XML attributes used by saveElement and startSaveElement.


Constructor & Destructor Documentation

CXMLAttributeList::CXMLAttributeList ( )

Constructor.

CXMLAttributeList::CXMLAttributeList ( const CXMLAttributeList src)

Copy constructor.

Parameters:
constCXMLAttributeList & src
CXMLAttributeList::~CXMLAttributeList ( )

Destructor.


Member Function Documentation

template<class CType >
bool CXMLAttributeList::add ( const std::string &  name,
const CType &  value 
) [inline]

Add an attribute to the end of the list. Note: the value will be XML encoded

Parameters:
conststd::string & name
constCType & value
Returns:
bool success
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

Parameters:
conststd::string & name
constC_FLOAT64 & value
Returns:
bool success
template<class CType >
bool CXMLAttributeList::add ( const std::string &  name,
const CType &  value,
const CCopasiXMLInterface::EncodingType encodingType 
) [inline]

Add an attribute to the end of the list. Note: the value will be XML encoded

Parameters:
conststd::string & name
constCType & value
constCCopasiXMLInterface::EncodingType & encodingType
Returns:
bool success
bool CXMLAttributeList::erase ( )

Erase the content of the attribute list.

Returns:
bool success
std::string CXMLAttributeList::getAttribute ( const unsigned C_INT32 &  index) const

Retrieve the indexed attribute (' name="value"' or '' if skipped).

Parameters:
constunsigned C_INT32 & index
Returns:
std::string attribute
const std::string & CXMLAttributeList::getName ( const unsigned C_INT32 &  index) const

Retrieve the name of the indexed attribute.

Parameters:
constunsigned C_INT32 & index
Returns:
const std::string & name
const std::string & CXMLAttributeList::getValue ( const unsigned C_INT32 &  index) const

Retrieve the value of the indexed attribute.

Parameters:
constunsigned C_INT32 & index
Returns:
const std::string & value
template<class CType >
bool CXMLAttributeList::set ( const unsigned C_INT32 &  index,
const std::string &  name,
const CType &  value 
) [inline]

Set the name and value of the indexed attribute Note: the value will be XML encoded

Parameters:
constunsigned C_INT32 & index
conststd::string & name
constCType & value
Returns:
bool success
template<class CType >
bool CXMLAttributeList::set ( const unsigned C_INT32 &  index,
const std::string &  name,
const CType &  value,
const CCopasiXMLInterface::EncodingType encodingType 
) [inline]

Set the name and value of the indexed attribute Note: the value will be XML encoded

Parameters:
constunsigned C_INT32 & index
conststd::string & name
constCType & value
constCCopasiXMLInterface::EncodingType & encodingType
Returns:
bool success
bool CXMLAttributeList::setName ( const unsigned C_INT32 &  index,
const std::string &  name 
)

Set the name of the indexed attribute

Parameters:
constunsigned C_INT32 & index
conststd::string & name
Returns:
bool success
template<class CType >
bool CXMLAttributeList::setValue ( const unsigned C_INT32 &  index,
const CType &  value 
) [inline]

Set the value of the indexed attribute Note: the value will be XML encoded

Parameters:
constunsigned C_INT32 & index
constCType & value
Returns:
bool success
template<class CType >
bool CXMLAttributeList::setValue ( const unsigned C_INT32 &  index,
const CType &  value,
const CCopasiXMLInterface::EncodingType encodingType 
) [inline]

Set the value of the indexed attribute Note: the value will be XML encoded

Parameters:
constunsigned C_INT32 & index
constCType & value
constCCopasiXMLInterface::EncodingType & encodingType
Returns:
bool success
unsigned C_INT32 CXMLAttributeList::size ( )

Retrieve the size of the list.

Returns:
unsigned C_INT32 size
bool CXMLAttributeList::skip ( const unsigned C_INT32 &  index)

Set whether the indexed attribute shall be skipped during save.

Parameters:
constunsigned C_INT32 & index
Returns:
bool success

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const CXMLAttributeList attr 
) [friend]

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines