Add AbstractDeclarationNavigationContext, and move the html-method from
[kdevelopdvcssupport.git] / language / duchain / classmemberdeclaration.h
blob26d3e3ae35b09831e2d506f9f579614bd76b8ac7
1 /* This file is part of KDevelop
2 Copyright 2002-2005 Roberto Raggi <roberto@kdevelop.org>
3 Copyright 2006 Adam Treat <treat@kde.org>
4 Copyright 2006 Hamish Rodda <rodda@kde.org>
6 This library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Library General Public
8 License version 2 as published by the Free Software Foundation.
10 This library 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 GNU
13 Library General Public License for more details.
15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to
17 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 Boston, MA 02110-1301, USA.
21 #ifndef CLASSMEMBERDECLARATION_H
22 #define CLASSMEMBERDECLARATION_H
24 #include "declaration.h"
26 namespace KDevelop
28 class ClassMemberDeclarationData;
29 /**
30 * Represents a single class member definition in a definition-use chain.
32 class KDEVPLATFORMLANGUAGE_EXPORT ClassMemberDeclaration : public Declaration
34 public:
35 ClassMemberDeclaration(const ClassMemberDeclaration& rhs);
36 ClassMemberDeclaration(const SimpleRange& range, DUContext* context);
37 ClassMemberDeclaration(ClassMemberDeclarationData& dd);
38 ~ClassMemberDeclaration();
40 AccessPolicy accessPolicy() const;
41 void setAccessPolicy(AccessPolicy accessPolicy);
43 enum StorageSpecifier {
44 StaticSpecifier = 0x1 /**< indicates static member */,
45 AutoSpecifier = 0x2 /**< indicates automatic determination of member access */,
46 FriendSpecifier = 0x4 /**< indicates friend member */,
47 ExternSpecifier = 0x8 /**< indicates external declaration */,
48 RegisterSpecifier = 0x10 /**< indicates register */,
49 MutableSpecifier = 0x20 /**< indicates a mutable member */
51 Q_DECLARE_FLAGS(StorageSpecifiers, StorageSpecifier)
53 void setStorageSpecifiers(StorageSpecifiers specifiers);
55 bool isStatic() const;
56 void setStatic(bool isStatic);
58 bool isAuto() const;
59 void setAuto(bool isAuto);
61 bool isFriend() const;
62 void setFriend(bool isFriend);
64 bool isRegister() const;
65 void setRegister(bool isRegister);
67 bool isExtern() const;
68 void setExtern(bool isExtern);
70 bool isMutable() const;
71 void setMutable(bool isMutable);
73 enum {
74 Identity = 9
77 protected:
78 ClassMemberDeclaration(ClassMemberDeclarationData& dd, const SimpleRange& range);
80 DUCHAIN_DECLARE_DATA(ClassMemberDeclaration)
81 private:
82 virtual Declaration* clonePrivate() const;
87 Q_DECLARE_OPERATORS_FOR_FLAGS(KDevelop::ClassMemberDeclaration::StorageSpecifiers)
89 #endif // CLASSMEMBERDECLARATION_H
91 // kate: space-indent on; indent-width 2; tab-width 4; replace-tabs on; auto-insert-doxygen on