data: storing type modifiers in edges

- ASTVisitor uses DataType instead of string to pass on type information.
- Edges can have EdgeComponents.
- EdgeComponentDataType stores information that modifies the type a ...TYPE_OF edge points to.
- EdgeComponentDataType can create a complete DataType using it's internal information.
- Fixed a bug where DataTypeModifiers did not apply their qualifiers.
This commit is contained in:
malte_langkabel
2014-07-10 11:54:29 +02:00
parent 2eaecc4913
commit f1f2ea0ccd
25 changed files with 311 additions and 111 deletions
+12
View File
@@ -2,6 +2,7 @@
#include <sstream>
#include "data/graph/edgeComponent/EdgeComponent.h"
#include "data/graph/Node.h"
#include "utility/logging/logging.h"
@@ -33,6 +34,11 @@ std::shared_ptr<Edge> Edge::createPlainCopy(Node* from, Node* to) const
edge->setAccess(m_access);
for (std::shared_ptr<EdgeComponent> component: m_components)
{
edge->addComponent(component); // Todo: create a deep copy here
}
return edge;
}
@@ -132,6 +138,12 @@ std::string Edge::getAsString() const
return str.str();
}
void Edge::addComponent(std::shared_ptr<EdgeComponent> component)
{
m_components.push_back(component);
component->setEdge(this);
}
Edge::Edge(Id id, EdgeType type, Node* from, Node* to)
: Token(id)
, m_type(type)