1
/***************************************************************************
2
begin : Sat Jul 21 2001
3
copyright : (C) 2001 by Victor R�er
4
email : victor_roeder@gmx.de
5
copyright : (C) 2002,2003 by Roberto Raggi
6
email : roberto@kdevelop.org
7
copyright : (C) 2005 by Adam Treat
8
email : manyoso@yahoo.com
9
copyright : (C) 2006 by David Nolden
10
email : david.nolden.kdevelop@art-master.de
11
***************************************************************************/
13
/***************************************************************************
15
* This program is free software; you can redistribute it and/or modify *
16
* it under the terms of the GNU General Public License as published by *
17
* the Free Software Foundation; either version 2 of the License, or *
18
* (at your option) any later version. *
20
***************************************************************************/
22
#ifndef DECLARATIONINFO_H
23
#define DECLARATIONINFO_H
27
struct DeclarationInfo {
31
File( const QString& file = "" ) : m_file( file ) {
34
operator QString() const {
39
DeclarationInfo() : startLine(0), startCol(0), endLine(0), endCol(0) {
43
return !name.isEmpty();
46
QString locationToText() const {
47
return QString("line %1 col %2 - line %3 col %4\nfile: %5").arg(startLine).arg(startCol).arg(endLine).arg(endCol).arg(file);
50
QString toText() const {
51
if( name.isEmpty() ) return "";
54
ret = QString("name: " + name + "\n" ) + locationToText();
55
if( !comment.isEmpty() ) {
56
ret += "\n\"" + comment + "\"";
61
int startLine, startCol;
72
// kate: indent-mode csands; tab-width 4;