Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

UTAP::Positions Class Reference

A container for information about lines and positions in the input file. More...

#include <position.h>

List of all members.

Public Member Functions

void add (uint32_t position, uint32_t offset, uint32_t line, std::string path)
 Add information about a line to the container.
const line_tPositions::find (uint32_t position) const
 Retrieves information about the line containing the given position.
void dump ()
 Dump table to stdout.

Classes

struct  line_t


Detailed Description

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.


Member Function Documentation

void Positions::add uint32_t  position,
uint32_t  offset,
uint32_t  line,
std::string  path
 

Add information about a line to the container.

void Positions::dump  ) 
 

Dump table to stdout.

const line_t& UTAP::Positions::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).


The documentation for this class was generated from the following files:
Generated on Sat Apr 29 21:02:14 2006 for libutap by  doxygen 1.4.2