COPASI API  4.16.103
Classes | Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | List of all members
CCopasiXMLParser Class Reference

#include <CCopasiXMLParser.h>

Inheritance diagram for CCopasiXMLParser:
Inheritance graph
[legend]
Collaboration diagram for CCopasiXMLParser:
Collaboration graph
[legend]

Classes

class  AdditionalGOElement
 
class  AssignmentElement
 
class  BodyElement
 
class  BoundingBoxElement
 
class  CallParameterElement
 
class  ChannelSpecElement
 
class  CharacterDataElement
 
class  ColorDefinitionElement
 
class  CommentElement
 
class  CompartmentElement
 
class  CompartmentGlyphElement
 
class  ComplexElement
 
class  ConstantElement
 
class  COPASIElement
 
class  CurveElement
 
class  CurveElementElement
 
class  EllipseElement
 
class  EventElement
 
class  FooterElement
 
class  FunctionElement
 
class  GlobalRenderInformationElement
 
class  GlobalStyleElement
 
class  GradientStopElement
 
class  GroupElement
 
class  GUIElement
 
class  HeaderElement
 
class  ImageElement
 
class  InitialStateElement
 
class  KineticLawElement
 
class  LayoutElement
 
class  LinearGradientElement
 
class  LineEndingElement
 
class  ListOfAdditionalGOsElement
 
class  ListOfAssignmentsElement
 
class  ListOfCallParametersElement
 
class  ListOfChannelsElement
 
class  ListOfColorDefinitionsElement
 
class  ListOfCompartmentGlyphsElement
 
class  ListOfCompartmentsElement
 
class  ListOfConstantsElement
 
class  ListOfCurveElementsElement
 
class  ListOfEventsElement
 
class  ListOfFunctionsElement
 
class  ListOfGlobalRenderInformationElement
 
class  ListOfGlobalStylesElement
 
class  ListOfGradientDefinitionsElement
 
class  ListOfLayoutsElement
 
class  ListOfLineEndingsElement
 
class  ListOfLocalRenderInformationElement
 
class  ListOfLocalStylesElement
 
class  ListOfMetabGlyphsElement
 
class  ListOfMetaboliteReferenceGlyphsElement
 
class  ListOfMetabolitesElement
 
class  ListOfModelParameterSetsElement
 
class  ListOfModelValuesElement
 
class  ListOfModifiersElement
 
class  ListOfParameterDescriptionsElement
 
class  ListOfPlotItemsElement
 
class  ListOfPlotsElement
 
class  ListOfProductsElement
 
class  ListOfReactionGlyphsElement
 
class  ListOfReactionsElement
 
class  ListOfReportsElement
 
class  ListOfSlidersElement
 
class  ListOfSubstratesElement
 
class  ListOfTasksElement
 
class  ListOfTextGlyphsElement
 
class  ListOfUnsupportedAnnotationsElement
 
class  LocalRenderInformationElement
 
class  LocalStyleElement
 
class  MathMLElement
 
class  MetaboliteElement
 
class  MetaboliteGlyphElement
 
class  MetaboliteReferenceGlyphElement
 
class  MethodElement
 
class  MiriamAnnotationElement
 
class  ModelElement
 
class  ModelParameterElement
 
class  ModelParameterGroupElement
 
class  ModelParameterSetElement
 
class  ModelValueElement
 
class  ModifierElement
 
class  ObjectElement
 
class  ParameterDescriptionElement
 
class  ParameterElement
 
class  ParameterGroupElement
 
class  ParameterTextElement
 
class  PlotItemElement
 
class  PlotSpecificationElement
 
class  PolygonElement
 
class  ProductElement
 
class  RadialGradientElement
 
class  ReactionElement
 
class  ReactionGlyphElement
 
class  RectangleElement
 
class  RenderCurveElement
 
class  ReportElement
 
class  ReportInstanceElement
 
class  SBMLMapElement
 
class  SBMLReferenceElement
 
class  SliderElement
 
class  SourceParameterElement
 
class  StateTemplateElement
 
class  StateTemplateVariableElement
 
class  SubstrateElement
 
class  TableElement
 
class  TaskElement
 
class  TextElement
 
class  TextGlyphElement
 
class  UnknownElement
 
class  UnsupportedAnnotationElement
 

Public Member Functions

 CCopasiXMLParser (CVersion &version)
 
void enableCharacterDataHandler (bool fEnable=true)
 
std::string getCharacterData (const std::string &toBeStripped="", const std::string &join=" ")
 
const CCopasiParameterGroupgetCurrentGroup () const
 
CListOfLayoutsgetLayoutList () const
 
CModelgetModel () const
 
const CCopasiObjectgetObjectFromName (const std::string &cn) const
 
COutputDefinitionVectorgetPlotList () const
 
CReportDefinitionVectorgetReportList () const
 
CCopasiVectorN< CCopasiTask > * getTaskList () const
 
virtual void onCharacterData (const XML_Char *pszData, int nLength)
 
virtual void onEndElement (const XML_Char *pszName)
 
virtual void onSkippedEntityHandler (const XML_Char *entityName, int is_parameter_entity)
 
virtual void onStartElement (const XML_Char *pszName, const XML_Char **papszAttrs)
 
void popElementHandler ()
 
void pushElementHandler (CXMLElementHandler< CCopasiXMLParser, SCopasiXMLParserCommon > *elementHandler)
 
void setDatamodel (CCopasiDataModel *pDataModel)
 
void setFunctionList (CCopasiVectorN< CFunction > *pFunctionList)
 
void setGUI (SCopasiXMLGUI *pGUI)
 
void setLayoutList (CListOfLayouts *pLayoutList)
 
 ~CCopasiXMLParser ()
 
- Public Member Functions inherited from CExpat
 CExpat ()
 
virtual void onComment (const XML_Char *pszData)
 
virtual void onDefault (const XML_Char *pszData, int nLength)
 
virtual void onEndCdataSection ()
 
virtual void onEndDoctypeDecl ()
 
virtual void onEndNamespaceDecl (const XML_Char *pszPrefix)
 
virtual bool onExternalEntityRef (const XML_Char *pszContext, const XML_Char *pszBase, const XML_Char *pszSystemID, const XML_Char *pszPublicID)
 
virtual void onProcessingInstruction (const XML_Char *pszTarget, const XML_Char *pszData)
 
virtual void onStartCdataSection ()
 
virtual void onStartDoctypeDecl (const XML_Char *pszDoctypeName, const XML_Char *pszSysID, const XML_Char *pszPubID, bool fHasInternalSubset)
 
virtual void onStartNamespaceDecl (const XML_Char *pszPrefix, const XML_Char *pszURI)
 
virtual bool onUnknownEncoding (const XML_Char *pszName, XML_Encoding *pInfo)
 
virtual void onXmlDecl (const XML_Char *pszVersion, const XML_Char *pszEncoding, bool fStandalone)
 
virtual ~CExpat ()
 
- Public Member Functions inherited from CExpatTemplate< CExpat >
 CExpatTemplate ()
 
bool create (const XML_Char *pszEncoding=NULL, const XML_Char *pszSep=NULL)
 
void destroy ()
 
void enableCdataSectionHandler (bool fEnable=true)
 
void enableCharacterDataHandler (bool fEnable=true)
 
void enableCommentHandler (bool fEnable=true)
 
void enableDefaultHandler (bool fEnable=true, bool fExpand=true)
 
void enableDoctypeDeclHandler (bool fEnable=true)
 
void enableElementHandler (bool fEnable=true)
 
void enableEndCdataSectionHandler (bool fEnable=true)
 
void enableEndDoctypeDeclHandler (bool fEnable=true)
 
void enableEndElementHandler (bool fEnable=true)
 
void enableEndNamespaceDeclHandler (bool fEnable=true)
 
void enableExternalEntityRefHandler (bool fEnable=true)
 
void enableNamespaceDeclHandler (bool fEnable=true)
 
void enableProcessingInstructionHandler (bool fEnable=true)
 
void enableSkippedEntityHandler (bool fEnable=true)
 
void enableStartCdataSectionHandler (bool fEnable=true)
 
void enableStartDoctypeDeclHandler (bool fEnable=true)
 
void enableStartElementHandler (bool fEnable=true)
 
void enableStartNamespaceDeclHandler (bool fEnable=true)
 
void enableUnknownEncodingHandler (bool fEnable=true)
 
void enableXmlDeclHandler (bool fEnable=true)
 
const char * getAttributeValue (const std::string &name, const char **attributes, const bool &required=true) const
 
const char * getAttributeValue (const std::string &name, const char **attributes, const char *def) const
 
voidgetBuffer (int nLength)
 
int getCurrentByteCount ()
 
long getCurrentByteIndex ()
 
int getCurrentColumnNumber ()
 
int getCurrentLineNumber () const
 
enum XML_Error getErrorCode ()
 
const XML_LChar * getErrorString ()
 
const char * getInputContext (int *pnOffset, int *pnSize)
 
void onCharacterData (const XML_Char *pszData, int nLength)
 
void onComment (const XML_Char *pszData)
 
void onDefault (const XML_Char *pszData, int nLength)
 
void onEndCdataSection ()
 
void onEndDoctypeDecl ()
 
void onEndElement (const XML_Char *pszName)
 
void onEndNamespaceDecl (const XML_Char *pszPrefix)
 
bool onExternalEntityRef (const XML_Char *pszContext, const XML_Char *pszBase, const XML_Char *pszSystemID, const XML_Char *pszPublicID)
 
void onProcessingInstruction (const XML_Char *pszTarget, const XML_Char *pszData)
 
void onSkippedEntityHandler (const XML_Char *, int)
 
void onStartCdataSection ()
 
void onStartDoctypeDecl (const XML_Char *pszDoctypeName, const XML_Char *pszSysID, const XML_Char *pszPubID, bool fHasInternalSubset)
 
void onStartElement (const XML_Char *pszName, const XML_Char **papszAttrs)
 
void onStartNamespaceDecl (const XML_Char *pszPrefix, const XML_Char *pszURI)
 
bool onUnknownEncoding (const XML_Char *pszName, XML_Encoding *pInfo)
 
void onXmlDecl (const XML_Char *pszVersion, const XML_Char *pszEncoding, bool fStandalone)
 
bool parse (const char *pszBuffer, int nLength=-1, bool fIsFinal=true)
 
bool parseBuffer (int nLength, bool fIsFinal=true)
 
 ~CExpatTemplate ()
 

Public Attributes

CharacterDataElement mCharacterDataElement
 
CommentElement mCommentElement
 
ListOfUnsupportedAnnotationsElement mListOfUnsupportedAnnotationsElement
 
MiriamAnnotationElement mMiriamAnnotationElement
 
UnknownElement mUnknownElement
 

Private Member Functions

 CCopasiXMLParser ()
 

Private Attributes

std::string mCharacterData
 
CCopasiXMLInterface::EncodingType mCharacterDataEncoding
 
SCopasiXMLParserCommon mCommon
 
std::stack< CXMLElementHandler
< CCopasiXMLParser,
SCopasiXMLParserCommon > * > 
mElementHandlerStack
 

Additional Inherited Members

- Static Public Member Functions inherited from CExpatTemplate< CExpat >
static const XML_LChar * getErrorString (enum XML_Error nError)
 
static const XML_LChar * getExpatVersion ()
 
static void getExpatVersion (int &nMajor, int &nMinor, int &nMicro)
 
static bool toBool (const char *attribute)
 
- Protected Member Functions inherited from CExpatTemplate< CExpat >
void onPostCreate ()
 
- Static Protected Member Functions inherited from CExpatTemplate< CExpat >
static void characterDataHandler (void *pUserData, const XML_Char *pszData, int nLength)
 
static void commentHandler (void *pUserData, const XML_Char *pszData)
 
static void defaultHandler (void *pUserData, const XML_Char *pszData, int nLength)
 
static void endCdataSectionHandler (void *pUserData)
 
static void endDoctypeDeclHandler (void *pUserData)
 
static void endElementHandler (void *pUserData, const XML_Char *pszName)
 
static void endNamespaceDeclHandler (void *pUserData, const XML_Char *pszPrefix)
 
static int externalEntityRefHandler (XML_Parser pUserData, const XML_Char *pszContext, const XML_Char *pszBase, const XML_Char *pszSystemID, const XML_Char *pszPublicID)
 
static void processingInstructionHandler (void *pUserData, const XML_Char *pszTarget, const XML_Char *pszData)
 
static void skippedEntityHandler (void *pUserData, const XML_Char *entityName, int is_parameter_entity)
 
static void startCdataSectionHandler (void *pUserData)
 
static void startDoctypeDeclHandler (void *pUserData, const XML_Char *pszDoctypeName, const XML_Char *pszSysID, const XML_Char *pszPubID, int nHasInternalSubset)
 
static void startElementHandler (void *pUserData, const XML_Char *pszName, const XML_Char **papszAttrs)
 
static void startNamespaceDeclHandler (void *pUserData, const XML_Char *pszPrefix, const XML_Char *pszURI)
 
static int unknownEncodingHandler (void *pUserData, const XML_Char *pszName, XML_Encoding *pInfo)
 
static void xmlDeclHandler (void *pUserData, const XML_Char *pszVersion, const XML_Char *pszEncoding, int nStandalone)
 
- Protected Attributes inherited from CExpatTemplate< CExpat >
XML_Parser mParser
 

Detailed Description

Definition at line 315 of file CCopasiXMLParser.h.

Constructor & Destructor Documentation

CCopasiXMLParser::CCopasiXMLParser ( )
private

Constructor

CCopasiXMLParser::CCopasiXMLParser ( CVersion version)

Public constructor

Parameters
CVersion& version

Definition at line 200 of file CCopasiXMLParser.cpp.

References CExpatTemplate< CExpat >::create(), CExpatTemplate< CExpat >::enableElementHandler(), mCommon, mElementHandlerStack, SCopasiXMLParserCommon::mParameterGroupLevel, SCopasiXMLParserCommon::pCompartmentGlyph, SCopasiXMLParserCommon::pCurrentLayout, SCopasiXMLParserCommon::pCurve, SCopasiXMLParserCommon::pFunction, SCopasiXMLParserCommon::pFunctionList, SCopasiXMLParserCommon::pGeneralGlyph, SCopasiXMLParserCommon::pGradient, SCopasiXMLParserCommon::pGroup, SCopasiXMLParserCommon::pGUI, SCopasiXMLParserCommon::pLayoutList, SCopasiXMLParserCommon::pLineEnding, SCopasiXMLParserCommon::pLineSegment, SCopasiXMLParserCommon::pListOfCurveElements, SCopasiXMLParserCommon::pMetaboliteGlyph, SCopasiXMLParserCommon::pMetaboliteReferenceGlyph, SCopasiXMLParserCommon::pModel, SCopasiXMLParserCommon::pPlotList, SCopasiXMLParserCommon::pReactionGlyph, SCopasiXMLParserCommon::pRenderInformation, SCopasiXMLParserCommon::pReport, SCopasiXMLParserCommon::pReportList, SCopasiXMLParserCommon::pStyle, SCopasiXMLParserCommon::pTaskList, SCopasiXMLParserCommon::pText, SCopasiXMLParserCommon::pTextGlyph, SCopasiXMLParserCommon::pVersion, and SCopasiXMLParserCommon::UnmappedKeyParameters.

200  :
201  CExpat(),
202  mCommon(),
203  mCharacterData(),
206  mUnknownElement(*this, this->mCommon),
207  mCharacterDataElement(*this, this->mCommon),
209  mCommentElement(*this, this->mCommon),
210  mMiriamAnnotationElement(*this, this->mCommon)
211  // Attributes
212 {
213  create();
214 
215  mElementHandlerStack.push(new COPASIElement(*this, mCommon));
216 
217  // mCommon.pParser = this;
218  mCommon.pVersion = & version;
219  mCommon.pModel = NULL;
220  mCommon.pFunctionList = NULL;
221  mCommon.pFunction = NULL;
222  mCommon.pTaskList = NULL;
223  mCommon.pReportList = NULL;
224  mCommon.pReport = NULL;
226  mCommon.pGUI = NULL;
227 
228  mCommon.pPlotList = NULL;
230 
231  mCommon.pLayoutList = NULL;
232  mCommon.pCurrentLayout = NULL;
233  mCommon.pCompartmentGlyph = NULL;
234  mCommon.pMetaboliteGlyph = NULL;
235  mCommon.pReactionGlyph = NULL;
236  mCommon.pTextGlyph = NULL;
237  //mCommon.pAdditionalGO = NULL;
238  mCommon.pGeneralGlyph = NULL;
239  mCommon.pCurve = NULL;
240  mCommon.pLineSegment = NULL;
243  mCommon.pGradient = NULL;
244  mCommon.pLineEnding = NULL;
245  mCommon.pStyle = NULL;
246  mCommon.pGroup = NULL;
247  mCommon.pText = NULL;
249 
250  enableElementHandler(true);
251 }
CLLineEnding * pLineEnding
CCopasiVectorN< CFunction > * pFunctionList
CCopasiVectorN< CCopasiTask > * pTaskList
SCopasiXMLParserCommon mCommon
CLMetabGlyph * pMetaboliteGlyph
CCopasiXMLInterface::EncodingType mCharacterDataEncoding
CListOfLayouts * pLayoutList
UnknownElement mUnknownElement
CExpat()
Definition: CExpat.cpp:31
void enableElementHandler(bool fEnable=true)
Definition: CExpat.h:233
std::stack< CXMLElementHandler< CCopasiXMLParser, SCopasiXMLParserCommon > * > mElementHandlerStack
COutputDefinitionVector * pPlotList
bool create(const XML_Char *pszEncoding=NULL, const XML_Char *pszSep=NULL)
Definition: CExpat.h:79
CLGradientBase * pGradient
CLCompartmentGlyph * pCompartmentGlyph
CLRenderInformationBase * pRenderInformation
CLGeneralGlyph * pGeneralGlyph
CReportDefinitionVector * pReportList
CLMetabReferenceGlyph * pMetaboliteReferenceGlyph
CharacterDataElement mCharacterDataElement
CLLineSegment * pLineSegment
MiriamAnnotationElement mMiriamAnnotationElement
std::string mCharacterData
std::vector< CLRenderPoint * > * pListOfCurveElements
ListOfUnsupportedAnnotationsElement mListOfUnsupportedAnnotationsElement
CommentElement mCommentElement
CReportDefinition * pReport
CLReactionGlyph * pReactionGlyph
std::vector< std::string > UnmappedKeyParameters
CCopasiXMLParser::~CCopasiXMLParser ( )

Destructor

Definition at line 253 of file CCopasiXMLParser.cpp.

References mElementHandlerStack.

254 {
255  // We need to destruct the top most element on the stack since it has been
256  // allocated in the constructor.
257  if (mElementHandlerStack.empty())
258  return;
259 
260  while (mElementHandlerStack.size() > 1)
261  mElementHandlerStack.pop();
262 
263  delete mElementHandlerStack.top();
264 }
std::stack< CXMLElementHandler< CCopasiXMLParser, SCopasiXMLParserCommon > * > mElementHandlerStack

Member Function Documentation

void CCopasiXMLParser::enableCharacterDataHandler ( bool  fEnable = true)

Enable/Disable the character data handler

Parameters
boolfEnable (Default: true)

Definition at line 317 of file CCopasiXMLParser.cpp.

References CExpatTemplate< CExpat >::enableCharacterDataHandler(), and mCharacterData.

Referenced by getCharacterData().

318 {
319  mCharacterData.erase();
321 }
std::string mCharacterData
void enableCharacterDataHandler(bool fEnable=true)
Definition: CExpat.h:244
std::string CCopasiXMLParser::getCharacterData ( const std::string &  toBeStripped = "",
const std::string &  join = " " 
)

Retrieve the data. Any sequence of toBeStripped characters is replaced by a single join character. The default is no stripping.

Parameters
conststd::string & toBeStripped (default: "")
conststd::string & join (default: " ")
Returns
std::string data

Definition at line 332 of file CCopasiXMLParser.cpp.

References enableCharacterDataHandler(), and mCharacterData.

334 {
335  std::string tmp(mCharacterData);
336 
337  enableCharacterDataHandler(false); /* Resetting for future calls. */
338 
339  if (toBeStripped == "") return tmp;
340 
341  std::string::size_type Start = tmp.find_first_of(toBeStripped);
342  std::string::size_type End = 0;
343 
344  while (Start != std::string::npos)
345  {
346  End = tmp.find_first_not_of(toBeStripped, Start);
347 
348  tmp.erase(Start, End - Start);
349 
350  if (Start && End != std::string::npos)
351  {
352  tmp.insert(Start, join);
353  Start += join.length();
354  }
355 
356  Start = tmp.find_first_of(toBeStripped, Start);
357  }
358 
359  return tmp;
360 }
void enableCharacterDataHandler(bool fEnable=true)
std::string mCharacterData
const CCopasiParameterGroup * CCopasiXMLParser::getCurrentGroup ( ) const

Retrieve a pointer to the current group if available

Returns
const CCopasiParameterGroup * currentGroup

Definition at line 392 of file CCopasiXMLParser.cpp.

References mCommon, and SCopasiXMLParserCommon::pCurrentParameter.

Referenced by CConfigurationFile::CXML::load().

393 {return dynamic_cast< const CCopasiParameterGroup * >(mCommon.pCurrentParameter);}
SCopasiXMLParserCommon mCommon
CCopasiParameter * pCurrentParameter
CListOfLayouts * CCopasiXMLParser::getLayoutList ( ) const

Retrieve the list of loaded layouts

Returns
CListOfLayouts * pLayoutList

Definition at line 389 of file CCopasiXMLParser.cpp.

References mCommon, and SCopasiXMLParserCommon::pLayoutList.

Referenced by CCopasiXML::load().

390 {return mCommon.pLayoutList;}
SCopasiXMLParserCommon mCommon
CListOfLayouts * pLayoutList
CModel * CCopasiXMLParser::getModel ( ) const

Retrieve the loaded model functions

Returns
CModel * pModel

Definition at line 371 of file CCopasiXMLParser.cpp.

References mCommon, and SCopasiXMLParserCommon::pModel.

Referenced by CCopasiXML::load().

372 {return mCommon.pModel;}
SCopasiXMLParserCommon mCommon
const CCopasiObject * CCopasiXMLParser::getObjectFromName ( const std::string &  cn) const

Retrieve an object by its CN within the context of the parser

Parameters
conststd::string & cn
Returns
const CCopasiObject * pObject

Definition at line 395 of file CCopasiXMLParser.cpp.

References CCopasiContainer::getObject(), CCopasiVectorN< CType >::getObject(), CCopasiObjectName::getRemainder(), mCommon, SCopasiXMLParserCommon::pFunctionList, SCopasiXMLParserCommon::pModel, and SCopasiXMLParserCommon::pTaskList.

396 {
397  const CObjectInterface * pObject = NULL;
399 
400  if (mCommon.pModel &&
401  (pObject = mCommon.pModel->getObject(CN)))
402  return static_cast< const CCopasiObject * >(pObject);
403 
404  if (mCommon.pTaskList &&
405  (pObject = mCommon.pTaskList->getObject(CN)))
406  return static_cast< const CCopasiObject * >(pObject);
407 
408  if (mCommon.pFunctionList &&
409  (pObject = mCommon.pFunctionList->getObject(CN)))
410  return static_cast< const CCopasiObject * >(pObject);
411 
412  return NULL;
413 }
CCopasiVectorN< CFunction > * pFunctionList
CCopasiVectorN< CCopasiTask > * pTaskList
SCopasiXMLParserCommon mCommon
CCopasiObjectName getRemainder() const
virtual const CObjectInterface * getObject(const CCopasiObjectName &name) const
virtual const CObjectInterface * getObject(const CCopasiObjectName &cn) const
COutputDefinitionVector * CCopasiXMLParser::getPlotList ( ) const

Retrieve the list of loaded functions

Returns
COutputDefinitionVector * pPlotList

Definition at line 380 of file CCopasiXMLParser.cpp.

References mCommon, and SCopasiXMLParserCommon::pPlotList.

Referenced by CCopasiXML::load().

381 {return mCommon.pPlotList;}
SCopasiXMLParserCommon mCommon
COutputDefinitionVector * pPlotList
CReportDefinitionVector * CCopasiXMLParser::getReportList ( ) const

Retrieve the list of loaded reports

Returns
CReportDefinitionVector * pReportList

Definition at line 374 of file CCopasiXMLParser.cpp.

References mCommon, and SCopasiXMLParserCommon::pReportList.

Referenced by CCopasiXML::load().

375 {return mCommon.pReportList;}
SCopasiXMLParserCommon mCommon
CReportDefinitionVector * pReportList
CCopasiVectorN< CCopasiTask > * CCopasiXMLParser::getTaskList ( ) const

Retrieve the list of loaded functions

Returns
CCopasiVectorN< CTask > * pTaskList

Definition at line 377 of file CCopasiXMLParser.cpp.

References mCommon, and SCopasiXMLParserCommon::pTaskList.

Referenced by CCopasiXML::load().

378 {return mCommon.pTaskList;}
CCopasiVectorN< CCopasiTask > * pTaskList
SCopasiXMLParserCommon mCommon
void CCopasiXMLParser::onCharacterData ( const XML_Char *  pszData,
int  nLength 
)
virtual

Character data handler

Parameters
constXML_Char *pszData
intnLength

Reimplemented from CExpat.

Definition at line 323 of file CCopasiXMLParser.cpp.

References CCopasiXMLInterface::encode(), mCharacterData, and mCharacterDataEncoding.

325 {
326  std::string Data;
327  Data.append(pszData, nLength);
328 
330 }
CCopasiXMLInterface::EncodingType mCharacterDataEncoding
static std::string encode(const std::string &str, const EncodingType &type=standard)
std::string mCharacterData
void CCopasiXMLParser::onEndElement ( const XML_Char *  pszName)
virtual

End element handler

Parameters
constXML_Char *pszName

Reimplemented from CExpat.

Definition at line 273 of file CCopasiXMLParser.cpp.

References mElementHandlerStack.

274 {
275  if (mElementHandlerStack.size() != 0)
276  mElementHandlerStack.top()->end(pszName);
277  else
278  return;
279 }
std::stack< CXMLElementHandler< CCopasiXMLParser, SCopasiXMLParserCommon > * > mElementHandlerStack
void CCopasiXMLParser::onSkippedEntityHandler ( const XML_Char *  entityName,
int  is_parameter_entity 
)
virtual

Skipped entity handler This is called in two situations: 1) An entity reference is encountered for which no declaration has been read and this is not an error. 2) An internal entity reference is read, but not expanded, because XML_SetDefaultHandler has been called. Note: skipped parameter entities in declarations and skipped general entities in attribute values cannot be reported, because the event would be out of sync with the reporting of the declarations or attribute values

Parameters
constXML_Char *entityName
intis_parameter_entity

Reimplemented from CExpat.

Definition at line 307 of file CCopasiXMLParser.cpp.

References mCharacterData.

309 {
310  mCharacterData += "&";
311  mCharacterData += entityName;
312  mCharacterData += ";";
313 
314  return;
315 }
std::string mCharacterData
void CCopasiXMLParser::onStartElement ( const XML_Char *  pszName,
const XML_Char **  papszAttrs 
)
virtual

Start element handler

Parameters
constXML_Char *pszName
constXML_Char **papszAttrs

Reimplemented from CExpat.

Definition at line 266 of file CCopasiXMLParser.cpp.

References mElementHandlerStack.

268 {
269  assert(mElementHandlerStack.size() != 0);
270  mElementHandlerStack.top()->start(pszName, papszAttrs);
271 }
std::stack< CXMLElementHandler< CCopasiXMLParser, SCopasiXMLParserCommon > * > mElementHandlerStack
void CCopasiXMLParser::popElementHandler ( )

Pop the element handler form the stack.

Definition at line 365 of file CCopasiXMLParser.cpp.

References mElementHandlerStack.

366 {mElementHandlerStack.pop();}
std::stack< CXMLElementHandler< CCopasiXMLParser, SCopasiXMLParserCommon > * > mElementHandlerStack
void CCopasiXMLParser::pushElementHandler ( CXMLElementHandler< CCopasiXMLParser, SCopasiXMLParserCommon > *  elementHandler)

Push the element handler on the stack.

Parameters
CXMLHandler<CCopasiXMLParser > elementHandler

Definition at line 362 of file CCopasiXMLParser.cpp.

References mElementHandlerStack.

363 {mElementHandlerStack.push(elementHandler);}
std::stack< CXMLElementHandler< CCopasiXMLParser, SCopasiXMLParserCommon > * > mElementHandlerStack
void CCopasiXMLParser::setDatamodel ( CCopasiDataModel pDataModel)

Set the datamodel.

Parameters
CCopasiDataModel*pDataModel

Definition at line 10977 of file CCopasiXMLParser.cpp.

References mCommon, and SCopasiXMLParserCommon::pDataModel.

Referenced by CCopasiXML::load().

10978 {
10979  this->mCommon.pDataModel = pDataModel;
10980 }
SCopasiXMLParserCommon mCommon
CCopasiDataModel * pDataModel
void CCopasiXMLParser::setFunctionList ( CCopasiVectorN< CFunction > *  pFunctionList)

Set the list of loaded functions

Parameters
CCopasiVectorN<CFunction > * pFunctionList

Definition at line 368 of file CCopasiXMLParser.cpp.

References mCommon, and SCopasiXMLParserCommon::pFunctionList.

Referenced by CCopasiXML::load().

369 {mCommon.pFunctionList = pFunctionList;}
CCopasiVectorN< CFunction > * pFunctionList
SCopasiXMLParserCommon mCommon
void CCopasiXMLParser::setGUI ( SCopasiXMLGUI pGUI)

Set the GUI information to be saved

Parameters
SCopasiXMLGUI* pGUI

Definition at line 383 of file CCopasiXMLParser.cpp.

References mCommon, and SCopasiXMLParserCommon::pGUI.

Referenced by CCopasiXML::load().

384 {mCommon.pGUI = pGUI;}
SCopasiXMLParserCommon mCommon
void CCopasiXMLParser::setLayoutList ( CListOfLayouts pLayoutList)

Set the list of loaded layouts

Parameters
CListOfLayouts* pLayoutList

Definition at line 386 of file CCopasiXMLParser.cpp.

References mCommon, and SCopasiXMLParserCommon::pLayoutList.

Referenced by CCopasiXML::load().

387 {mCommon.pLayoutList = pLayoutList;}
SCopasiXMLParserCommon mCommon
CListOfLayouts * pLayoutList

Member Data Documentation

std::string CCopasiXMLParser::mCharacterData
private

The character data.

Definition at line 327 of file CCopasiXMLParser.h.

Referenced by enableCharacterDataHandler(), getCharacterData(), onCharacterData(), and onSkippedEntityHandler().

CharacterDataElement CCopasiXMLParser::mCharacterDataElement

The character data element handler

Definition at line 491 of file CCopasiXMLParser.h.

CCopasiXMLInterface::EncodingType CCopasiXMLParser::mCharacterDataEncoding
private

The character data.

Definition at line 332 of file CCopasiXMLParser.h.

Referenced by onCharacterData().

CommentElement CCopasiXMLParser::mCommentElement

The comment element handler

Definition at line 1795 of file CCopasiXMLParser.h.

SCopasiXMLParserCommon CCopasiXMLParser::mCommon
private

Attributes accessible through the whole parser.

Definition at line 322 of file CCopasiXMLParser.h.

Referenced by CCopasiXMLParser(), CCopasiXMLParser::ModelParameterElement::end(), CCopasiXMLParser::ModelParameterGroupElement::end(), CCopasiXMLParser::ModelParameterSetElement::end(), CCopasiXMLParser::ListOfModelParameterSetsElement::end(), CCopasiXMLParser::CharacterDataElement::end(), CCopasiXMLParser::InitialStateElement::end(), CCopasiXMLParser::KineticLawElement::end(), CCopasiXMLParser::ReactionElement::end(), CCopasiXMLParser::MetaboliteElement::end(), CCopasiXMLParser::CompartmentElement::end(), CCopasiXMLParser::ModelValueElement::end(), CCopasiXMLParser::EventElement::end(), CCopasiXMLParser::AssignmentElement::end(), CCopasiXMLParser::CommentElement::end(), CCopasiXMLParser::ModelElement::end(), CCopasiXMLParser::PlotItemElement::end(), CCopasiXMLParser::ListOfChannelsElement::end(), CCopasiXMLParser::ListOfPlotItemsElement::end(), CCopasiXMLParser::PlotSpecificationElement::end(), CCopasiXMLParser::ListOfPlotsElement::end(), CCopasiXMLParser::ListOfTasksElement::end(), CCopasiXMLParser::ParameterTextElement::end(), CCopasiXMLParser::ParameterGroupElement::end(), CCopasiXMLParser::TaskElement::end(), CCopasiXMLParser::ListOfReportsElement::end(), CCopasiXMLParser::HeaderElement::end(), CCopasiXMLParser::BodyElement::end(), CCopasiXMLParser::FooterElement::end(), CCopasiXMLParser::TableElement::end(), CCopasiXMLParser::ReportElement::end(), CCopasiXMLParser::COPASIElement::end(), CCopasiXMLParser::ListOfFunctionsElement::end(), CCopasiXMLParser::ListOfParameterDescriptionsElement::end(), CCopasiXMLParser::FunctionElement::end(), CCopasiXMLParser::MiriamAnnotationElement::end(), CCopasiXMLParser::CurveElement::end(), CCopasiXMLParser::ListOfLayoutsElement::end(), CCopasiXMLParser::LinearGradientElement::end(), CCopasiXMLParser::RadialGradientElement::end(), CCopasiXMLParser::LineEndingElement::end(), CCopasiXMLParser::TextElement::end(), CCopasiXMLParser::RenderCurveElement::end(), CCopasiXMLParser::PolygonElement::end(), CCopasiXMLParser::LocalStyleElement::end(), CCopasiXMLParser::GlobalStyleElement::end(), CCopasiXMLParser::LocalRenderInformationElement::end(), CCopasiXMLParser::GlobalRenderInformationElement::end(), CCopasiXMLParser::GroupElement::end(), getCurrentGroup(), getLayoutList(), getModel(), getObjectFromName(), getPlotList(), getReportList(), getTaskList(), setDatamodel(), CCopasiXMLParser::ParameterGroupElement::setDerivedElement(), setFunctionList(), setGUI(), setLayoutList(), CCopasiXMLParser::ModelParameterElement::start(), CCopasiXMLParser::ModelParameterGroupElement::start(), CCopasiXMLParser::ListOfUnsupportedAnnotationsElement::start(), CCopasiXMLParser::ModelParameterSetElement::start(), CCopasiXMLParser::ListOfModelParameterSetsElement::start(), CCopasiXMLParser::StateTemplateVariableElement::start(), CCopasiXMLParser::StateTemplateElement::start(), CCopasiXMLParser::SourceParameterElement::start(), CCopasiXMLParser::CallParameterElement::start(), CCopasiXMLParser::ListOfCallParametersElement::start(), CCopasiXMLParser::KineticLawElement::start(), CCopasiXMLParser::ConstantElement::start(), CCopasiXMLParser::ListOfConstantsElement::start(), CCopasiXMLParser::ModifierElement::start(), CCopasiXMLParser::ListOfModifiersElement::start(), CCopasiXMLParser::ProductElement::start(), CCopasiXMLParser::ListOfProductsElement::start(), CCopasiXMLParser::SubstrateElement::start(), CCopasiXMLParser::ListOfSubstratesElement::start(), CCopasiXMLParser::ReactionElement::start(), CCopasiXMLParser::ListOfReactionsElement::start(), CCopasiXMLParser::MetaboliteElement::start(), CCopasiXMLParser::ListOfMetabolitesElement::start(), CCopasiXMLParser::CompartmentElement::start(), CCopasiXMLParser::ListOfCompartmentsElement::start(), CCopasiXMLParser::ModelValueElement::start(), CCopasiXMLParser::ListOfModelValuesElement::start(), CCopasiXMLParser::ListOfAssignmentsElement::start(), CCopasiXMLParser::EventElement::start(), CCopasiXMLParser::ListOfEventsElement::start(), CCopasiXMLParser::AssignmentElement::start(), CCopasiXMLParser::ModelElement::start(), CCopasiXMLParser::ChannelSpecElement::start(), CCopasiXMLParser::PlotItemElement::start(), CCopasiXMLParser::ListOfChannelsElement::start(), CCopasiXMLParser::ListOfPlotItemsElement::start(), CCopasiXMLParser::PlotSpecificationElement::start(), CCopasiXMLParser::ListOfPlotsElement::start(), CCopasiXMLParser::ListOfTasksElement::start(), CCopasiXMLParser::ReportInstanceElement::start(), CCopasiXMLParser::ParameterElement::start(), CCopasiXMLParser::ParameterTextElement::start(), CCopasiXMLParser::ParameterGroupElement::start(), CCopasiXMLParser::MethodElement::start(), CCopasiXMLParser::TaskElement::start(), CCopasiXMLParser::ListOfReportsElement::start(), CCopasiXMLParser::ObjectElement::start(), CCopasiXMLParser::HeaderElement::start(), CCopasiXMLParser::BodyElement::start(), CCopasiXMLParser::FooterElement::start(), CCopasiXMLParser::TableElement::start(), CCopasiXMLParser::ReportElement::start(), CCopasiXMLParser::COPASIElement::start(), CCopasiXMLParser::ListOfFunctionsElement::start(), CCopasiXMLParser::MathMLElement::start(), CCopasiXMLParser::ParameterDescriptionElement::start(), CCopasiXMLParser::ListOfParameterDescriptionsElement::start(), CCopasiXMLParser::FunctionElement::start(), CCopasiXMLParser::GUIElement::start(), CCopasiXMLParser::ListOfSlidersElement::start(), CCopasiXMLParser::SliderElement::start(), CCopasiXMLParser::CurveElement::start(), CCopasiXMLParser::CompartmentGlyphElement::start(), CCopasiXMLParser::ListOfCompartmentGlyphsElement::start(), CCopasiXMLParser::MetaboliteGlyphElement::start(), CCopasiXMLParser::ListOfMetabGlyphsElement::start(), CCopasiXMLParser::MetaboliteReferenceGlyphElement::start(), CCopasiXMLParser::ListOfMetaboliteReferenceGlyphsElement::start(), CCopasiXMLParser::ReactionGlyphElement::start(), CCopasiXMLParser::ListOfReactionGlyphsElement::start(), CCopasiXMLParser::TextGlyphElement::start(), CCopasiXMLParser::ListOfTextGlyphsElement::start(), CCopasiXMLParser::AdditionalGOElement::start(), CCopasiXMLParser::ListOfAdditionalGOsElement::start(), CCopasiXMLParser::LayoutElement::start(), CCopasiXMLParser::ListOfLayoutsElement::start(), CCopasiXMLParser::SBMLReferenceElement::start(), CCopasiXMLParser::SBMLMapElement::start(), CCopasiXMLParser::GradientStopElement::start(), CCopasiXMLParser::LinearGradientElement::start(), CCopasiXMLParser::RadialGradientElement::start(), CCopasiXMLParser::ColorDefinitionElement::start(), CCopasiXMLParser::ListOfColorDefinitionsElement::start(), CCopasiXMLParser::ListOfGradientDefinitionsElement::start(), CCopasiXMLParser::ListOfLineEndingsElement::start(), CCopasiXMLParser::LineEndingElement::start(), CCopasiXMLParser::ImageElement::start(), CCopasiXMLParser::RectangleElement::start(), CCopasiXMLParser::EllipseElement::start(), CCopasiXMLParser::TextElement::start(), CCopasiXMLParser::RenderCurveElement::start(), CCopasiXMLParser::PolygonElement::start(), CCopasiXMLParser::ListOfCurveElementsElement::start(), CCopasiXMLParser::CurveElementElement::start(), CCopasiXMLParser::LocalStyleElement::start(), CCopasiXMLParser::GlobalStyleElement::start(), CCopasiXMLParser::ListOfLocalStylesElement::start(), CCopasiXMLParser::ListOfGlobalStylesElement::start(), CCopasiXMLParser::ListOfLocalRenderInformationElement::start(), CCopasiXMLParser::ListOfGlobalRenderInformationElement::start(), CCopasiXMLParser::LocalRenderInformationElement::start(), CCopasiXMLParser::GlobalRenderInformationElement::start(), CCopasiXMLParser::GroupElement::start(), and CCopasiXMLParser::BoundingBoxElement::start().

std::stack< CXMLElementHandler< CCopasiXMLParser, SCopasiXMLParserCommon > * > CCopasiXMLParser::mElementHandlerStack
private

The element handler stack

Definition at line 337 of file CCopasiXMLParser.h.

Referenced by CCopasiXMLParser(), onEndElement(), onStartElement(), popElementHandler(), pushElementHandler(), and ~CCopasiXMLParser().

ListOfUnsupportedAnnotationsElement CCopasiXMLParser::mListOfUnsupportedAnnotationsElement

Definition at line 495 of file CCopasiXMLParser.h.

MiriamAnnotationElement CCopasiXMLParser::mMiriamAnnotationElement

The Miriam Annotation Element handler

Definition at line 3159 of file CCopasiXMLParser.h.

UnknownElement CCopasiXMLParser::mUnknownElement

The unknown element handler

Definition at line 440 of file CCopasiXMLParser.h.


The documentation for this class was generated from the following files: