libutap
0.93
Uppaal Timed Automata Parser
|
#include <xmlwriter.h>
Public Member Functions | |
void | startDocument () |
void | endDocument () |
void | startElement (const char *element) |
void | endElement () |
void | writeElement (const char *name, const char *content) |
void | writeAttribute (const char *name, const char *value) |
void | writeString (const char *content) |
void | xmlwriteString (const xmlChar *content) |
void | taTempl (const template_t &templ) |
writes a template More... | |
void | location (const state_t &state) |
void | init (const template_t &templ) |
void | name (const state_t &state, int x, int y) |
void | writeStateAttributes (const state_t &state, int x, int y) |
void | transition (const edge_t &edge) |
void | nail (int x, int y) |
void | label (const char *kind, std::string data, int x, int y) |
int | source (const edge_t &edge) |
int | target (const edge_t &edge) |
void | selfLoop (int loc, float initialAngle, const edge_t &edge) |
void | labels (int x, int y, const edge_t &edge) |
void | declaration () |
Parses optional declaration. More... | |
std::string | getChanPriority () const |
void | parameter () |
void | system_instantiation () |
XMLWriter (xmlTextWriterPtr writer, TimedAutomataSystem *taSystem) | |
virtual | ~XMLWriter () |
void | project () |
Parse the project document. More... | |
Public Attributes | |
xmlTextWriterPtr | writer |
The underlying xmlTextWriter. More... | |
TimedAutomataSystem * | taSystem |
The system to write. More... | |
std::map< int, int > | selfLoops |
Definition at line 54 of file xmlwriter.h.
XMLWriter::XMLWriter | ( | xmlTextWriterPtr | writer, |
TimedAutomataSystem * | taSystem | ||
) |
Definition at line 51 of file xmlwriter.cpp.
Referenced by writeXMLFile().
|
virtual |
Definition at line 55 of file xmlwriter.cpp.
References writer.
void XMLWriter::declaration | ( | ) |
Parses optional declaration.
Definition at line 108 of file xmlwriter.cpp.
References getChanPriority(), UTAP::TimedAutomataSystem::getGlobals(), taSystem, UTAP::declarations_t::toString(), and writeElement().
Referenced by project().
void XMLWriter::endDocument | ( | ) |
Definition at line 368 of file xmlwriter.cpp.
References writer.
Referenced by project().
void XMLWriter::endElement | ( | ) |
Definition at line 69 of file xmlwriter.cpp.
References writer.
Referenced by init(), label(), location(), nail(), name(), project(), source(), target(), taTempl(), and transition().
string XMLWriter::getChanPriority | ( | ) | const |
Definition at line 116 of file xmlwriter.cpp.
References UTAP::TimedAutomataSystem::getChanPriorities(), and taSystem.
Referenced by declaration().
void XMLWriter::init | ( | const template_t & | templ | ) |
Definition at line 197 of file xmlwriter.cpp.
References UTAP::concat(), endElement(), UTAP::symbol_t::getData(), UTAP::template_t::init, startElement(), and writeAttribute().
Referenced by taTempl().
void XMLWriter::label | ( | const char * | kind, |
std::string | data, | ||
int | x, | ||
int | y | ||
) |
Definition at line 132 of file xmlwriter.cpp.
References UTAP::concat(), UTAP::ConvertInput(), endElement(), MY_ENCODING, startElement(), writeAttribute(), and xmlwriteString().
Referenced by labels(), and location().
void XMLWriter::labels | ( | int | x, |
int | y, | ||
const edge_t & | edge | ||
) |
Definition at line 267 of file xmlwriter.cpp.
References UTAP::edge_t::assign, UTAP::expression_t::empty(), UTAP::frame_t::getSize(), UTAP::edge_t::guard, label(), UTAP::edge_t::select, UTAP::edge_t::sync, and UTAP::expression_t::toString().
Referenced by selfLoop(), and transition().
void XMLWriter::location | ( | const state_t & | state | ) |
Definition at line 169 of file xmlwriter.cpp.
References UTAP::Constants::COMMITTED, UTAP::expression_t::empty(), endElement(), UTAP::symbol_t::getName(), UTAP::symbol_t::getType(), UTAP::state_t::invariant, UTAP::type_t::is(), label(), UTAP::state_t::locNr, name(), PINK, startElement(), STEP, UTAP::expression_t::toString(), UTAP::state_t::uid, UTAP::Constants::URGENT, writeAttribute(), and writeStateAttributes().
Referenced by taTempl().
void XMLWriter::nail | ( | int | x, |
int | y | ||
) |
Definition at line 241 of file xmlwriter.cpp.
References UTAP::concat(), endElement(), startElement(), and writeAttribute().
Referenced by selfLoop(), and transition().
void XMLWriter::name | ( | const state_t & | state, |
int | x, | ||
int | y | ||
) |
Definition at line 152 of file xmlwriter.cpp.
References UTAP::concat(), endElement(), UTAP::symbol_t::getName(), startElement(), UTAP::state_t::uid, writeAttribute(), and writeString().
Referenced by location(), and taTempl().
void UTAP::XMLWriter::parameter | ( | ) |
void XMLWriter::project | ( | ) |
Parse the project document.
Definition at line 338 of file xmlwriter.cpp.
References declaration(), endDocument(), endElement(), UTAP::TimedAutomataSystem::getTemplates(), startDocument(), startElement(), system_instantiation(), taSystem, and taTempl().
void XMLWriter::selfLoop | ( | int | loc, |
float | initialAngle, | ||
const edge_t & | edge | ||
) |
Definition at line 224 of file xmlwriter.cpp.
References labels(), nail(), PI, RADIUS, selfLoops, and STEP.
Referenced by transition().
int XMLWriter::source | ( | const edge_t & | edge | ) |
Definition at line 205 of file xmlwriter.cpp.
References UTAP::concat(), endElement(), UTAP::state_t::locNr, UTAP::edge_t::src, startElement(), and writeAttribute().
Referenced by transition().
void XMLWriter::startDocument | ( | ) |
Definition at line 353 of file xmlwriter.cpp.
References MY_ENCODING, and writer.
Referenced by project().
void XMLWriter::startElement | ( | const char * | element | ) |
Definition at line 62 of file xmlwriter.cpp.
References writer.
Referenced by init(), label(), location(), nail(), name(), project(), source(), target(), taTempl(), and transition().
void XMLWriter::system_instantiation | ( | ) |
Definition at line 319 of file xmlwriter.cpp.
References UTAP::TimedAutomataSystem::getProcesses(), taSystem, and writeElement().
Referenced by project().
int XMLWriter::target | ( | const edge_t & | edge | ) |
Definition at line 215 of file xmlwriter.cpp.
References UTAP::concat(), UTAP::edge_t::dst, endElement(), UTAP::state_t::locNr, startElement(), and writeAttribute().
Referenced by transition().
void XMLWriter::taTempl | ( | const template_t & | templ | ) |
writes a template
Definition at line 289 of file xmlwriter.cpp.
References UTAP::template_t::edges, endElement(), UTAP::symbol_t::getName(), init(), UTAP::template_t::isTA, location(), name(), selfLoops, startElement(), UTAP::template_t::states, UTAP::declarations_t::toString(), transition(), UTAP::instance_t::uid, writeElement(), and UTAP::instance_t::writeParameters().
Referenced by project().
void XMLWriter::transition | ( | const edge_t & | edge | ) |
Definition at line 249 of file xmlwriter.cpp.
References endElement(), UTAP::symbol_t::getName(), labels(), nail(), PI, selfLoop(), source(), UTAP::edge_t::src, startElement(), STEP, target(), and UTAP::state_t::uid.
Referenced by taTempl().
void XMLWriter::writeAttribute | ( | const char * | name, |
const char * | value | ||
) |
Definition at line 100 of file xmlwriter.cpp.
References writer.
Referenced by init(), label(), location(), nail(), name(), source(), target(), and writeStateAttributes().
void XMLWriter::writeElement | ( | const char * | name, |
const char * | content | ||
) |
Definition at line 77 of file xmlwriter.cpp.
References writer.
Referenced by declaration(), system_instantiation(), and taTempl().
void XMLWriter::writeStateAttributes | ( | const state_t & | state, |
int | x, | ||
int | y | ||
) |
Definition at line 161 of file xmlwriter.cpp.
References UTAP::concat(), UTAP::state_t::locNr, and writeAttribute().
Referenced by location().
void XMLWriter::writeString | ( | const char * | content | ) |
Definition at line 85 of file xmlwriter.cpp.
References writer.
Referenced by name().
void XMLWriter::xmlwriteString | ( | const xmlChar * | content | ) |
Definition at line 92 of file xmlwriter.cpp.
References writer.
Referenced by label().
std::map<int, int> UTAP::XMLWriter::selfLoops |
Definition at line 59 of file xmlwriter.h.
Referenced by selfLoop(), and taTempl().
TimedAutomataSystem* UTAP::XMLWriter::taSystem |
The system to write.
Definition at line 58 of file xmlwriter.h.
Referenced by declaration(), getChanPriority(), project(), and system_instantiation().
xmlTextWriterPtr UTAP::XMLWriter::writer |
The underlying xmlTextWriter.
Definition at line 57 of file xmlwriter.h.
Referenced by endDocument(), endElement(), startDocument(), startElement(), writeAttribute(), writeElement(), writeString(), writeXMLFile(), xmlwriteString(), and ~XMLWriter().