generator  1.2
Public Member Functions | Private Member Functions | Private Attributes | List of all members
XmlWriter Class Reference

It writes problem instances to the xml file. More...

#include <XmlWriter.h>

+ Collaboration diagram for XmlWriter:

Public Member Functions

 XmlWriter (const std::vector< RoboticLine * > &lines)
 It initialises the XmlWriter instance by the given robotic cells. More...
 
void writeXmlFile (std::string filename=Settings::OUTPUT_FILE)
 It transforms the instances of the robotic cells to the form of the xml file. More...
 

Private Member Functions

void writeInstanceXmlPart (std::ostream &out, RoboticLine *line, const uint32_t &lineId, uint32_t length)
 It writes a part of the xml file corresponding to one robotic cell. More...
 
void writeRobotXmlPart (std::ostream &out, Robot *robot, const uint32_t &robotId, uint32_t length)
 It writes a part of the xml file corresponding to one robot. More...
 
void writeStaticActivityXmlPart (std::ostream &out, StaticActivity *a, uint32_t length)
 It writes a part of the xml file corresponding to one static activity. More...
 
void writeDynamicActivityXmlPart (std::ostream &out, DynamicActivity *a, uint32_t length)
 It writes a part of the xml file corresponding to one dynamic activity. More...
 
void writeInterRobotOperationsXmlPart (std::ostream &out, RoboticLine *line, uint32_t length)
 It writes a part of the xml file corresponding to the inter-robot operations. More...
 
void writeCollisionsXmlPart (std::ostream &out, RoboticLine *line, uint32_t length)
 It writes a part of the xml file corresponding to the spatial collisions. More...
 

Private Attributes

std::vector< RoboticLine * > mLines
 Robotic cells to be written to the xml file.
 

Detailed Description

It writes problem instances to the xml file.

Instance of XmlWriter class reads dataset of robotic cells and writes them in the form of a well-structured xml file.

Definition at line 55 of file XmlWriter.h.

Constructor & Destructor Documentation

XmlWriter::XmlWriter ( const std::vector< RoboticLine * > &  lines)
inline

It initialises the XmlWriter instance by the given robotic cells.

Parameters
linesRobotic cells to be written to the xml file.

Definition at line 61 of file XmlWriter.h.

Member Function Documentation

void XmlWriter::writeCollisionsXmlPart ( std::ostream &  out,
RoboticLine line,
uint32_t  length 
)
private

It writes a part of the xml file corresponding to the spatial collisions.

Parameters
outOutput stream to which the text stream will be written.
lineSpatial collisions of this robotic cell will be transformed to the text stream.
lengthInitial indentation for each new line in this xml part.

Definition at line 221 of file XmlWriter.cpp.

void XmlWriter::writeDynamicActivityXmlPart ( std::ostream &  out,
DynamicActivity a,
uint32_t  length 
)
private

It writes a part of the xml file corresponding to one dynamic activity.

Parameters
outOutput stream to which the text stream will be written.
aThe dynamic activity to be transformed to the text stream.
lengthInitial indentation for each new line in this xml part.

Definition at line 150 of file XmlWriter.cpp.

void XmlWriter::writeInstanceXmlPart ( std::ostream &  out,
RoboticLine line,
const uint32_t &  lineId,
uint32_t  length 
)
private

It writes a part of the xml file corresponding to one robotic cell.

Parameters
outOutput stream to which the text stream will be written.
lineRobotic cell to be transformed to the text stream.
lineIdIdentification of the robotic cell according to the order.
lengthInitial indentation for each new line in this xml part.

Definition at line 63 of file XmlWriter.cpp.

void XmlWriter::writeInterRobotOperationsXmlPart ( std::ostream &  out,
RoboticLine line,
uint32_t  length 
)
private

It writes a part of the xml file corresponding to the inter-robot operations.

Parameters
outOutput stream to which the text stream will be written.
lineInter-robot operations of this robotic cell will be transformed to the text stream.
lengthInitial indentation for each new line in this xml part.

Definition at line 184 of file XmlWriter.cpp.

void XmlWriter::writeRobotXmlPart ( std::ostream &  out,
Robot robot,
const uint32_t &  robotId,
uint32_t  length 
)
private

It writes a part of the xml file corresponding to one robot.

Parameters
outOutput stream to which the text stream will be written.
robotThe robot to be transformed to the text stream.
robotIdInteger identification of the robot.
lengthInitial indentation for each new line in this xml part.

Definition at line 81 of file XmlWriter.cpp.

void XmlWriter::writeStaticActivityXmlPart ( std::ostream &  out,
StaticActivity a,
uint32_t  length 
)
private

It writes a part of the xml file corresponding to one static activity.

Parameters
outOutput stream to which the text stream will be written.
aThe static activity to be transformed to the text stream.
lengthInitial indentation for each new line in this xml part.

Definition at line 124 of file XmlWriter.cpp.

void XmlWriter::writeXmlFile ( std::string  filename = Settings::OUTPUT_FILE)

It transforms the instances of the robotic cells to the form of the xml file.

Parameters
filenameThe filename of the output xml file.

Definition at line 31 of file XmlWriter.cpp.


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