COPASI API
4.16.103
|
#include <CMiaseParser.h>
Public Member Functions | |
CMiaseParser () | |
void | load (std::string filename) |
void | testDataStructure () |
~CMiaseParser () | |
Static Public Member Functions | |
static void XMLCALL | charhndl (void *userData, const XML_Char *s, int len) |
static void XMLCALL | end (void *data, const char *el) |
static void XMLCALL | start (void *data, const char *el, const char **attr) |
static void XMLCALL | xmldecl_handler (void *userData, const XML_Char *version, const XML_Char *encoding, int standalone) |
Static Public Attributes | |
static char | mEncoding [] = {'u', 't', 'f', '-', 8} |
static char | mNameSpace [] = "http://www.miase.org/" |
static XML_Char | mVersion_1_0 [] = {'1', '.', '0', 0} |
Private Member Functions | |
void | addContent (const char *el, const char **attr) |
void | createAllowedStateTags () |
void | endElement (const char *el) |
void | error (std::string errorString) |
CMiaseBase * | getLastObj () |
bool | isValid (const char *el) |
void | newAnnotation (const char **attr) |
void | newChange (const char *el, const char **attr) |
void | newContent (const XML_Char *s, int len) |
void | newMeasurementData (const char **attr) |
void | newMiase (const char **attr) |
void | newModel (const char **attr) |
void | newNotes (const char **attr) |
void | newOutput (const char **attr) |
void | newSimulation (const char *el, const char **attr) |
void | newState (States newState) |
void | newTask (const char **attr) |
void | startElement (const char *el, const char **attr) |
void | xmlDecl (const XML_Char *version, const XML_Char *encoding) |
void | xmlNameSpace (void *, const XML_Char *prefix, const XML_Char *uri) |
Private Attributes | |
States | mActState |
std::vector< std::vector < std::string > > | mAllowedStateTags |
char | mBuff [8192] |
std::string | mContent |
int | mDepth |
States | mLastState |
CMiaseML * | mMiase |
std::istream * | mpIstream |
int | mTmpDepth |
XML_Parser | mXmlParser |
Definition at line 39 of file CMiaseParser.h.
|
private |
Definition at line 69 of file CMiaseParser.h.
CMiaseParser::CMiaseParser | ( | ) |
Definition at line 28 of file CMiaseParser.cpp.
References charhndl(), createAllowedStateTags(), end(), mActState, mContent, mDepth, mLastState, mMiase, mTmpDepth, mXmlParser, myParser, start(), STATE_READY_TO_READ, and xmldecl_handler().
CMiaseParser::~CMiaseParser | ( | ) |
|
private |
Definition at line 593 of file CMiaseParser.cpp.
References mContent, mTmpDepth, and myParser.
Referenced by startElement().
Definition at line 109 of file CMiaseParser.cpp.
References myParser, and newContent().
Referenced by CMiaseParser().
|
private |
Definition at line 51 of file CMiaseParser.cpp.
References mAllowedStateTags, STATE_LAST, STATE_LIST_OF_CHANGES, STATE_LIST_OF_MEASUREMENT, STATE_LIST_OF_MODELS, STATE_LIST_OF_OUTPUTS, STATE_LIST_OF_SIMULATIONS, STATE_LIST_OF_TASKS, STATE_MIASE, STATE_MODEL, STATE_READY_TO_READ, STATE_SED, STATE_STOPPED, and STATE_TASK.
Referenced by CMiaseParser().
Definition at line 117 of file CMiaseParser.cpp.
References endElement(), and myParser.
Referenced by CMiaseParser().
|
private |
Definition at line 615 of file CMiaseParser.cpp.
References CMiaseBase::getAnnotation(), getLastObj(), CMiaseSed::getLastOutput(), CMiaseBase::getNotes(), CMiaseML::getSed(), mActState, mContent, mDepth, mLastState, mMiase, mTmpDepth, myParser, newState(), CMiaseOutput::saveWholeOutput(), CMiaseAnnotation::setAnyNote(), CMiaseNotes::setNotes(), STATE_ANNOTATION, STATE_LAST, STATE_LIST_OF_MODELS, STATE_LIST_OF_OUTPUTS, STATE_LIST_OF_TASKS, STATE_MODEL, STATE_NOTES, STATE_OUTPUT, STATE_SED, and STATE_TASK.
Referenced by end().
|
private |
Definition at line 782 of file CMiaseParser.cpp.
References myParser, newState(), and STATE_STOPPED.
Referenced by getLastObj(), isValid(), newAnnotation(), and newNotes().
|
private |
Definition at line 671 of file CMiaseParser.cpp.
References error(), CMiaseModel::getLastChange(), CMiaseTask::getLastMeasurement(), CMiaseSed::getLastModel(), CMiaseSed::getLastOutput(), CMiaseSed::getLastSimulation(), CMiaseSed::getLastTask(), CMiaseML::getSed(), mLastState, mMiase, myParser, STATE_LIST_OF_CHANGES, STATE_LIST_OF_MEASUREMENT, STATE_LIST_OF_SIMULATIONS, STATE_MIASE, STATE_MODEL, STATE_OUTPUT, STATE_SED, and STATE_TASK.
Referenced by endElement().
|
private |
Definition at line 787 of file CMiaseParser.cpp.
References error(), mActState, mAllowedStateTags, myParser, STATE_ANNOTATION, STATE_NOTES, STATE_OUTPUT, and STATE_STOPPED.
Referenced by startElement().
void CMiaseParser::load | ( | std::string | filename | ) |
Definition at line 740 of file CMiaseParser.cpp.
References BUFFSIZE, mBuff, mXmlParser, myParser, and XML_FMT_INT_MOD.
|
private |
Definition at line 205 of file CMiaseParser.cpp.
References CMiaseBase::addAnnotation(), error(), CMiaseModel::getLastChange(), CMiaseTask::getLastMeasurement(), CMiaseSed::getLastModel(), CMiaseSed::getLastOutput(), CMiaseSed::getLastSimulation(), CMiaseSed::getLastTask(), CMiaseML::getSed(), mActState, mContent, mMiase, mTmpDepth, myParser, newState(), CMiaseAnnotation::setXmlNs(), STATE_ANNOTATION, STATE_LIST_OF_CHANGES, STATE_LIST_OF_MEASUREMENT, STATE_LIST_OF_SIMULATIONS, STATE_MIASE, STATE_MODEL, STATE_OUTPUT, STATE_SED, and STATE_TASK.
Referenced by startElement().
|
private |
Definition at line 343 of file CMiaseParser.cpp.
References CMiaseModel::addChange(), CMiaseModel::getLastChange(), CMiaseSed::getLastModel(), CMiaseML::getSed(), mMiase, and myParser.
Referenced by startElement().
|
private |
Definition at line 125 of file CMiaseParser.cpp.
References mActState, mContent, myParser, STATE_ANNOTATION, STATE_NOTES, and STATE_OUTPUT.
Referenced by charhndl().
|
private |
Definition at line 417 of file CMiaseParser.cpp.
References CMiaseTask::addMeasurement(), CMiaseTask::getLastMeasurement(), CMiaseSed::getLastTask(), CMiaseML::getSed(), mMiase, myParser, CMiaseMeasurementData::setName(), and CMiaseMeasurementData::setSource().
Referenced by startElement().
|
private |
Definition at line 456 of file CMiaseParser.cpp.
References mMiase, myParser, newState(), CMiaseML::setVersion(), CMiaseML::setXmlns(), and STATE_MIASE.
Referenced by startElement().
|
private |
Definition at line 271 of file CMiaseParser.cpp.
References CMiaseSed::addModel(), CMiaseSed::getLastModel(), CMiaseML::getSed(), mMiase, myParser, newState(), CMiaseBaseEnhanced::setId(), CMiaseBaseEnhanced::setName(), CMiaseModel::setSource(), CMiaseModel::setType(), and STATE_MODEL.
Referenced by startElement().
|
private |
Definition at line 139 of file CMiaseParser.cpp.
References CMiaseBase::addNotes(), error(), CMiaseModel::getLastChange(), CMiaseTask::getLastMeasurement(), CMiaseSed::getLastModel(), CMiaseSed::getLastOutput(), CMiaseSed::getLastSimulation(), CMiaseSed::getLastTask(), CMiaseML::getSed(), mActState, mContent, mMiase, mTmpDepth, myParser, newState(), CMiaseNotes::setXmlNs(), STATE_LIST_OF_CHANGES, STATE_LIST_OF_MEASUREMENT, STATE_LIST_OF_SIMULATIONS, STATE_MIASE, STATE_MODEL, STATE_NOTES, STATE_OUTPUT, STATE_SED, and STATE_TASK.
Referenced by startElement().
|
private |
Definition at line 438 of file CMiaseParser.cpp.
References CMiaseSed::addOutput(), CMiaseSed::getLastOutput(), CMiaseML::getSed(), mContent, mMiase, mTmpDepth, myParser, newState(), CMiaseBaseEnhanced::setId(), CMiaseBaseEnhanced::setName(), and STATE_OUTPUT.
Referenced by startElement().
|
private |
Definition at line 291 of file CMiaseParser.cpp.
References CMiaseSed::addSimulation(), CMiaseSed::getLastSimulation(), CMiaseML::getSed(), mMiase, myParser, and strToDouble().
Referenced by startElement().
Definition at line 707 of file CMiaseParser.cpp.
References mActState, mLastState, and myParser.
Referenced by endElement(), error(), newAnnotation(), newMiase(), newModel(), newNotes(), newOutput(), newTask(), and startElement().
|
private |
Definition at line 387 of file CMiaseParser.cpp.
References CMiaseSed::addTask(), CMiaseSed::getLastTask(), CMiaseML::getSed(), mMiase, myParser, newState(), CMiaseBaseEnhanced::setId(), CMiaseTask::setModelReference(), CMiaseBaseEnhanced::setName(), CMiaseTask::setSimulationReference(), and STATE_TASK.
Referenced by startElement().
Definition at line 113 of file CMiaseParser.cpp.
References myParser, and startElement().
Referenced by CMiaseParser().
|
private |
Definition at line 472 of file CMiaseParser.cpp.
References addContent(), isValid(), mActState, mDepth, mMiase, mTmpDepth, myParser, newAnnotation(), newChange(), newMeasurementData(), newMiase(), newModel(), newNotes(), newOutput(), newSimulation(), newState(), newTask(), CMiaseML::setMiaseSed(), STATE_ANNOTATION, STATE_LIST_OF_CHANGES, STATE_LIST_OF_MEASUREMENT, STATE_LIST_OF_MODELS, STATE_LIST_OF_OUTPUTS, STATE_LIST_OF_SIMULATIONS, STATE_LIST_OF_TASKS, STATE_MIASE, STATE_MODEL, STATE_NOTES, STATE_OUTPUT, STATE_READY_TO_READ, STATE_SED, and STATE_TASK.
Referenced by start().
void CMiaseParser::testDataStructure | ( | ) |
Definition at line 814 of file CMiaseParser.cpp.
References CMiaseChange::ATTRIBUTE, CMiaseModel::getChange(), CMiaseBaseEnhanced::getId(), CMiaseTask::getMeasurement(), CMiaseSed::getModel(), CMiaseMeasurementData::getName(), CMiaseBaseEnhanced::getName(), CMiaseNotes::getNotes(), CMiaseBase::getNotes(), CMiaseTask::getNumberOfMeasurements(), CMiaseModel::getNumOfChanges(), CMiaseSed::getNumOfModels(), CMiaseSed::getNumOfOutputs(), CMiaseSed::getNumOfSimulations(), CMiaseSed::getNumOfTasks(), CMiaseSed::getOutput(), CMiaseML::getSed(), CMiaseSed::getSimulation(), CMiaseMeasurementData::getSource(), CMiaseModel::getSource(), CMiaseSed::getTask(), CMiaseModel::getType(), CMiaseOutput::getWholeOutput(), CMiaseChange::MATH, mMiase, CMiaseChange::mType, and myParser.
|
private |
Definition at line 714 of file CMiaseParser.cpp.
References mEncoding, min, mVersion_1_0, mXmlParser, and myParser.
Referenced by xmldecl_handler().
|
static |
Definition at line 121 of file CMiaseParser.cpp.
References myParser, and xmlDecl().
Referenced by CMiaseParser().
|
private |
Definition at line 96 of file CMiaseParser.h.
Referenced by CMiaseParser(), endElement(), isValid(), newAnnotation(), newContent(), newNotes(), newState(), and startElement().
|
private |
Definition at line 103 of file CMiaseParser.h.
Referenced by createAllowedStateTags(), and isValid().
|
private |
Definition at line 101 of file CMiaseParser.h.
Referenced by load().
|
private |
Definition at line 102 of file CMiaseParser.h.
Referenced by addContent(), CMiaseParser(), endElement(), newAnnotation(), newContent(), newNotes(), and newOutput().
|
private |
Definition at line 99 of file CMiaseParser.h.
Referenced by CMiaseParser(), endElement(), and startElement().
|
static |
Definition at line 46 of file CMiaseParser.h.
Referenced by xmlDecl().
|
private |
Definition at line 97 of file CMiaseParser.h.
Referenced by CMiaseParser(), endElement(), getLastObj(), and newState().
|
private |
Definition at line 95 of file CMiaseParser.h.
Referenced by CMiaseParser(), endElement(), getLastObj(), newAnnotation(), newChange(), newMeasurementData(), newMiase(), newModel(), newNotes(), newOutput(), newSimulation(), newTask(), startElement(), and testDataStructure().
|
static |
Definition at line 45 of file CMiaseParser.h.
|
private |
A pointer to the input stream
Definition at line 93 of file CMiaseParser.h.
|
private |
Definition at line 98 of file CMiaseParser.h.
Referenced by addContent(), CMiaseParser(), endElement(), newAnnotation(), newNotes(), newOutput(), and startElement().
|
static |
Definition at line 44 of file CMiaseParser.h.
Referenced by xmlDecl().
|
private |
Definition at line 100 of file CMiaseParser.h.
Referenced by CMiaseParser(), load(), xmlDecl(), and ~CMiaseParser().