dve_source_position_t Class Reference

Class for storage of position in a source code. More...

#include <dve_source_position.hh>

Inheritance diagram for dve_source_position_t:

dve_expression_t dve_transition_t

List of all members.

Public Member Functions

 dve_source_position_t (const size_int_t fline, const size_int_t fcol, const size_int_t lline, const size_int_t lcol)
 A constructor.
 dve_source_position_t ()
 A constructor (initializs all position parameters to zero).
size_int_t get_source_first_col () const
 Returns the first column of the position in a source code.
size_int_t get_source_first_line () const
 Returns the first line of the position in a source code.
size_int_t get_source_last_col () const
 Returns the last column of the position in a source code.
size_int_t get_source_last_line () const
 Returns the last line of the position in a source code.
void get_source_pos (dve_source_position_t &second)
 Sets a position in a source code (copies parameters from the given object).
void get_source_pos (size_int_t &fline, size_int_t &fcol, size_int_t &lline, size_int_t &lcol) const
 Copies the position in a source code to four given parameters.
void set_source_pos (const dve_source_position_t &second)
 Copies te position in a source code to the given object.
void set_source_pos (const size_int_t fline, const size_int_t fcol, const size_int_t lline, const size_int_t lcol)
 Sets a position in a source code given by four given parameters.


Detailed Description

Class for storage of position in a source code.

This class represents a position in a source code. Other classes representing various objects in the source code derive from this class to be possible to locate them in the code.

Position in the source code consists of four parameters:


Member Function Documentation

void get_source_pos ( size_int_t &  fline,
size_int_t &  fcol,
size_int_t &  lline,
size_int_t &  lcol 
) const

Copies the position in a source code to four given parameters.

Parameters:
fline = first line of position
fcol = first column of position
lline = last line of position
lcol = last column of position

void set_source_pos ( const size_int_t  fline,
const size_int_t  fcol,
const size_int_t  lline,
const size_int_t  lcol 
)

Sets a position in a source code given by four given parameters.

Parameters:
fline = first line of position
fcol = first column of position
lline = last line of position
lcol = last column of position

Referenced by dve_expression_t::assign(), and dve_expression_t::swap().


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

Reference Manual for Library, 2006 developed in ParaDiSe laboratory, Faculty of Informatics, Masaryk University