Doxygen
|
A node in a dot graph. More...
#include <src/dotnode.h>
Public Types | |
enum | TruncState { Unknown , Truncated , Untruncated } |
Public Member Functions | |
DotNode (DotGraph *graph, const QCString &lab, const QCString &tip, const QCString &url, bool rootNode=FALSE, const ClassDef *cd=nullptr) | |
void | addChild (DotNode *n, EdgeInfo::Colors edgeColor=EdgeInfo::Purple, EdgeInfo::Styles edgeStyle=EdgeInfo::Solid, const QCString &edgeLab=QCString(), const QCString &edgeURL=QCString(), int edgeLabCol=-1) |
void | addParent (DotNode *n) |
void | deleteNode (DotNodeRefVector &deletedList) |
void | removeChild (DotNode *n) |
void | removeParent (DotNode *n) |
int | findParent (DotNode *n) |
void | write (TextStream &t, GraphType gt, GraphOutputFormat f, bool topDown, bool toChildren, bool backArrows) |
void | writeXML (TextStream &t, bool isClassGraph) const |
void | writeDocbook (TextStream &t, bool isClassGraph) const |
void | writeDEF (TextStream &t) const |
void | writeLabel (TextStream &t, GraphType gt) const |
void | writeUrl (TextStream &t) const |
void | writeBox (TextStream &t, GraphType gt, GraphOutputFormat f, bool hasNonReachableChildren) const |
void | writeArrow (TextStream &t, GraphType gt, GraphOutputFormat f, const DotNode *cn, const EdgeInfo *ei, bool topDown, bool pointBack=TRUE) const |
QCString | label () const |
int | number () const |
bool | isVisible () const |
TruncState | isTruncated () const |
int | distance () const |
int | subgraphId () const |
bool | isRenumbered () const |
bool | hasDocumentation () const |
bool | isWritten () const |
void | clearWriteFlag () |
void | renumberNodes (int &number) |
void | markRenumbered () |
DotNode & | markHasDocumentation () |
void | setSubgraphId (int id) |
void | colorConnectedNodes (int curColor) |
void | setDistance (int distance) |
void | markAsVisible (bool b=TRUE) |
DotNode & | markAsTruncated (bool b=TRUE) |
const DotNodeRefVector & | children () const |
const DotNodeRefVector & | parents () const |
const EdgeInfoVector & | edgeInfo () const |
DotNode & | setNodeId (int number) |
Static Public Member Functions | |
static void | deleteNodes (DotNode *node) |
static QCString | convertLabel (const QCString &, bool htmlLike=false) |
Static Public Attributes | |
static constexpr auto | placeholderUrl = "-" |
Private Attributes | |
DotGraph * | m_graph |
int | m_number |
QCString | m_label |
label text | |
QCString | m_tooltip |
node's tooltip | |
QCString | m_url |
url of the node (format: remote$local) | |
DotNodeRefVector | m_parents |
list of parent nodes (incoming arrows) | |
DotNodeRefVector | m_children |
list of child nodes (outgoing arrows) | |
EdgeInfoVector | m_edgeInfo |
edge info for each child | |
bool | m_deleted = false |
used to mark a node as deleted | |
bool | m_written = false |
used to mark a node as written | |
bool | m_hasDoc = false |
used to mark a node as documented | |
bool | m_isRoot |
indicates if this is a root node | |
const ClassDef * | m_classDef |
class representing this node (can be 0) | |
bool | m_visible = false |
is the node visible in the output | |
TruncState | m_truncated = Unknown |
does the node have non-visible children/parents | |
int | m_distance = 1000 |
shortest path to the root node | |
bool | m_renumbered = false |
indicates if the node has been renumbered (to prevent endless loops) | |
int | m_subgraphId = -1 |
enum DotNode::TruncState |
DotNode::DotNode | ( | DotGraph * | graph, |
const QCString & | lab, | ||
const QCString & | tip, | ||
const QCString & | url, | ||
bool | rootNode = FALSE, | ||
const ClassDef * | cd = nullptr ) |
Definition at line 302 of file dotnode.cpp.
References m_classDef, m_graph, m_isRoot, m_label, m_number, m_tooltip, and m_url.
Referenced by addChild(), addParent(), deleteNodes(), findParent(), markAsTruncated(), markHasDocumentation(), removeChild(), removeParent(), setNodeId(), and writeArrow().
void DotNode::addChild | ( | DotNode * | n, |
EdgeInfo::Colors | edgeColor = EdgeInfo::Purple, | ||
EdgeInfo::Styles | edgeStyle = EdgeInfo::Solid, | ||
const QCString & | edgeLab = QCString(), | ||
const QCString & | edgeURL = QCString(), | ||
int | edgeLabCol = -1 ) |
Definition at line 314 of file dotnode.cpp.
References DotNode(), m_children, and m_edgeInfo.
Referenced by DotClassGraph::addClass(), DotGfxHierarchyTable::addHierarchy(), DotCallGraph::buildGraph(), and DotInclDepGraph::buildGraph().
void DotNode::addParent | ( | DotNode * | n | ) |
Definition at line 331 of file dotnode.cpp.
References DotNode(), and m_parents.
Referenced by DotClassGraph::addClass(), DotCallGraph::buildGraph(), and DotInclDepGraph::buildGraph().
|
inline |
Definition at line 122 of file dotnode.h.
References m_children.
Referenced by DotGfxHierarchyTable::addHierarchy(), DotCallGraph::determineTruncatedNodes(), DotClassGraph::determineTruncatedNodes(), DotInclDepGraph::determineTruncatedNodes(), DotCallGraph::determineVisibleNodes(), DotClassGraph::determineVisibleNodes(), DotInclDepGraph::determineVisibleNodes(), and write().
void DotNode::clearWriteFlag | ( | ) |
Definition at line 863 of file dotnode.cpp.
References FALSE, m_children, m_parents, and m_written.
Referenced by DotGraph::computeGraph().
void DotNode::colorConnectedNodes | ( | int | curColor | ) |
Definition at line 870 of file dotnode.cpp.
References m_children, and m_parents.
Definition at line 196 of file dotnode.cpp.
References Config_getInt, QCString::contains(), QCString::isEmpty(), QCString::length(), and QCString::stripWhiteSpace().
Referenced by drawClusterOpening(), drawDirectory(), DotGroupCollaboration::Edge::write(), writeArrow(), writeBoxMemberList(), and writeLabel().
void DotNode::deleteNode | ( | DotNodeRefVector & | deletedList | ) |
Definition at line 348 of file dotnode.cpp.
References m_children, m_deleted, m_parents, and TRUE.
Referenced by deleteNodes().
|
static |
helper function that deletes all nodes in a connected graph, given one of the graph's nodes
Definition at line 380 of file dotnode.cpp.
References deleteNode(), and DotNode().
Referenced by DotCallGraph::~DotCallGraph(), DotClassGraph::~DotClassGraph(), and DotInclDepGraph::~DotInclDepGraph().
|
inline |
Definition at line 106 of file dotnode.h.
References m_distance.
Referenced by DotCallGraph::determineVisibleNodes(), DotClassGraph::determineVisibleNodes(), DotInclDepGraph::determineVisibleNodes(), and setDistance().
|
inline |
Definition at line 124 of file dotnode.h.
References m_edgeInfo.
Referenced by writeDEF(), writeDocbook(), and writeXML().
|
inline |
|
inline |
|
inline |
Definition at line 108 of file dotnode.h.
References m_renumbered.
Referenced by renumberNodes().
|
inline |
Definition at line 105 of file dotnode.h.
References m_truncated.
Referenced by DotCallGraph::determineTruncatedNodes(), DotClassGraph::determineTruncatedNodes(), and DotInclDepGraph::determineTruncatedNodes().
|
inline |
Definition at line 104 of file dotnode.h.
References m_visible.
Referenced by DotCallGraph::determineTruncatedNodes(), DotClassGraph::determineTruncatedNodes(), DotInclDepGraph::determineTruncatedNodes(), DotCallGraph::determineVisibleNodes(), DotClassGraph::determineVisibleNodes(), and DotInclDepGraph::determineVisibleNodes().
|
inline |
|
inline |
Definition at line 102 of file dotnode.h.
References m_label.
Referenced by DotClassGraph::determineVisibleNodes().
Definition at line 121 of file dotnode.h.
References DotNode(), m_truncated, TRUE, Truncated, and Untruncated.
Referenced by DotCallGraph::determineTruncatedNodes(), DotClassGraph::determineTruncatedNodes(), and DotInclDepGraph::determineTruncatedNodes().
|
inline |
Definition at line 120 of file dotnode.h.
References m_visible, and TRUE.
Referenced by DotGroupCollaboration::addCollaborationMember(), DotGroupCollaboration::buildGraph(), DotCallGraph::determineVisibleNodes(), DotClassGraph::determineVisibleNodes(), and DotInclDepGraph::determineVisibleNodes().
|
inline |
|
inline |
|
inline |
Definition at line 103 of file dotnode.h.
References m_number.
Referenced by renumberNodes(), setNodeId(), and writeArrow().
|
inline |
Definition at line 123 of file dotnode.h.
References m_parents.
Referenced by DotGraph::computeGraph(), DotClassGraph::determineTruncatedNodes(), and DotClassGraph::determineVisibleNodes().
void DotNode::removeChild | ( | DotNode * | n | ) |
void DotNode::removeParent | ( | DotNode * | n | ) |
void DotNode::renumberNodes | ( | int & | number | ) |
Definition at line 897 of file dotnode.cpp.
References isRenumbered(), m_children, m_label, m_number, m_parents, markRenumbered(), number(), qPrint(), and subgraphId().
void DotNode::setDistance | ( | int | distance | ) |
Definition at line 366 of file dotnode.cpp.
References distance(), and m_distance.
Referenced by DotClassGraph::addClass(), DotCallGraph::buildGraph(), and DotInclDepGraph::buildGraph().
|
inline |
|
inline |
|
inline |
void DotNode::write | ( | TextStream & | t, |
GraphType | gt, | ||
GraphOutputFormat | f, | ||
bool | topDown, | ||
bool | toChildren, | ||
bool | backArrows ) |
Definition at line 630 of file dotnode.cpp.
References children(), FALSE, m_children, m_edgeInfo, m_parents, m_truncated, m_visible, m_written, TRUE, Truncated, writeArrow(), and writeBox().
Referenced by DotGraph::computeGraph().
void DotNode::writeArrow | ( | TextStream & | t, |
GraphType | gt, | ||
GraphOutputFormat | f, | ||
const DotNode * | cn, | ||
const EdgeInfo * | ei, | ||
bool | topDown, | ||
bool | pointBack = TRUE ) const |
Definition at line 579 of file dotnode.cpp.
References EdgeProperties::arrowStyleMap, Collaboration, EdgeInfo::color(), Config_getBool, convertLabel(), DotNode(), EdgeProperties::edgeColorMap, EdgeProperties::edgeStyleMap, Inheritance, QCString::isEmpty(), EdgeInfo::label(), m_graph, m_number, normalEdgeProps, number(), QCString::sprintf(), EdgeInfo::style(), and umlEdgeProps.
Referenced by DotGraph::computeGraph(), and write().
void DotNode::writeBox | ( | TextStream & | t, |
GraphType | gt, | ||
GraphOutputFormat | f, | ||
bool | hasNonReachableChildren ) const |
Definition at line 515 of file dotnode.cpp.
References escapeTooltip(), m_classDef, m_isRoot, m_number, m_tooltip, m_url, QCString::sprintf(), writeLabel(), and writeUrl().
Referenced by write().
void DotNode::writeDEF | ( | TextStream & | t | ) | const |
Definition at line 806 of file dotnode.cpp.
References ASSERT, EdgeInfo::Blue, edgeInfo(), QCString::find(), EdgeInfo::Green, EdgeInfo::Grey, QCString::left(), m_children, m_edgeInfo, m_label, m_number, m_url, QCString::mid(), EdgeInfo::Orange, EdgeInfo::Orange2, EdgeInfo::Purple, and EdgeInfo::Red.
void DotNode::writeDocbook | ( | TextStream & | t, |
bool | isClassGraph ) const |
Definition at line 743 of file dotnode.cpp.
References ASSERT, EdgeInfo::Blue, convertToXML(), edgeInfo(), QCString::find(), EdgeInfo::Green, EdgeInfo::Grey, QCString::left(), m_children, m_edgeInfo, m_label, m_number, m_url, QCString::mid(), EdgeInfo::Orange, EdgeInfo::Orange2, EdgeInfo::Purple, and EdgeInfo::Red.
void DotNode::writeLabel | ( | TextStream & | t, |
GraphType | gt ) const |
Definition at line 390 of file dotnode.cpp.
References Collaboration, Config_getBool, Config_getEnum, Config_getString, convertLabel(), convertToXML(), FALSE, Fortran, Inheritance, m_classDef, m_edgeInfo, m_isRoot, m_label, m_truncated, QCString::str(), stripProtectionPrefix(), TRUE, Truncated, and writeBoxMemberList().
Referenced by writeBox().
void DotNode::writeUrl | ( | TextStream & | t | ) | const |
Definition at line 490 of file dotnode.cpp.
References addHtmlExtensionIfMissing(), QCString::findRev(), QCString::left(), QCString::length(), m_url, placeholderUrl, and QCString::right().
Referenced by writeBox().
void DotNode::writeXML | ( | TextStream & | t, |
bool | isClassGraph ) const |
Definition at line 681 of file dotnode.cpp.
References ASSERT, EdgeInfo::Blue, convertToXML(), edgeInfo(), QCString::find(), EdgeInfo::Green, EdgeInfo::Grey, QCString::left(), m_children, m_edgeInfo, m_label, m_number, m_url, QCString::mid(), EdgeInfo::Orange, EdgeInfo::Orange2, EdgeInfo::Purple, and EdgeInfo::Red.
|
private |
list of child nodes (outgoing arrows)
Definition at line 134 of file dotnode.h.
Referenced by addChild(), children(), clearWriteFlag(), colorConnectedNodes(), deleteNode(), removeChild(), renumberNodes(), write(), writeDEF(), writeDocbook(), and writeXML().
|
private |
class representing this node (can be 0)
Definition at line 140 of file dotnode.h.
Referenced by DotNode(), writeBox(), and writeLabel().
|
private |
used to mark a node as deleted
Definition at line 136 of file dotnode.h.
Referenced by deleteNode().
|
private |
shortest path to the root node
Definition at line 143 of file dotnode.h.
Referenced by distance(), and setDistance().
|
private |
edge info for each child
Definition at line 135 of file dotnode.h.
Referenced by addChild(), edgeInfo(), write(), writeDEF(), writeDocbook(), writeLabel(), and writeXML().
|
private |
Definition at line 128 of file dotnode.h.
Referenced by DotNode(), and writeArrow().
|
private |
used to mark a node as documented
Definition at line 138 of file dotnode.h.
Referenced by hasDocumentation(), and markHasDocumentation().
|
private |
indicates if this is a root node
Definition at line 139 of file dotnode.h.
Referenced by DotNode(), writeBox(), and writeLabel().
|
private |
label text
Definition at line 130 of file dotnode.h.
Referenced by DotNode(), label(), renumberNodes(), writeDEF(), writeDocbook(), writeLabel(), and writeXML().
|
private |
Definition at line 129 of file dotnode.h.
Referenced by DotNode(), number(), renumberNodes(), setNodeId(), writeArrow(), writeBox(), writeDEF(), writeDocbook(), and writeXML().
|
private |
list of parent nodes (incoming arrows)
Definition at line 133 of file dotnode.h.
Referenced by addParent(), clearWriteFlag(), colorConnectedNodes(), deleteNode(), findParent(), parents(), removeParent(), renumberNodes(), and write().
|
private |
indicates if the node has been renumbered (to prevent endless loops)
Definition at line 144 of file dotnode.h.
Referenced by isRenumbered(), and markRenumbered().
|
private |
Definition at line 145 of file dotnode.h.
Referenced by setSubgraphId(), and subgraphId().
|
private |
|
private |
does the node have non-visible children/parents
Definition at line 142 of file dotnode.h.
Referenced by isTruncated(), markAsTruncated(), write(), and writeLabel().
|
private |
url of the node (format: remote$local)
Definition at line 132 of file dotnode.h.
Referenced by DotNode(), writeBox(), writeDEF(), writeDocbook(), writeUrl(), and writeXML().
|
private |
is the node visible in the output
Definition at line 141 of file dotnode.h.
Referenced by isVisible(), markAsVisible(), and write().
|
private |
used to mark a node as written
Definition at line 137 of file dotnode.h.
Referenced by clearWriteFlag(), isWritten(), and write().
|
staticconstexpr |
Definition at line 70 of file dotnode.h.
Referenced by DotLegendGraph::computeTheGraph(), and writeUrl().