1
/***************************************************************************
2
* This file is part of KDevelop *
3
* Copyright 2008 Milian Wolff <mail@milianw.de> *
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. *
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. *
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
***************************************************************************/
21
#ifndef CLASSMETHODDECLARATION_H
22
#define CLASSMETHODDECLARATION_H
24
#include <language/duchain/classfunctiondeclaration.h>
26
#include <language/duchain/declaration.h>
27
#include <language/duchain/declarationdata.h>
28
#include <language/duchain/indexedstring.h>
30
#include "phpduchainexport.h"
35
class KDEVPHPDUCHAIN_EXPORT ClassMethodDeclarationData : public KDevelop::ClassFunctionDeclarationData
38
ClassMethodDeclarationData()
39
: KDevelop::ClassFunctionDeclarationData() {}
41
ClassMethodDeclarationData(const ClassMethodDeclarationData& rhs)
42
: KDevelop::ClassFunctionDeclarationData(rhs)
44
prettyName = rhs.prettyName;
47
~ClassMethodDeclarationData() {}
49
KDevelop::IndexedString prettyName;
53
* inherits ClassFunctionDeclaration to overwrite some stuff for PHP specific behaviour
55
class KDEVPHPDUCHAIN_EXPORT ClassMethodDeclaration : public KDevelop::ClassFunctionDeclaration
58
ClassMethodDeclaration(const ClassMethodDeclaration &rhs);
59
ClassMethodDeclaration(const KDevelop::SimpleRange &range, KDevelop::DUContext *context);
60
ClassMethodDeclaration(ClassMethodDeclarationData &data);
61
ClassMethodDeclaration(ClassMethodDeclarationData &data, const KDevelop::SimpleRange &range, KDevelop::DUContext *context);
62
~ClassMethodDeclaration();
64
/// overwritten to check for __construct() method
65
virtual bool isConstructor() const;
66
/// overwritten to check for __destruct() method
67
virtual bool isDestructor() const;
69
virtual QString toString() const;
71
void setPrettyName(const QString& name);
72
QString prettyName() const;
78
virtual KDevelop::Declaration* clonePrivate() const;
80
DUCHAIN_DECLARE_DATA(ClassMethodDeclaration)
85
#endif // CLASSMETHODDECLARATION_H