logic: Show inheritance edges between parents of active symbol and other visible symbols (issue #167)
* add inheritance edges between parents of active symbol and other visible symbols * add dashed inheritance edges when symbols are no direct decendants * inheritance edges are also respected in layouting, putting base/derived classes in the correct top/bottom spot now bug id = 167
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
|
||||
#include "data/graph/Node.h"
|
||||
#include "data/graph/token_component/TokenComponentAggregation.h"
|
||||
#include "data/graph/token_component/TokenComponentInheritanceChain.h"
|
||||
#include "utility/logging/logging.h"
|
||||
#include "utility/utilityString.h"
|
||||
|
||||
@@ -134,6 +135,22 @@ void Edge::addComponentAggregation(std::shared_ptr<TokenComponentAggregation> co
|
||||
}
|
||||
}
|
||||
|
||||
void Edge::addComponentInheritanceChain(std::shared_ptr<TokenComponentInheritanceChain> component)
|
||||
{
|
||||
if (getComponent<TokenComponentInheritanceChain>())
|
||||
{
|
||||
LOG_ERROR("TokenComponentInheritanceChain has been set before!");
|
||||
}
|
||||
else if (m_type != EDGE_INHERITANCE)
|
||||
{
|
||||
LOG_ERROR("TokenComponentInheritanceChain can't be set on edge of type: " + getReadableTypeString());
|
||||
}
|
||||
else
|
||||
{
|
||||
addComponent(component);
|
||||
}
|
||||
}
|
||||
|
||||
std::string Edge::getUnderscoredTypeString(EdgeType type)
|
||||
{
|
||||
return utility::replace(utility::replace(getReadableTypeString(type), "-", "_"), " ", "_");
|
||||
|
||||
Reference in New Issue
Block a user