data: Macro handling

Macros have now edges from Files where they are usesd
This commit is contained in:
Andreas Stallinger
2015-09-28 15:25:52 +02:00
parent dd4d74a1d9
commit e3696df5e1
19 changed files with 272 additions and 69 deletions
+11
View File
@@ -49,6 +49,8 @@ Edge::EdgeType Edge::intToType(int value)
return EDGE_INCLUDE;
case 0x8000:
return EDGE_AGGREGATION;
case 0x10000:
return EDGE_MACRO_USAGE;
}
return EDGE_NONE;
@@ -214,7 +216,10 @@ std::string Edge::getTypeString(EdgeType type)
return "include";
case EDGE_AGGREGATION:
return "aggregation";
case EDGE_MACRO_USAGE:
return "macro_use";
}
return "";
}
@@ -358,6 +363,12 @@ bool Edge::checkType() const
break;
}
return true;
case EDGE_MACRO_USAGE:
if(!m_to->isType(Node::NODE_MACRO) || !m_from->isType(Node::NODE_FILE))
{
break;
}
return true;
}
LOG_ERROR_STREAM(
+2 -1
View File
@@ -36,7 +36,8 @@ public:
EDGE_INCLUDE = 0x4000,
EDGE_AGGREGATION = 0x8000
EDGE_AGGREGATION = 0x8000,
EDGE_MACRO_USAGE = 0x10000,
};
static int typeToInt(EdgeType type);
+6
View File
@@ -47,7 +47,10 @@ std::string Node::getTypeString(NodeType type)
return "template_parameter_type";
case NODE_FILE:
return "file";
case NODE_MACRO:
return "macro";
}
return "";
}
@@ -92,7 +95,10 @@ Node::NodeType Node::intToType(int value)
return NODE_TEMPLATE_PARAMETER_TYPE;
case 0x8000:
return NODE_FILE;
case 0x10000:
return NODE_MACRO;
}
return NODE_UNDEFINED;
}
+2 -1
View File
@@ -40,7 +40,8 @@ public:
NODE_TYPEDEF = 0x2000,
NODE_TEMPLATE_PARAMETER_TYPE = 0x4000,
NODE_FILE = 0x8000
NODE_FILE = 0x8000,
NODE_MACRO = 0x10000,
};
static std::string getTypeString(NodeType type);