data: cleaned up Graph classes

* removed self assignment of id from Token
* removed FilterableGraph interface from Graph
* creating Nodes and Edges on Graph with addNode and addGraph methods
* removed obsolete Aggregation edge filtering
* fixed clang warnings
* fixed memory leak for Node creation
This commit is contained in:
Eberhard Graether
2015-08-27 17:25:52 +02:00
parent e628241b02
commit 2044ff9723
16 changed files with 253 additions and 332 deletions
+4 -2
View File
@@ -11,12 +11,14 @@ class TokenComponentAggregation;
class TokenComponentAccess;
class TokenComponentDataType;
class Edge: public Token
class Edge
: public Token
{
public:
typedef int EdgeTypeMask;
enum EdgeType : EdgeTypeMask
{
EDGE_NONE = 0x0,
EDGE_MEMBER = 0x1,
EDGE_TYPE_OF = 0x2,
EDGE_RETURN_TYPE_OF = 0x4, // unused: see Storage::addFunctionNode()
@@ -36,10 +38,10 @@ public:
EDGE_AGGREGATION = 0x8000
};
static int typeToInt(EdgeType type);
static EdgeType intToType(int value);
Edge(EdgeType type, Node* from, Node* to);
Edge(Id id, EdgeType type, Node* from, Node* to);
Edge(const Edge& other, Node* from, Node* to);
virtual ~Edge();