Dumps: Added isVirtual/isImplicitlyVirtual info

This commit is contained in:
Daniel Marjamäki 2018-04-13 21:15:43 +02:00
parent fb803789fd
commit 97c86ff0e6
2 changed files with 13 additions and 0 deletions

View File

@ -316,11 +316,18 @@ class Function:
tokenDef = None
tokenDefId = None
name = None
isVirtual = None
isImplicitlyVirtual = None
def __init__(self, element):
self.Id = element.get('id')
self.tokenDefId = element.get('tokenDef')
self.name = element.get('name')
isVirtual = element.get('isVirtual')
self.isVirtual = (isVirtual and isVirtual == 'true')
isImplicitlyVirtual = element.get('isImplicitlyVirtual')
self.isImplicitlyVirtual = (isImplicitlyVirtual and isImplicitlyVirtual == 'true')
self.argument = {}
self.argumentId = {}
for arg in element:

View File

@ -3005,6 +3005,12 @@ void SymbolDatabase::printXml(std::ostream &out) const
out << " <functionList>" << std::endl;
for (std::list<Function>::const_iterator function = scope->functionList.begin(); function != scope->functionList.end(); ++function) {
out << " <function id=\"" << &*function << "\" tokenDef=\"" << function->tokenDef << "\" name=\"" << ErrorLogger::toxml(function->name()) << '\"';
if (function->nestedIn->definedType) {
if (function->isVirtual())
out << " isVirtual=\"true\"";
else if (function->isImplicitlyVirtual())
out << " isImplicitlyVirtual=\"true\"";
}
if (function->argCount() == 0U)
out << "/>" << std::endl;
else {