Doxygen
DotGroupCollaboration::Edge结构体 参考
+ DotGroupCollaboration::Edge 的协作图:

Public 成员函数

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

Public 属性

DotNodepNStart
 
DotNodepNEnd
 
EdgeType eType
 
std::vector< Linklinks
 

详细描述

在文件 dotgroupcollaboration.h62 行定义.

构造及析构函数说明

◆ Edge()

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

在文件 dotgroupcollaboration.h64 行定义.

65  : pNStart(start), pNEnd(end), eType(type) {}

成员函数说明

◆ write()

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

在文件 dotgroupcollaboration.cpp252 行定义.

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

引用了 DotNode::convertLabel(), eType, FALSE, links, DotNode::number(), pNEnd, pNStart, DotGroupCollaboration::thierarchy , 以及 TRUE.

类成员变量说明

◆ eType

EdgeType DotGroupCollaboration::Edge::eType

在文件 dotgroupcollaboration.h69 行定义.

被这些函数引用 write().

◆ links

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

在文件 dotgroupcollaboration.h71 行定义.

被这些函数引用 write().

◆ pNEnd

DotNode* DotGroupCollaboration::Edge::pNEnd

在文件 dotgroupcollaboration.h68 行定义.

被这些函数引用 write().

◆ pNStart

DotNode* DotGroupCollaboration::Edge::pNStart

在文件 dotgroupcollaboration.h67 行定义.

被这些函数引用 write().


该结构体的文档由以下文件生成:
DotGroupCollaboration::Edge::links
std::vector< Link > links
Definition: dotgroupcollaboration.h:71
DotGroupCollaboration::thierarchy
@ thierarchy
Definition: dotgroupcollaboration.h:52
DotGroupCollaboration::Edge::pNStart
DotNode * pNStart
Definition: dotgroupcollaboration.h:67
DotGroupCollaboration::Edge::pNEnd
DotNode * pNEnd
Definition: dotgroupcollaboration.h:68
end
DirIterator end(const DirIterator &) noexcept
Definition: dir.cpp:128
DotNode::number
int number() const
Definition: dotnode.h:90
DotGroupCollaboration::Edge::eType
EdgeType eType
Definition: dotgroupcollaboration.h:69
TRUE
#define TRUE
Definition: qcstring.h:36
DotNode::convertLabel
static QCString convertLabel(const QCString &l)
Definition: dotnode.cpp:184
FALSE
#define FALSE
Definition: qcstring.h:33
QCString
This is an alternative implementation of QCString.
Definition: qcstring.h:108