data: Moved EdgeComponent system to Token and extended it to cover all type specific Edge and Token fields
This change moves the EdgeComponent system to Token and redefines them as TokenComponents. * Performance tests on the side showed that using typeid() in getComponent() is faster than dynamically casting every pointer. * The hasComponent() method was deliberately left out in the implementation, because it used to look up the right component and discard it again. This check for presence can also be achieved by just using getComponent(). * The method addComponent() is protected in Token, so that Node and Edge can guard which Component is set on which type by implementing specific setters for each Component. * The GraphTestSuite was extended to include tests for the Component implementation (and missing tests for locationIds in Token and copying of Node and Edge were added).
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
ConfigManager.cpp ERROR: value path/to/nowhere is not present in config.
|
||||
Token.cpp ERROR: Location Id was not referenced by this Token.
|
||||
Node.cpp WARNING: Changing NodeType after it was already set, from namespace to class
|
||||
Edge.cpp ERROR: Nodes are not plain copies.
|
||||
Graph.cpp ERROR: Can't remove member edge, without removing the child node.
|
||||
TextAccess.cpp WARNING: Index 'firstLine' has to be lower or equal index 'lastLine', is 3 > 2
|
||||
TextAccess.cpp WARNING: Tried to access index 10. Maximum index is 8
|
||||
|
||||
Reference in New Issue
Block a user