~ubuntu-branches/ubuntu/utopic/kdevelop-php/utopic

« back to all changes in this revision

Viewing changes to phpparsejob.h

  • Committer: Bazaar Package Importer
  • Author(s): Fathi Boudra
  • Date: 2010-01-17 17:10:22 UTC
  • Revision ID: james.westby@ubuntu.com-20100117171022-nx770ylotvqxwlmc
Tags: 1.0.0~beta2-1
Initial release (Closes: #565680)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*****************************************************************************
2
 
 * Copyright (c) 2007 Andreas Pakulat <apaku@gmx.de>                         *
3
2
 * Copyright (c) 2007 Piyush verma <piyush.verma@gmail.com>                  *
4
3
 * Copyright (c) 2008 Niko Sams <niko.sams@gmail.com>                        *
5
4
 *                                                                           *
6
 
 * Permission is hereby granted, free of charge, to any person obtaining     *
7
 
 * a copy of this software and associated documentation files (the           *
8
 
 * "Software"), to deal in the Software without restriction, including       *
9
 
 * without limitation the rights to use, copy, modify, merge, publish,       *
10
 
 * distribute, sublicense, and/or sell copies of the Software, and to        *
11
 
 * permit persons to whom the Software is furnished to do so, subject to     *
12
 
 * the following conditions:                                                 *
13
 
 *                                                                           *
14
 
 * The above copyright notice and this permission notice shall be            *
15
 
 * included in all copies or substantial portions of the Software.           *
16
 
 *                                                                           *
17
 
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,           *
18
 
 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF        *
19
 
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND                     *
20
 
 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE    *
21
 
 * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION    *
22
 
 * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION     *
23
 
 * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.           *
 
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
 * 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 General Public License         *
 
16
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.     *
24
17
 *****************************************************************************/
 
18
 
25
19
#ifndef PHP_PARSEJOB_H
26
20
#define PHP_PARSEJOB_H
27
21
 
35
29
#include <ksharedptr.h>
36
30
#include <ktexteditor/range.h>
37
31
 
38
 
#include <language/duchain/duchainpointer.h>
39
 
#include <language/duchain/topducontext.h>
40
 
 
41
 
 
42
32
namespace Php
43
33
{
44
34
 
45
35
class LanguageSupport;
46
 
 
47
 
class ParseSession;
48
 
 
49
36
class EditorIntegrator;
50
37
 
51
38
class ParseJob : public KDevelop::ParseJob
56
43
    explicit ParseJob(const KUrl &url);
57
44
    virtual ~ParseJob();
58
45
 
59
 
    void setAST(StartAst* ast);
60
 
    virtual StartAst *ast() const;
61
 
 
62
46
    const KTextEditor::Range& textRangeToParse() const;
63
47
 
64
48
    LanguageSupport* php() const;
65
 
    ParseSession* parseSession() const;
66
 
    bool wasReadFromDisk() const;
67
49
 
68
50
    void setParentJob(ParseJob *job);
69
51
 
71
53
    virtual void run();
72
54
 
73
55
private:
74
 
    ParseSession *m_session;
75
 
    StartAst *m_ast;
76
 
    bool m_readFromDisk;
77
 
    KDevelop::ReferencedTopDUContext m_duContext;
78
56
    KUrl m_url;
79
57
    KTextEditor::Range m_textRangeToParse;
80
58
    ParseJob *m_parentJob; ///< parent job if this one is an include