Doxygen
Loading...
Searching...
No Matches
dotgroupcollaboration.h
Go to the documentation of this file.
1/******************************************************************************
2*
3* Copyright (C) 1997-2019 by Dimitri van Heesch.
4*
5* Permission to use, copy, modify, and distribute this software and its
6* documentation under the terms of the GNU General Public License is hereby
7* granted. No representations are made about the suitability of this software
8* for any purpose. It is provided "as is" without express or implied warranty.
9* See the GNU General Public License for more details.
10*
11* Documents produced by Doxygen are derivative works derived from the
12* input used in their production; they are not affected by this license.
13*
14*/
15
16#ifndef DOTGROUPCOLLABORATION_H
17#define DOTGROUPCOLLABORATION_H
18
19#include <memory>
20
21#include "dotnode.h"
22#include "dotgraph.h"
23#include "groupdef.h"
24
25class TextStream;
26
27/** Representation of a group collaboration graph */
29{
30 public :
31 DotGroupCollaboration(const GroupDef* gd);
32 ~DotGroupCollaboration() override;
34
35 QCString writeGraph(TextStream &t, GraphOutputFormat gf,EmbeddedOutputFormat ef,
36 const QCString &path,const QCString &fileName,const QCString &relPath,
37 bool writeImageMap=TRUE,int graphId=-1);
38 bool isTrivial() const;
39 bool isTooBig() const;
40 int numNodes() const;
41
42 protected:
43 QCString getBaseName() const override;
44 QCString getMapLabel() const override;
45 void computeTheGraph() override;
46
47 private :
58
59 struct Link
60 {
61 Link(const QCString &lab,const QCString &u) : label(lab), url(u) {}
62 QCString label;
63 QCString url;
64 };
65
66 struct Edge
67 {
69 : pNStart(start), pNEnd(end), eType(type) {}
70
74
75 std::vector<Link> links;
76 void write( TextStream &t ) const;
77 };
78
79 void buildGraph(const GroupDef* gd);
80 void addCollaborationMember(const Definition* def, QCString& url, EdgeType eType );
81 void addMemberList( class MemberList* ml );
82 void writeGraphHeader(TextStream &t,const QCString &title) const;
83 Edge* addEdge( DotNode* _pNStart, DotNode* _pNEnd, EdgeType _eType,
84 const QCString& _label, const QCString& _url );
85
87 DotNodeMap m_usedNodes;
88 QCString m_diskName;
89 std::vector< std::unique_ptr<Edge> > m_edges;
90};
91
92using DotGroupCollaborationPtr = std::shared_ptr<DotGroupCollaboration>;
93
94#endif
DotGraph()
Definition dotgraph.h:38
friend class DotNode
Definition dotgraph.h:36
std::vector< std::unique_ptr< Edge > > m_edges
QCString writeGraph(TextStream &t, GraphOutputFormat gf, EmbeddedOutputFormat ef, const QCString &path, const QCString &fileName, const QCString &relPath, bool writeImageMap=TRUE, int graphId=-1)
DotGroupCollaboration(const GroupDef *gd)
QCString getMapLabel() const override
void addMemberList(class MemberList *ml)
void writeGraphHeader(TextStream &t, const QCString &title) const
void addCollaborationMember(const Definition *def, QCString &url, EdgeType eType)
Edge * addEdge(DotNode *_pNStart, DotNode *_pNEnd, EdgeType _eType, const QCString &_label, const QCString &_url)
QCString getBaseName() const override
void buildGraph(const GroupDef *gd)
Text streaming class that buffers data.
Definition textstream.h:36
#define NON_COPYABLE(cls)
Macro to help implementing the rule of 5 for a non-copyable & movable class.
Definition construct.h:37
DirIterator end(const DirIterator &) noexcept
Definition dir.cpp:175
EmbeddedOutputFormat
Definition dotgraph.h:30
GraphOutputFormat
Definition dotgraph.h:29
std::shared_ptr< DotGroupCollaboration > DotGroupCollaborationPtr
#define TRUE
Definition qcstring.h:37
void write(TextStream &t) const
Edge(DotNode *start, DotNode *end, EdgeType type)