~ubuntu-branches/ubuntu/quantal/kdevelop-php/quantal-proposed

« back to all changes in this revision

Viewing changes to duchain/builders/includebuilder.h

  • Committer: Bazaar Package Importer
  • Author(s): Fathi Boudra
  • Date: 2010-07-23 23:45:07 UTC
  • mfrom: (5.1.2 squeeze)
  • Revision ID: james.westby@ubuntu.com-20100723234507-ik2ff3c7yjjxwhgg
Tags: 1.0.1-1
* New upstream release.
* Add localization packages.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/***************************************************************************
2
 
 *   This file is part of KDevelop                                         *
3
 
 *   Copyright 2008 Niko Sams <niko.sams@gmail.com>                        *
4
 
 *                                                                         *
5
 
 *   This program is free software; you can redistribute it and/or modify  *
6
 
 *   it under the terms of the GNU Library General Public License as       *
7
 
 *   published by the Free Software Foundation; either version 2 of the    *
8
 
 *   License, or (at your option) any later version.                       *
9
 
 *                                                                         *
10
 
 *   This program is distributed in the hope that it will be useful,       *
11
 
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
12
 
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
13
 
 *   GNU General Public License for more details.                          *
14
 
 *                                                                         *
15
 
 *   You should have received a copy of the GNU Library General Public     *
16
 
 *   License along with this program; if not, write to the                 *
17
 
 *   Free Software Foundation, Inc.,                                       *
18
 
 *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.         *
19
 
 ***************************************************************************/
20
 
 
21
 
 
22
 
#ifndef INCLUDEBUILDER_H
23
 
#define INCLUDEBUILDER_H
24
 
 
25
 
#include <QMap>
26
 
#include <language/duchain/indexedstring.h>
27
 
 
28
 
#include "phpduchainexport.h"
29
 
#include "phpdefaultvisitor.h"
30
 
 
31
 
namespace Php
32
 
{
33
 
class EditorIntegrator;
34
 
 
35
 
class KDEVPHPDUCHAIN_EXPORT IncludeBuilder : public DefaultVisitor
36
 
{
37
 
public:
38
 
    IncludeBuilder(EditorIntegrator* editor);
39
 
    QMap<Php::AstNode*, KDevelop::IndexedString> includes();
40
 
    QMap<Php::AstNode*, QString> badIncludes();
41
 
    void build(const KDevelop::IndexedString &document, AstNode* ast);
42
 
 
43
 
protected:
44
 
    virtual void visitUnaryExpression(UnaryExpressionAst* node);
45
 
 
46
 
private:
47
 
    EditorIntegrator* m_editor;
48
 
    QMap<Php::AstNode*, KDevelop::IndexedString> m_includes;
49
 
    QMap<Php::AstNode*, QString> m_badIncludes;
50
 
    KDevelop::IndexedString m_document;
51
 
};
52
 
 
53
 
}
54
 
 
55
 
#endif // INCLUDEBUILDER_H