blob: d2e774d8f39293c62f8a284a6bc4bc94ae36179c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
/***************************************************************************
* Copyright (C) 2005 by David Saxton *
* [email protected] *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
***************************************************************************/
#ifndef SOURCELINE_H
#define SOURCELINE_H
#include <qstring.h>
/**
@author David Saxton
*/
class SourceLine
{
public:
/**
* Creates an invalid source line (line is negative).
*/
SourceLine();
SourceLine( const QString & fileName, int line );
QString fileName() const { return m_fileName; }
int line() const { return m_line; }
bool isValid() const { return m_line >= 0; }
bool operator < ( const SourceLine & sourceLine ) const;
bool operator == ( const SourceLine & sourceLine ) const;
protected:
QString m_fileName;
int m_line;
};
#endif
|