libutap
0.93
Uppaal Timed Automata Parser
|
A container for information about lines and positions in the input file. More...
#include <position.h>
Classes | |
struct | line_t |
Public Member Functions | |
void | add (uint32_t position, uint32_t offset, uint32_t line, const std::string &path) |
Add information about a line to the container. More... | |
const line_t & | find (uint32_t position) const |
Retrieves information about the line containing the given position. More... | |
void | dump () |
Dump table to stdout. More... | |
A container for information about lines and positions in the input file.
Elements in the container contain information about the position in the input file of the first character of a line and the XPath to the XML element containing the line. In general, the line number refers to the line inside the XML element and is not a global numbering of the lines in the input file. Also the offset of the first character relative to the beginning of the XML element is stored.
If the input file is not an XML document, the path element of a line is the empty string, the offset equals the position, and the line numbers refer to the line number in the input file. In essence, the whole input file is treated as if it were a single XML element.
Definition at line 61 of file position.h.
void Positions::add | ( | uint32_t | position, |
uint32_t | offset, | ||
uint32_t | line, | ||
const std::string & | path | ||
) |
Add information about a line to the container.
Definition at line 30 of file position.cpp.
Referenced by UTAP::TimedAutomataSystem::addPosition().
void Positions::dump | ( | ) |
Dump table to stdout.
Definition at line 67 of file position.cpp.
const Positions::line_t & Positions::find | ( | uint32_t | position | ) | const |
Retrieves information about the line containing the given position.
The last line in the container is considered to extend to inifinity (until another line is added).
Definition at line 57 of file position.cpp.