data: name hierarchy refactoring

* replaced typenames (which have been stored as single sting where "::" indicated hierarchy levels) by a vector of strings where each element indicates a hierarchy level.
* introduced this change to the Storage method signatures, the ParseFunction and ParseVariable
* this way the SearchIndex creates a node for each level of the hierarchy.
This commit is contained in:
malte_langkabel
2014-10-24 11:25:34 +02:00
parent ce91216e97
commit a1b874c520
21 changed files with 341 additions and 232 deletions
+4 -3
View File
@@ -7,6 +7,7 @@
#include "data/parser/ParseTypeUsage.h"
#include "data/parser/ParseVariable.h"
#include "data/type/DataType.h"
#include "utility/utilityString.h"
std::string ParserClient::addAccessPrefix(const std::string& str, AccessType access)
{
@@ -86,7 +87,7 @@ std::string ParserClient::addLocationSuffix(
std::string ParserClient::variableStr(const ParseVariable& variable)
{
std::string str = variable.type.dataType.getFullTypeName() + " " + variable.fullName;
std::string str = variable.type.dataType.getFullTypeName() + " " + variable.getFullName();
return addStaticPrefix(str, variable.isStatic);
}
@@ -107,13 +108,13 @@ std::string ParserClient::parameterStr(const std::vector<ParseTypeUsage> paramet
std::string ParserClient::functionStr(const ParseFunction& function)
{
std::string str =
function.returnType.dataType.getFullTypeName() + " " + function.fullName + parameterStr(function.parameters);
function.returnType.dataType.getFullTypeName() + " " + function.getFullName() + parameterStr(function.parameters);
return addConstPrefix(addStaticPrefix(str, function.isStatic), function.isConst, false);
}
std::string ParserClient::functionSignatureStr(const ParseFunction& function)
{
return addConstPrefix(function.fullName + parameterStr(function.parameters), function.isConst, false);
return addConstPrefix(function.getFullName() + parameterStr(function.parameters), function.isConst, false);
}
ParserClient::ParserClient()