Doxygen
Loading...
Searching...
No Matches
DotGroupCollaboration::Edge Struct Reference
+ Collaboration diagram for DotGroupCollaboration::Edge:

Public Member Functions

 Edge (DotNode *start, DotNode *end, EdgeType type)
 
void write (TextStream &t) const
 

Public Attributes

DotNodepNStart
 
DotNodepNEnd
 
EdgeType eType
 
std::vector< Linklinks
 

Detailed Description

Definition at line 66 of file dotgroupcollaboration.h.

Constructor & Destructor Documentation

◆ Edge()

DotGroupCollaboration::Edge::Edge ( DotNode * start,
DotNode * end,
EdgeType type )
inline

Definition at line 68 of file dotgroupcollaboration.h.

69 : pNStart(start), pNEnd(end), eType(type) {}
DirIterator end(const DirIterator &) noexcept
Definition dir.cpp:175

References DotGraph::DotNode, end(), eType, pNEnd, and pNStart.

Member Function Documentation

◆ write()

void DotGroupCollaboration::Edge::write ( TextStream & t) const

Definition at line 259 of file dotgroupcollaboration.cpp.

260{
261 const char* linkTypeColor[] = {
262 "darkorchid3"
263 ,"orange"
264 ,"blueviolet"
265 ,"darkgreen"
266 ,"firebrick4"
267 ,"grey75"
268 ,"midnightblue"
269 };
270 QCString arrowStyle = "dir=\"none\", style=\"dashed\"";
271 t << " Node" << pNStart->number();
272 t << "->";
273 t << "Node" << pNEnd->number();
274
275 t << " [shape=plaintext";
276 if (!links.empty()) // there are links
277 {
278 t << ", ";
279 // HTML-like edge labels crash on my Mac with Graphviz 2.0! and
280 // are not supported by older version of dot.
281 //
282 //t << label=<<TABLE BORDER=\"0\" CELLBORDER=\"0\">";
283 //for (const auto &link : links)
284 //{
285 // t << "<TR><TD";
286 // if ( !link.url.isEmpty() )
287 // t << " HREF=\"" << link.url << "\"";
288 // t << ">" << DotNode::convertLabel(link->label) << "</TD></TR>";
289 //}
290 //t << "</TABLE>>";
291
292 t << "label=\"";
293 bool first=TRUE;
294 int count=0;
295 const int maxLabels = 10;
296 for (const auto &link : links)
297 {
298 if (first) first=FALSE; else t << "\\n";
299 t << DotNode::convertLabel(link.label);
300 count++;
301 }
302 if (count==maxLabels) t << "\\n...";
303 t << "\"";
304
305 }
306 switch( eType )
307 {
308 case thierarchy:
309 arrowStyle = "dir=\"back\", style=\"solid\"";
310 break;
311 default:
312 t << ", color=\"" << linkTypeColor[static_cast<int>(eType)] << "\"";
313 break;
314 }
315 t << ", " << arrowStyle;
316 t << "];\n";
317}
static QCString convertLabel(const QCString &, bool htmlLike=false)
Definition dotnode.cpp:196
#define TRUE
Definition qcstring.h:37
#define FALSE
Definition qcstring.h:34

References DotNode::convertLabel(), eType, FALSE, links, pNEnd, pNStart, DotGroupCollaboration::thierarchy, and TRUE.

Member Data Documentation

◆ eType

EdgeType DotGroupCollaboration::Edge::eType

Definition at line 73 of file dotgroupcollaboration.h.

Referenced by Edge(), and write().

◆ links

std::vector<Link> DotGroupCollaboration::Edge::links

Definition at line 75 of file dotgroupcollaboration.h.

Referenced by write().

◆ pNEnd

DotNode* DotGroupCollaboration::Edge::pNEnd

Definition at line 72 of file dotgroupcollaboration.h.

Referenced by Edge(), and write().

◆ pNStart

DotNode* DotGroupCollaboration::Edge::pNStart

Definition at line 71 of file dotgroupcollaboration.h.

Referenced by Edge(), and write().


The documentation for this struct was generated from the following files: