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 */
28class DotGroupCollaboration final : public DotGraph
29{
30 public :
32 ~DotGroupCollaboration() override;
34
36 const DString &path,const DString &fileName,const DString &relPath,
37 bool writeImageMap=true,int graphId=-1);
38 bool isTrivial() const;
39 bool isTooBig() const;
40 int numNodes() const;
41
42 protected:
43 DString getBaseName() const override;
44 DString getMapLabel() const override;
45 void computeTheGraph() override;
46
47 private :
58
59 struct Link
60 {
61 Link(const DString &lab,const DString &u) : label(lab), url(u) {}
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, DString& url, EdgeType eType );
81 void addMemberList( class MemberList* ml );
82 void writeGraphHeader(TextStream &t,const DString &title) const;
83 Edge* addEdge( DotNode* _pNStart, DotNode* _pNEnd, EdgeType _eType,
84 const DString& _label, const DString& _url );
85
89 std::vector< std::unique_ptr<Edge> > m_edges;
90};
91
92using DotGroupCollaborationPtr = std::shared_ptr<DotGroupCollaboration>;
93
94#endif
A String class for use with Doxygen wrapping std::string and adding some additional functionality off...
Definition dstring.h:89
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:52
A list of MemberDef objects as shown in documentation sections.
Definition memberlist.h:125
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
void write(TextStream &t) const
Edge(DotNode *start, DotNode *end, EdgeType type)