COPASI API  4.16.103
Public Member Functions | Private Types | List of all members
CCopasiXMLParser::ListOfChannelsElement Class Reference
Inheritance diagram for CCopasiXMLParser::ListOfChannelsElement:
Inheritance graph
[legend]
Collaboration diagram for CCopasiXMLParser::ListOfChannelsElement:
Collaboration graph
[legend]

Public Member Functions

virtual void end (const XML_Char *pszName)
 
 ListOfChannelsElement (CCopasiXMLParser &parser, SCopasiXMLParserCommon &common)
 
virtual void start (const XML_Char *pszName, const XML_Char **papszAttrs)
 
virtual ~ListOfChannelsElement ()
 
- Public Member Functions inherited from CXMLElementHandler< CCopasiXMLParser, SCopasiXMLParserCommon >
 CXMLElementHandler (CCopasiXMLParser &parser, SCopasiXMLParserCommon &common)
 
virtual void end (const XML_Char *C_UNUSED(pszName))
 
virtual void reset ()
 
virtual void start (const XML_Char *C_UNUSED(pszName), const XML_Char **C_UNUSED(papszAttrs))
 
virtual ~CXMLElementHandler ()
 

Private Types

enum  Element { ListOfChannels = 0, ChannelSpec }
 

Additional Inherited Members

- Protected Member Functions inherited from CXMLElementHandler< CCopasiXMLParser, SCopasiXMLParserCommon >
void addFix (const std::string &key, CCopasiObject *pObject)
 
void deleteCurrentHandler ()
 
- Protected Attributes inherited from CXMLElementHandler< CCopasiXMLParser, SCopasiXMLParserCommon >
SCopasiXMLParserCommonmCommon
 
C_INT32 mCurrentElement
 
C_INT32 mLastKnownElement
 
CCopasiXMLParsermParser
 
CXMLElementHandlermpCurrentHandler
 

Detailed Description

Definition at line 1962 of file CCopasiXMLParser.h.

Member Enumeration Documentation

Enumerator
ListOfChannels 
ChannelSpec 

Definition at line 1969 of file CCopasiXMLParser.h.

Constructor & Destructor Documentation

CCopasiXMLParser::ListOfChannelsElement::ListOfChannelsElement ( CCopasiXMLParser parser,
SCopasiXMLParserCommon common 
)
CCopasiXMLParser::ListOfChannelsElement::~ListOfChannelsElement ( )
virtual

Destructor

Definition at line 5492 of file CCopasiXMLParser.cpp.

Member Function Documentation

void CCopasiXMLParser::ListOfChannelsElement::end ( const XML_Char *  pszName)
virtual

End element handler

Parameters
constXML_Char *pszName

Definition at line 5538 of file CCopasiXMLParser.cpp.

References CCopasiMessage::EXCEPTION, CPlotItem::getChannels(), CCopasiXMLParser::mCommon, MCXML, CExpatTemplate< CExpat >::mParser, SCopasiXMLParserCommon::pCurrentChannelSpec, SCopasiXMLParserCommon::pCurrentPlotItem, START_ELEMENT, and UNKNOWN_ELEMENT.

5539 {
5540  switch (mCurrentElement)
5541  {
5542  case ListOfChannels:
5543 
5544  if (strcmp(pszName, "ListOfChannels"))
5546  pszName, "ListOfChannels", mParser.getCurrentLineNumber());
5547 
5550  mParser.onEndElement(pszName);
5551  break;
5552 
5553  case ChannelSpec:
5554 
5555  if (strcmp(pszName, "ChannelSpec"))
5557  pszName, "ChannelSpec", mParser.getCurrentLineNumber());
5558 
5560 
5564  break;
5565 
5566  case UNKNOWN_ELEMENT:
5568  break;
5569 
5570  default:
5572  pszName, "???", mParser.getCurrentLineNumber());
5573  break;
5574  }
5575 
5576  return;
5577 }
#define START_ELEMENT
#define MCXML
std::vector< CPlotDataChannelSpec > & getChannels()
Definition: CPlotItem.cpp:214
CPlotDataChannelSpec * pCurrentChannelSpec
virtual void onEndElement(const XML_Char *pszName)
#define UNKNOWN_ELEMENT
int getCurrentLineNumber() const
Definition: CExpat.h:470
void CCopasiXMLParser::ListOfChannelsElement::start ( const XML_Char *  pszName,
const XML_Char **  papszAttrs 
)
virtual

Start element handler

Parameters
constXML_Char *pszName
constXML_Char **papszAttrs

Definition at line 5497 of file CCopasiXMLParser.cpp.

References CCopasiMessage::EXCEPTION, CCopasiXMLParser::mCommon, MCXML, CExpatTemplate< CExpat >::mParser, and UNKNOWN_ELEMENT.

5499 {
5500  mCurrentElement++; /* We should always be on the next element */
5501 
5502  switch (mCurrentElement)
5503  {
5504  case ListOfChannels:
5505 
5506  if (strcmp(pszName, "ListOfChannels"))
5508  pszName, "ListOfChannels", mParser.getCurrentLineNumber());
5509 
5510  break;
5511 
5512  case ChannelSpec:
5513 
5514  if (strcmp(pszName, "ChannelSpec"))
5516  pszName, "ChannelSpec", mParser.getCurrentLineNumber());
5517 
5518  if (!mpCurrentHandler)
5519  {
5520  mpCurrentHandler = new ChannelSpecElement(mParser, mCommon);
5521  }
5522 
5524  mpCurrentHandler->start(pszName, papszAttrs);
5525  break;
5526 
5527  default:
5531  mParser.onStartElement(pszName, papszAttrs);
5532  break;
5533  }
5534 
5535  return;
5536 }
UnknownElement mUnknownElement
#define MCXML
#define UNKNOWN_ELEMENT
virtual void onStartElement(const XML_Char *pszName, const XML_Char **papszAttrs)
void pushElementHandler(CXMLElementHandler< CCopasiXMLParser, SCopasiXMLParserCommon > *elementHandler)
virtual void start(const XML_Char *C_UNUSED(pszName), const XML_Char **C_UNUSED(papszAttrs))
Definition: CXMLHandler.h:87
int getCurrentLineNumber() const
Definition: CExpat.h:470

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