MCPcopy Create free account
hub / github.com/KDE/kdevelop / accessPolicyName

Function accessPolicyName

kdevplatform/language/codegen/codedescription.cpp:27–44  ·  view source on GitHub ↗

* The access policy as a string, or an empty string * if the policy is set to default * * The DUChain must be locked when calling this function **/

Source from the content-addressed store, hash-verified

25 * The DUChain must be locked when calling this function
26 **/
27QString accessPolicyName(const DeclarationPointer& declaration)
28{
29 DUChainPointer<ClassMemberDeclaration> member = declaration.dynamicCast<ClassMemberDeclaration>();
30 if (member) {
31 switch (member->accessPolicy())
32 {
33 case Declaration::Private:
34 return QStringLiteral("private");
35 case Declaration::Protected:
36 return QStringLiteral("protected");
37 case Declaration::Public:
38 return QStringLiteral("public");
39 default:
40 break;
41 }
42 }
43 return QString();
44}
45
46VariableDescription::VariableDescription()
47{

Callers 2

VariableDescriptionMethod · 0.85
FunctionDescriptionMethod · 0.85

Calls 2

accessPolicyMethod · 0.80
QStringClass · 0.70

Tested by

no test coverage detected