12 #ifndef __UT_SourceLocation__
13 #define __UT_SourceLocation__
23 int line = 0,
int column_start = 0,
int column_end = 0)
26 myColumnStart(column_start),
27 myColumnEnd(column_end)
33 int64 mem = inclusive ?
sizeof(*this) : 0;
34 mem += mySource.getMemoryUsage(
false);
40 return (mySource == other.mySource &&
41 myLine == other.myLine &&
42 myColumnStart == other.myColumnStart &&
43 myColumnEnd == other.myColumnEnd);
46 {
return !(*
this == other); }
57 {
return myColumnStart; }
59 { myColumnStart = col; }
61 {
return myColumnEnd; }
63 { myColumnEnd = col; }
68 int myColumnStart, myColumnEnd;
74 #endif // __UT_SourceLocation__
bool operator==(const UT_SourceLocation &other) const
UT_API std::ostream & operator<<(std::ostream &os, const UT_SourceLocation &loc)
void setColumnEnd(int col)
bool operator!=(const UT_SourceLocation &other) const
void setColumnStart(int col)
static const UT_StringHolder theEmptyString
void setSource(const UT_StringHolder &source)
GLsizei GLsizei GLchar * source
const UT_StringHolder & source() const
UT_SourceLocation(const UT_StringHolder &source=UT_StringHolder::theEmptyString, int line=0, int column_start=0, int column_end=0)
int64 getMemoryUsage(bool inclusive) const