~ubuntu-branches/debian/sid/kdevelop/sid

« back to all changes in this revision

Viewing changes to parts/ctags2/tags.h

  • Committer: Bazaar Package Importer
  • Author(s): Jeremy Lainé
  • Date: 2010-05-05 07:21:55 UTC
  • mfrom: (1.2.3 upstream) (5.1.2 squeeze)
  • Revision ID: james.westby@ubuntu.com-20100505072155-h78lx19pu04sbhtn
Tags: 4:4.0.0-2
* Upload to unstable (Closes: #579947, #481832).
* Acknowledge obsolete NMU fixes (Closes: #562410, #546961).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/***************************************************************************
2
 
 *   Copyright (C) 2004 by Jens Dagerbo                                    *
3
 
 *   jens.dagerbo@swipnet.se                                               *
4
 
 *                                                                         *
5
 
 *   This program is free software; you can redistribute it and/or modify  *
6
 
 *   it under the terms of the GNU General Public License as published by  *
7
 
 *   the Free Software Foundation; either version 2 of the License, or     *
8
 
 *   (at your option) any later version.                                   *
9
 
 *                                                                         *
10
 
 ***************************************************************************/
11
 
 
12
 
#ifndef TAGS_H
13
 
#define TAGS_H
14
 
 
15
 
#include <qvaluelist.h>
16
 
#include <qcstring.h>
17
 
#include <qstring.h>
18
 
#include <qstringlist.h>
19
 
 
20
 
class Tags
21
 
{
22
 
public:
23
 
 
24
 
        struct TagEntry
25
 
        {
26
 
                TagEntry();
27
 
                TagEntry( const QString & tag, const QString & type, const QString & file, const QString & pattern );
28
 
                
29
 
                QString tag;
30
 
                QString type;
31
 
                QString file;
32
 
                QString pattern;
33
 
        };
34
 
        
35
 
        typedef QValueList<TagEntry> TagList;
36
 
        
37
 
        /**
38
 
         *    Method to set the tag database filename
39
 
         * @param file the tag database filename
40
 
         */
41
 
        static void setTagFiles(const QStringList& tagFiles);
42
 
        
43
 
        static QStringList getTagFiles();
44
 
        
45
 
        /**
46
 
         *    Method to check if the tag database contains a specific tag
47
 
         * @param tag Tag to look up
48
 
         * @return returns true if tag database contains 'tag'
49
 
         */
50
 
        static bool hasTag( const QString & tag );
51
 
        
52
 
        static unsigned int numberOfPartialMatches( const QString & tagpart );
53
 
        static unsigned int numberOfExactMatches( const QString & tag );
54
 
        static unsigned int numberOfMatches( const QString & tagpart, bool partial );
55
 
        
56
 
        static TagList getPartialMatches( const QString & tagpart );
57
 
        static TagList getExactMatches( const QString & tag );
58
 
        static TagList getMatches( const QString & tagpart, bool partial, const QStringList & types = QStringList() );  
59
 
 
60
 
private:
61
 
        static Tags::TagList getMatches(const char* tagFile, 
62
 
                                                                   const QString & tagpart, 
63
 
                                                                   bool partial,
64
 
                                                                   const QStringList & types );
65
 
        static unsigned int numberOfMatches(const char* tagFile, 
66
 
                                                                           const QString & tagpart, 
67
 
                                                                           bool partial );
68
 
        static bool hasTag(const char* tagFile, const QString & tag );
69
 
        static QStringList _tagFiles;
70
 
};
71
 
 
72
 
#endif
73
 
 
74
 
// kate: space-indent off; indent-width 4; tab-width 4; show-tabs off;