libutap  0.93
Uppaal Timed Automata Parser
UTAP::XMLWriter Class Reference

#include <xmlwriter.h>

Collaboration diagram for UTAP::XMLWriter:

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...
 
TimedAutomataSystemtaSystem
 The system to write. More...
 
std::map< int, int > selfLoops
 

Detailed Description

Definition at line 54 of file xmlwriter.h.

Constructor & Destructor Documentation

◆ XMLWriter()

XMLWriter::XMLWriter ( xmlTextWriterPtr  writer,
TimedAutomataSystem taSystem 
)

Definition at line 51 of file xmlwriter.cpp.

Referenced by writeXMLFile().

Here is the caller graph for this function:

◆ ~XMLWriter()

XMLWriter::~XMLWriter ( )
virtual

Definition at line 55 of file xmlwriter.cpp.

References writer.

Member Function Documentation

◆ declaration()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ endDocument()

void XMLWriter::endDocument ( )

Definition at line 368 of file xmlwriter.cpp.

References writer.

Referenced by project().

Here is the caller graph for this function:

◆ endElement()

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().

Here is the caller graph for this function:

◆ getChanPriority()

string XMLWriter::getChanPriority ( ) const

Definition at line 116 of file xmlwriter.cpp.

References UTAP::TimedAutomataSystem::getChanPriorities(), and taSystem.

Referenced by declaration().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ init()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ label()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ labels()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ location()

◆ nail()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ name()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ parameter()

void UTAP::XMLWriter::parameter ( )

◆ project()

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().

Here is the call graph for this function:

◆ selfLoop()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ source()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ startDocument()

void XMLWriter::startDocument ( )

Definition at line 353 of file xmlwriter.cpp.

References MY_ENCODING, and writer.

Referenced by project().

Here is the caller graph for this function:

◆ startElement()

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().

Here is the caller graph for this function:

◆ system_instantiation()

void XMLWriter::system_instantiation ( )

Definition at line 319 of file xmlwriter.cpp.

References UTAP::TimedAutomataSystem::getProcesses(), taSystem, and writeElement().

Referenced by project().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ target()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ taTempl()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ transition()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ writeAttribute()

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().

Here is the caller graph for this function:

◆ writeElement()

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().

Here is the caller graph for this function:

◆ writeStateAttributes()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ writeString()

void XMLWriter::writeString ( const char *  content)

Definition at line 85 of file xmlwriter.cpp.

References writer.

Referenced by name().

Here is the caller graph for this function:

◆ xmlwriteString()

void XMLWriter::xmlwriteString ( const xmlChar *  content)

Definition at line 92 of file xmlwriter.cpp.

References writer.

Referenced by label().

Here is the caller graph for this function:

Member Data Documentation

◆ selfLoops

std::map<int, int> UTAP::XMLWriter::selfLoops

Definition at line 59 of file xmlwriter.h.

Referenced by selfLoop(), and taTempl().

◆ taSystem

TimedAutomataSystem* UTAP::XMLWriter::taSystem

The system to write.

Definition at line 58 of file xmlwriter.h.

Referenced by declaration(), getChanPriority(), project(), and system_instantiation().

◆ writer

xmlTextWriterPtr UTAP::XMLWriter::writer

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