data: Parsing type usages within function and method bodies

This change parses type usages in function and method bodies and saves them with an edge of type EDGE_TYPE_USAGE. This
also includes base class types used in initialization lists of derived class constructors.
This commit is contained in:
Eberhard Graether
2014-07-30 22:35:30 +02:00
parent dc09860680
commit 890575cd90
14 changed files with 190 additions and 23 deletions
+5 -2
View File
@@ -90,8 +90,9 @@ void Edge::addComponentDataType(std::shared_ptr<TokenComponentDataType> componen
{
LOG_ERROR("TokenComponentDataType has been set before!");
}
else if (m_type != EDGE_TYPEDEF_OF && m_type != EDGE_TYPE_OF
&& m_type != EDGE_RETURN_TYPE_OF && m_type != EDGE_PARAMETER_TYPE_OF)
else if (m_type != EDGE_TYPEDEF_OF && m_type != EDGE_TYPE_OF &&
m_type != EDGE_RETURN_TYPE_OF && m_type != EDGE_PARAMETER_TYPE_OF &&
m_type != EDGE_TYPE_USAGE)
{
LOG_ERROR("TokenComponentDataType can't be set on edge of type: " + getTypeString());
}
@@ -113,6 +114,8 @@ std::string Edge::getTypeString() const
return "return type";
case EDGE_PARAMETER_TYPE_OF:
return "parameter type";
case EDGE_TYPE_USAGE:
return "type usage";
case EDGE_INHERITANCE:
return "inheritance";
case EDGE_CALL: