00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef _LOCATIONINFO_HPP
00023 #define _LOCATIONINFO_HPP
00024
00025
00026 #include <xqilla/framework/XQillaExport.hpp>
00027
00028 #include <xercesc/util/XercesDefs.hpp>
00029
00031 class XQILLA_API LocationInfo
00032 {
00033 public:
00035 LocationInfo()
00036 : file_(0), line_(0), column_(0) {}
00038 LocationInfo(const XMLCh *file, unsigned int line, unsigned int column)
00039 : file_(file), line_(line), column_(column) {}
00040
00042 const XMLCh *getFile() const { return file_; }
00044 unsigned int getLine() const { return line_; }
00046 unsigned int getColumn() const { return column_; }
00047
00049 void setLocationInfo(const XMLCh *file, unsigned int line, unsigned int column)
00050 {
00051 file_ = file;
00052 line_ = line;
00053 column_ = column;
00054 }
00056 void setLocationInfo(const LocationInfo *o)
00057 {
00058 if(o != 0) {
00059 file_ = o->file_;
00060 line_ = o->line_;
00061 column_ = o->column_;
00062 }
00063 }
00064
00065 private:
00066 const XMLCh *file_;
00067 unsigned int line_, column_;
00068 };
00069
00070 #endif