Refactoring: reuse utility function in SymbolDatabase
This commit is contained in:
parent
6878de2c5e
commit
efd92fd714
|
@ -2628,16 +2628,7 @@ void SymbolDatabase::printVariable(const Variable *var, const char *indent) cons
|
|||
}
|
||||
}
|
||||
std::cout << indent << "mIndex: " << var->index() << std::endl;
|
||||
std::cout << indent << "mAccess: " <<
|
||||
(var->isPublic() ? "Public" :
|
||||
var->isProtected() ? "Protected" :
|
||||
var->isPrivate() ? "Private" :
|
||||
var->isGlobal() ? "Global" :
|
||||
var->isNamespace() ? "Namespace" :
|
||||
var->isArgument() ? "Argument" :
|
||||
var->isLocal() ? "Local" :
|
||||
var->isThrow() ? "Throw" :
|
||||
"Unknown") << std::endl;
|
||||
std::cout << indent << "mAccess: " << accessControlToString(var->accessControl()) << std::endl;
|
||||
std::cout << indent << "mFlags: " << std::endl;
|
||||
std::cout << indent << " isMutable: " << var->isMutable() << std::endl;
|
||||
std::cout << indent << " isStatic: " << var->isStatic() << std::endl;
|
||||
|
@ -2704,10 +2695,7 @@ void SymbolDatabase::printOut(const char *title) const
|
|||
func->type == Function::eDestructor ? "Destructor" :
|
||||
func->type == Function::eFunction ? "Function" :
|
||||
"Unknown") << std::endl;
|
||||
std::cout << " access: " << (func->access == Public ? "Public" :
|
||||
func->access == Protected ? "Protected" :
|
||||
func->access == Private ? "Private" :
|
||||
"Unknown") << std::endl;
|
||||
std::cout << " access: " << accessControlToString(func->access) << std::endl;
|
||||
std::cout << " hasBody: " << func->hasBody() << std::endl;
|
||||
std::cout << " isInline: " << func->isInline() << std::endl;
|
||||
std::cout << " isConst: " << func->isConst() << std::endl;
|
||||
|
|
|
@ -605,6 +605,10 @@ public:
|
|||
|
||||
void setValueType(const ValueType &valueType);
|
||||
|
||||
AccessControl accessControl() const {
|
||||
return mAccess;
|
||||
}
|
||||
|
||||
private:
|
||||
// only symbol database can change the type
|
||||
friend class SymbolDatabase;
|
||||
|
|
Loading…
Reference in New Issue