00001
00004 #ifndef DIVINE_DVE_SOURCE_POSITION_HH
00005 #define DIVINE_DVE_SOURCE_POSITION_HH
00006
00007 #ifndef DOXYGEN_PROCESSING
00008
00009 #include "common/types.hh"
00010
00011 namespace divine {
00012 #endif //DOXYGEN_PROCESSING
00013
00015
00025 class dve_source_position_t {
00026 private:
00027
00028 size_int_t first_line;
00029 size_int_t first_col;
00030 size_int_t last_line;
00031 size_int_t last_col;
00032
00033 public:
00035 dve_source_position_t(): first_line(0), first_col(0),
00036 last_line(0), last_col(0) {}
00038 dve_source_position_t(const size_int_t fline, const size_int_t fcol,
00039 const size_int_t lline, const size_int_t lcol):
00040 first_line(fline), first_col(fcol), last_line(lline), last_col(lcol) {}
00041
00043
00048 void get_source_pos(size_int_t & fline, size_int_t & fcol,
00049 size_int_t & lline, size_int_t & lcol) const;
00051
00056 void set_source_pos(const size_int_t fline, const size_int_t fcol,
00057 const size_int_t lline, const size_int_t lcol);
00058
00060 void set_source_pos(const dve_source_position_t & second);
00061
00063 void get_source_pos(dve_source_position_t & second);
00064
00066 size_int_t get_source_first_line() const { return first_line; }
00068 size_int_t get_source_first_col() const { return first_col; }
00070 size_int_t get_source_last_line() const { return last_line; }
00072 size_int_t get_source_last_col() const { return last_col; }
00073 };
00074
00075 #ifndef DOXYGEN_PROCESSING
00076 }
00077 #endif //DOXYGEN_PROCESSING
00078
00079 #endif
00080
00081
00082