11
11
12
12
namespace cppast {
13
13
14
- inline bool isFunction (const CppEntity& cppEntity)
14
+ inline bool IsFunction (const CppEntity& cppEntity)
15
15
{
16
16
return cppEntity.entityType () == CppEntityType::FUNCTION;
17
17
}
18
18
19
- inline bool isFunction (const std::unique_ptr<CppEntity>& cppEntity)
19
+ inline bool IsFunction (const std::unique_ptr<CppEntity>& cppEntity)
20
20
{
21
- return isFunction (*cppEntity);
21
+ return IsFunction (*cppEntity);
22
22
}
23
23
24
- inline bool isFunctionPtr (const CppEntity& cppEntity)
24
+ inline bool IsFunctionPtr (const CppEntity& cppEntity)
25
25
{
26
26
return cppEntity.entityType () == CppEntityType::FUNCTION_PTR;
27
27
}
28
28
29
- inline bool isFunctionPtr (const std::unique_ptr<CppEntity>& cppEntity)
29
+ inline bool IsFunctionPtr (const std::unique_ptr<CppEntity>& cppEntity)
30
30
{
31
- return isFunctionPtr (*cppEntity);
31
+ return IsFunctionPtr (*cppEntity);
32
32
}
33
33
34
- inline bool isFunctionLike (const CppEntity& cppEntity)
34
+ inline bool IsFunctionLike (const CppEntity& cppEntity)
35
35
{
36
36
return cppEntity.entityType () == CppEntityType::FUNCTION || cppEntity.entityType () == CppEntityType::CONSTRUCTOR
37
37
|| cppEntity.entityType () == CppEntityType::DESTRUCTOR
38
38
|| cppEntity.entityType () == CppEntityType::TYPE_CONVERTER;
39
39
}
40
40
41
- inline bool isFunctionLike (const std::unique_ptr<CppEntity>& cppEntity)
41
+ inline bool IsFunctionLike (const std::unique_ptr<CppEntity>& cppEntity)
42
42
{
43
- return isFunctionLike (*cppEntity);
43
+ return IsFunctionLike (*cppEntity);
44
44
}
45
45
46
- inline bool isDestructor (const CppEntity& cppEntity)
46
+ inline bool IsDestructor (const CppEntity& cppEntity)
47
47
{
48
48
return cppEntity.entityType () == CppEntityType::DESTRUCTOR;
49
49
}
50
50
51
- inline bool isDestructor (const std::unique_ptr<CppEntity>& cppEntity)
51
+ inline bool IsDestructor (const std::unique_ptr<CppEntity>& cppEntity)
52
52
{
53
- return isDestructor (*cppEntity);
53
+ return IsDestructor (*cppEntity);
54
54
}
55
55
56
- inline bool isEnum (const CppEntity& cppEntity)
56
+ inline bool IsEnum (const CppEntity& cppEntity)
57
57
{
58
58
return cppEntity.entityType () == CppEntityType::ENUM;
59
59
}
60
60
61
- inline bool isEnum (const std::unique_ptr<CppEntity> cppEntity)
61
+ inline bool IsEnum (const std::unique_ptr<CppEntity> cppEntity)
62
62
{
63
- return isEnum (*cppEntity);
63
+ return IsEnum (*cppEntity);
64
64
}
65
65
66
- inline bool isTypedefName (const CppEntity& cppEntity)
66
+ inline bool IsTypedefName (const CppEntity& cppEntity)
67
67
{
68
68
return cppEntity.entityType () == CppEntityType::TYPEDEF_DECL;
69
69
}
70
70
71
- inline bool isTypedefName (const std::unique_ptr<CppEntity>& cppEntity)
71
+ inline bool IsTypedefName (const std::unique_ptr<CppEntity>& cppEntity)
72
72
{
73
- return isTypedefName (*cppEntity);
73
+ return IsTypedefName (*cppEntity);
74
74
}
75
75
76
- inline bool isUsingDecl (const CppEntity& cppEntity)
76
+ inline bool IsUsingDecl (const CppEntity& cppEntity)
77
77
{
78
78
return cppEntity.entityType () == CppEntityType::USING_DECL;
79
79
}
80
80
81
- inline bool isUsingDecl (const std::unique_ptr<CppEntity>& cppEntity)
81
+ inline bool IsUsingDecl (const std::unique_ptr<CppEntity>& cppEntity)
82
82
{
83
- return isUsingDecl (*cppEntity);
83
+ return IsUsingDecl (*cppEntity);
84
84
}
85
85
86
- inline bool isCompound (const CppEntity& cppEntity)
86
+ inline bool IsCompound (const CppEntity& cppEntity)
87
87
{
88
88
return cppEntity.entityType () == CppEntityType::COMPOUND;
89
89
}
90
90
91
- inline bool isCompound (const std::unique_ptr<CppEntity>& cppEntity)
91
+ inline bool IsCompound (const std::unique_ptr<CppEntity>& cppEntity)
92
92
{
93
- return isCompound (*cppEntity);
93
+ return IsCompound (*cppEntity);
94
94
}
95
95
96
- inline bool isFwdClsDecl (const CppEntity& cppEntity)
96
+ inline bool IsFwdClsDecl (const CppEntity& cppEntity)
97
97
{
98
98
return cppEntity.entityType () == CppEntityType::FORWARD_CLASS_DECL;
99
99
}
100
100
101
- inline bool isFwdClsDecl (const std::unique_ptr<CppEntity>& cppEntity)
101
+ inline bool IsFwdClsDecl (const std::unique_ptr<CppEntity>& cppEntity)
102
102
{
103
- return isFwdClsDecl (*cppEntity);
103
+ return IsFwdClsDecl (*cppEntity);
104
104
}
105
105
106
- inline bool isNamespaceLike (const CppEntity& cppEntity)
106
+ inline bool IsNamespaceLike (const CppEntity& cppEntity)
107
107
{
108
108
const helper::CppEntityPtr<const CppCompound> compound = &cppEntity;
109
109
if (!compound )
@@ -115,74 +115,74 @@ inline bool isNamespaceLike(const CppEntity& cppEntity)
115
115
&& (compound ->compoundType () <= CppCompoundType::UNION);
116
116
}
117
117
118
- inline bool isNamespaceLike (const std::unique_ptr<CppEntity>& cppEntity)
118
+ inline bool IsNamespaceLike (const std::unique_ptr<CppEntity>& cppEntity)
119
119
{
120
- return isNamespaceLike (*cppEntity);
120
+ return IsNamespaceLike (*cppEntity);
121
121
}
122
122
123
- bool isClassLike (const CppEntity& cppEntity);
123
+ bool IsClassLike (const CppEntity& cppEntity);
124
124
125
- inline bool isClassLike (const std::unique_ptr<CppEntity>& cppEntity)
125
+ inline bool IsClassLike (const std::unique_ptr<CppEntity>& cppEntity)
126
126
{
127
- return isClassLike (*cppEntity);
127
+ return IsClassLike (*cppEntity);
128
128
}
129
129
130
- inline bool isTypedefLike (const CppEntity& cppEntity)
130
+ inline bool IsTypedefLike (const CppEntity& cppEntity)
131
131
{
132
132
return (cppEntity.entityType () == CppEntityType::TYPEDEF_DECL)
133
133
|| (cppEntity.entityType () == CppEntityType::USING_DECL);
134
134
}
135
135
136
- inline bool isTypedefLike (const std::unique_ptr<CppEntity>& cppEntity)
136
+ inline bool IsTypedefLike (const std::unique_ptr<CppEntity>& cppEntity)
137
137
{
138
- return isTypedefLike (*cppEntity);
138
+ return IsTypedefLike (*cppEntity);
139
139
}
140
140
141
- inline bool isPreProcessorType (const CppEntity& cppEntity)
141
+ inline bool IsPreProcessorType (const CppEntity& cppEntity)
142
142
{
143
143
return cppEntity.entityType () == CppEntityType::PREPROCESSOR;
144
144
}
145
145
146
- inline bool isPreProcessorType (const std::unique_ptr<CppEntity>& cppEntity)
146
+ inline bool IsPreProcessorType (const std::unique_ptr<CppEntity>& cppEntity)
147
147
{
148
- return isPreProcessorType (*cppEntity);
148
+ return IsPreProcessorType (*cppEntity);
149
149
}
150
150
151
- inline bool isVar (const CppEntity& cppEntity)
151
+ inline bool IsVar (const CppEntity& cppEntity)
152
152
{
153
153
return cppEntity.entityType () == CppEntityType::VAR;
154
154
}
155
155
156
- inline bool isVar (const std::unique_ptr<CppEntity>& cppEntity)
156
+ inline bool IsVar (const std::unique_ptr<CppEntity>& cppEntity)
157
157
{
158
- return isVar (*cppEntity);
158
+ return IsVar (*cppEntity);
159
159
}
160
160
161
- inline bool isVarList (const CppEntity& cppEntity)
161
+ inline bool IsVarList (const CppEntity& cppEntity)
162
162
{
163
163
return cppEntity.entityType () == CppEntityType::VAR_LIST;
164
164
}
165
165
166
- inline bool isVarList (const std::unique_ptr<CppEntity>& cppEntity)
166
+ inline bool IsVarList (const std::unique_ptr<CppEntity>& cppEntity)
167
167
{
168
- return isVarList (*cppEntity);
168
+ return IsVarList (*cppEntity);
169
169
}
170
170
171
- inline bool isExpr (const CppEntity& cppEntity)
171
+ inline bool IsExpr (const CppEntity& cppEntity)
172
172
{
173
173
return cppEntity.entityType () == CppEntityType::EXPRESSION;
174
174
}
175
175
176
- inline bool isExpr (const std::unique_ptr<CppEntity>& cppEntity)
176
+ inline bool IsExpr (const std::unique_ptr<CppEntity>& cppEntity)
177
177
{
178
- return isExpr (*cppEntity);
178
+ return IsExpr (*cppEntity);
179
179
}
180
180
181
- inline CppCompound* root (const CppEntity& cppEntity)
181
+ inline CppCompound* Root (const CppEntity& cppEntity)
182
182
{
183
183
if (cppEntity.owner () == nullptr )
184
- return isCompound (cppEntity) ? const_cast <CppCompound*>(static_cast <const CppCompound*>(&cppEntity)) : nullptr ;
185
- return root (*cppEntity.owner ());
184
+ return IsCompound (cppEntity) ? const_cast <CppCompound*>(static_cast <const CppCompound*>(&cppEntity)) : nullptr ;
185
+ return Root (*cppEntity.owner ());
186
186
}
187
187
188
188
} // namespace cppast
0 commit comments