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 "dotgraph.h"
22#include "dotnode.h"
23
24class Definition;
25class GroupDef;
26class TextStream;
27
28/** Representation of a group collaboration graph */
29class DotGroupCollaboration final : public DotGraph
30{
31 public :
33 ~DotGroupCollaboration() override;
35
37 const DString &path,const DString &fileName,const DString &relPath,
38 bool writeImageMap=true,int graphId=-1);
39 bool isTrivial() const;
40 bool isTooBig() const;
41 int numNodes() const;
42
43 protected:
44 DString getBaseName() const override;
45 DString getMapLabel() const override;
46 void computeTheGraph() override;
47
48 private :
59
60 struct Link
61 {
62 Link(const DString &lab,const DString &u) : label(lab), url(u) {}
65 };
66
67 struct Edge
68 {
70 : pNStart(start), pNEnd(end), eType(type) {}
71
75
76 std::vector<Link> links;
77 void write( TextStream &t ) const;
78 };
79
80 void buildGraph(const GroupDef* gd);
81 void addCollaborationMember(const Definition* def, DString& url, EdgeType eType );
82 void addMemberList( class MemberList* ml );
83 void writeGraphHeader(TextStream &t,const DString &title) const;
84 Edge* addEdge( DotNode* _pNStart, DotNode* _pNEnd, EdgeType _eType,
85 const DString& _label, const DString& _url );
86
90 std::vector< std::unique_ptr<Edge> > m_edges;
91};
92
93using DotGroupCollaborationPtr = std::shared_ptr<DotGroupCollaboration>;
94
95#endif
A String class for use with Doxygen wrapping std::string and adding some additional functionality off...
Definition dstring.h:84
The common base class of all entity definitions found in the sources.
Definition definition.h:77
DotGraph()
Definition dotgraph.h:38
friend class DotNode
Definition dotgraph.h:36
std::vector< std::unique_ptr< Edge > > m_edges
DotGroupCollaboration(const GroupDef *gd)
DString getMapLabel() const override
void addMemberList(class MemberList *ml)
DString getBaseName() const override
void writeGraphHeader(TextStream &t, const DString &title) const
void addCollaborationMember(const Definition *def, DString &url, EdgeType eType)
DString writeGraph(TextStream &t, GraphOutputFormat gf, EmbeddedOutputFormat ef, const DString &path, const DString &fileName, const DString &relPath, bool writeImageMap=true, int graphId=-1)
void buildGraph(const GroupDef *gd)
Edge * addEdge(DotNode *_pNStart, DotNode *_pNEnd, EdgeType _eType, const DString &_label, const DString &_url)
A model of a group of symbols.
Definition groupdef.h:48
A list of MemberDef objects as shown in documentation sections.
Definition memberlist.h:126
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:181
EmbeddedOutputFormat
Definition dotgraph.h:30
GraphOutputFormat
Definition dotgraph.h:29
std::shared_ptr< DotGroupCollaboration > DotGroupCollaborationPtr
void write(TextStream &t) const
Edge(DotNode *start, DotNode *end, EdgeType type)