2
Copyright 2008 Hamish Rodda <rodda@kde.org>
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
License version 2 as published by the Free Software Foundation.
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.
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 Street, Fifth Floor,
16
Boston, MA 02110-1301, USA.
22
#include <language/codegen/astchangeset.h>
26
class AccessSpecifierChange;
27
class AsmDefinitionChange;
28
class BaseClauseChange;
29
class BaseSpecifierChange;
30
class BinaryExpressionChange;
31
class CastExpressionChange;
32
class ClassMemberAccessChange;
33
class ClassSpecifierChange;
34
class CompoundStatementChange;
35
class ConditionChange;
36
class ConditionalExpressionChange;
37
class CppCastExpressionChange;
38
class CtorInitializerChange;
39
class DeclarationChange;
40
class DeclarationStatementChange;
41
class DeclaratorChange;
42
class DeleteExpressionChange;
43
class DoStatementChange;
44
class ElaboratedTypeSpecifierChange;
45
class EnumSpecifierChange;
46
class EnumeratorChange;
47
class ExceptionSpecificationChange;
48
class ExpressionChange;
49
class ExpressionOrDeclarationStatementChange;
50
class ExpressionStatementChange;
51
class ForStatementChange;
52
class FunctionCallChange;
53
class FunctionDefinitionChange;
54
class IfStatementChange;
55
class IncrDecrExpressionChange;
56
class InitDeclaratorChange;
57
class InitializerChange;
58
class InitializerClauseChange;
59
class JumpStatementChange;
60
class LabeledStatementChange;
61
class LinkageBodyChange;
62
class LinkageSpecificationChange;
63
class MemInitializerChange;
65
class NamespaceChange;
66
class NamespaceAliasDefinitionChange;
67
class NewDeclaratorChange;
68
class NewExpressionChange;
69
class NewInitializerChange;
70
class NewTypeIdChange;
72
class OperatorFunctionIdChange;
73
class ParameterDeclarationChange;
74
class ParameterDeclarationClauseChange;
75
class PostfixExpressionChange;
76
class PrimaryExpressionChange;
77
class PtrOperatorChange;
78
class PtrToMemberChange;
79
class ReturnStatementChange;
80
class SimpleDeclarationChange;
81
class SimpleTypeSpecifierChange;
82
class SizeofExpressionChange;
83
class StatementChange;
84
class StringLiteralChange;
85
class SubscriptExpressionChange;
86
class SwitchStatementChange;
87
class SignalSlotExpressionChange;
88
class TemplateArgumentChange;
89
class TemplateDeclarationChange;
90
class TemplateParameterChange;
91
class ThrowExpressionChange;
92
class TranslationUnitChange;
93
class TryBlockStatementChange;
94
class CatchStatementChange;
96
class TypeIdentificationChange;
97
class TypeParameterChange;
98
class TypeSpecifierChange;
100
class UnaryExpressionChange;
101
class UnqualifiedNameChange;
103
class UsingDirectiveChange;
104
class WhileStatementChange;
105
class WinDeclSpecChange;
111
template <typename BaseChange, typename AstNode, typename AstChange>
115
ListChange(BaseChange* change);
120
AstNode* nodeAt(int index) const;
121
AstChange* changeAt(int index) const;
124
void insert(AstChange* change, int index);
125
void append(AstChange* change);
126
AstChange* change(int index);
127
void remove(AstNode* node);
128
void remove(AstChange* change);
131
BaseChange* m_change;
134
class UnqualifiedNameChange : public Change, public KDevelop::AstNodeRef<UnqualifiedNameAST>
136
void setTilde(bool hasTilde);
137
void setId(bool hasId);
138
//OperatorFunctionIdChange* operatorId();
139
//ListChange<UnqualifiedNameChange, TemplateArgumentAST, TemplateArgumentChange> templateArguments;
142
class NameChange : public Change, public KDevelop::AstNodeRef<NameAST>
144
void setGlobal(bool global);
145
ListChange<NameChange, UnqualifiedNameAST, UnqualifiedNameChange> qualifiedNames;
146
UnqualifiedNameChange* changeUnqualifiedName();
149
class BaseClauseChange : public Change, public KDevelop::AstNodeRef<BaseClauseAST>
152
ListChange<BaseClauseChange, BaseSpecifierAST, BaseSpecifierChange> baseSpecifiers;
155
class BaseSpecifierChange : public Change, public KDevelop::AstNodeRef<BaseSpecifierAST>
158
bool isVirtual() const;
159
void setVirtual(bool isVirtual);
161
int accessSpecifier() const;
162
void setAccessSpecifier(int token);
164
NameChange* changeName();
167
class DeclarationChange
172
/*AccessSpecifierChange* accessSpecifier();
173
AsmDefinitionChange* asmDefinition();
174
FunctionDefinitionChange* functionDefinition();
175
LinkageSpecificationChange* linkageSpecification();
176
NamespaceChange* namespaceChange();
177
NamespaceAliasDefinitionChange* namespaceAliasDefinition();
178
SimpleDeclarationChange* simpleDeclaration();
179
TemplateDeclarationChange* templateDeclaration();
180
TypedefChange* typedefChange();
181
UsingChange* usingChange();*/
184
class ClassSpecifierChange : public Change, public KDevelop::AstNodeRef<ClassSpecifierAST>
187
//WinDeclSpecChange* changeWinDeclSpec();
188
void newClassKey(std::size_t class_key);
190
NameChange* changeName();
191
BaseClauseChange* changeBaseClause();
193
ListChange<ClassSpecifierChange, DeclarationAST, DeclarationChange> members;
196
#endif // ASTCHANGE_H