data: saving NameHierarchy directly to Node without TokenComponentName

This commit is contained in:
Eberhard Graether
2015-09-23 12:45:58 +02:00
parent b07bc7ed19
commit 391082160c
13 changed files with 69 additions and 219 deletions
+2 -2
View File
@@ -40,7 +40,7 @@ void Graph::forEachToken(std::function<void(Token*)> func) const
forEachEdge(func);
}
Node* Graph::createNode(Id id, Node::NodeType type, std::shared_ptr<TokenComponentName> nameComponent)
Node* Graph::createNode(Id id, Node::NodeType type, NameHierarchy nameHierarchy)
{
Node* n = getNodeById(id);
if (n)
@@ -48,7 +48,7 @@ Node* Graph::createNode(Id id, Node::NodeType type, std::shared_ptr<TokenCompone
return n;
}
std::shared_ptr<Node> node = std::make_shared<Node>(id, type, nameComponent);
std::shared_ptr<Node> node = std::make_shared<Node>(id, type, nameHierarchy);
m_nodes.emplace(node->getId(), node);
return node.get();
}