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

« back to all changes in this revision

Viewing changes to languages/php/phpparser.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) 2005 by Nicolas Escuder <n.escuder@intra-links.com>
3
 
 
4
 
   This library is free software; you can redistribute it and/or
5
 
   modify it under the terms of the GNU Library General Public
6
 
   version 2, License as published by the Free Software Foundation.
7
 
 
8
 
   This library is distributed in the hope that it will be useful,
9
 
   but WITHOUT ANY WARRANTY; without even the implied warranty of
10
 
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11
 
   Library General Public License for more details.
12
 
 
13
 
   You should have received a copy of the GNU Library General Public License
14
 
   along with this library; see the file COPYING.LIB.  If not, write to
15
 
   the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor,
16
 
   Boston, MA 02110-1301, USA.
17
 
*/
18
 
 
19
 
#ifndef PHPPARSER_H
20
 
#define PHPPARSER_H
21
 
 
22
 
#include <qthread.h>
23
 
 
24
 
#if QT_VERSION < 0x030100
25
 
#include <kdevmutex.h>
26
 
#else
27
 
#include <qmutex.h>
28
 
#endif
29
 
 
30
 
#include <codemodel.h>
31
 
 
32
 
#include <qwaitcondition.h>
33
 
#include <qstring.h>
34
 
#include <qstringlist.h>
35
 
 
36
 
#include "phpfile.h"
37
 
 
38
 
class KDevCore;
39
 
class PHPSupportPart;
40
 
 
41
 
/**
42
 
  *@author Sandy Meier
43
 
  */
44
 
 
45
 
class PHPParser: public QThread {
46
 
 
47
 
public:
48
 
   PHPParser(PHPSupportPart *part);
49
 
   ~PHPParser();
50
 
 
51
 
   void addFile( const QString& fileName );
52
 
   bool hasFile( const QString& fileName );
53
 
   void reparseFile( const QString& fileName );
54
 
   void removeFile( const QString& fileName );
55
 
   void removeAllFiles();
56
 
 
57
 
   void run();
58
 
   void close();
59
 
   void startParse();
60
 
 
61
 
private:
62
 
   CodeModel* m_model;
63
 
   KDevCore* m_core;
64
 
   PHPSupportPart* m_part;
65
 
 
66
 
   QMutex m_mutex;
67
 
   QWaitCondition m_canParse;
68
 
   bool m_close;
69
 
   QMap<QString, PHPFile*> m_files;
70
 
};
71
 
 
72
 
 
73
 
#endif