Doxygen
Loading...
Searching...
No Matches
DotDirDeps Class Referencefinal

Representation of an directory dependency graph. More...

#include <src/dotdirdeps.h>

Inheritance diagram for DotDirDeps:
Collaboration diagram for DotDirDeps:

Public Member Functions

 DotDirDeps (const DirDef *dir)
 ~DotDirDeps () override
bool isTrivial () const
DString writeGraph (TextStream &out, GraphOutputFormat gf, EmbeddedOutputFormat ef, const DString &path, const DString &fileName, const DString &relPath, bool writeImageMap=true, int graphId=-1, bool linkRelations=true)
Public Member Functions inherited from DotGraph
 DotGraph ()
virtual ~DotGraph ()=default

Protected Member Functions

DString getBaseName () const override
DString getMapLabel () const override
void computeTheGraph () override
DString getImgAltText () const override
Protected Member Functions inherited from DotGraph
int getNextNodeNumber ()
 returns the node number.
int getNextEdgeNumber ()
 returns the edge number.
DString writeGraph (TextStream &t, GraphOutputFormat gf, EmbeddedOutputFormat ef, const DString &path, const DString &fileName, const DString &relPath, bool writeImageMap=true, int graphId=-1)
virtual DString absMapName () const
DString absBaseName () const
DString absDotName () const
DString imgName () const
DString absImgName () const
DString relImgName () const

Private Attributes

const DirDefm_dir = nullptr
bool m_linkRelations = false

Additional Inherited Members

Static Protected Member Functions inherited from DotGraph
static void writeGraphHeader (TextStream &t, const DString &title=DString())
static void writeGraphFooter (TextStream &t)
static void computeGraph (DotNode *root, GraphType gt, GraphOutputFormat format, const DString &rank, bool renderParents, bool backArrows, const DString &title, DString &graphStr)
Protected Attributes inherited from DotGraph
GraphOutputFormat m_graphFormat = GraphOutputFormat::BITMAP
EmbeddedOutputFormat m_textFormat = EmbeddedOutputFormat::Html
Dir m_dir
DString m_fileName
DString m_relPath
bool m_generateImageMap = false
int m_graphId = 0
DString m_absPath
DString m_baseName
DString m_theGraph
bool m_regenerate = false
bool m_doNotAddImageToIndex = false
bool m_noDivTag = false
bool m_zoomable = true
bool m_urlOnly = false

Detailed Description

Representation of an directory dependency graph.

Definition at line 25 of file dotdirdeps.h.

Constructor & Destructor Documentation

◆ DotDirDeps()

DotDirDeps::DotDirDeps ( const DirDef * dir)

Definition at line 403 of file dotdirdeps.cpp.

403 : m_dir(dir)
404{
405}
const DirDef * m_dir
Definition dotdirdeps.h:50

References m_dir.

◆ ~DotDirDeps()

DotDirDeps::~DotDirDeps ( )
override

Definition at line 407 of file dotdirdeps.cpp.

408{
409}

Member Function Documentation

◆ computeTheGraph()

void DotDirDeps::computeTheGraph ( )
overrideprotectedvirtual

Implements DotGraph.

Definition at line 417 of file dotdirdeps.cpp.

418{
419 // compute md5 checksum of the graph were are about to generate
420 TextStream md5stream;
421 writeGraphHeader(md5stream, m_dir->displayName());
422 md5stream << " compound=true\n";
424 writeGraphFooter(md5stream);
425 m_theGraph = md5stream.str();
426}
virtual DString displayName(bool includeScope=true) const =0
bool m_linkRelations
Definition dotdirdeps.h:52
DString m_theGraph
Definition dotgraph.h:95
static void writeGraphFooter(TextStream &t)
Definition dotgraph.cpp:296
static void writeGraphHeader(TextStream &t, const DString &title=DString())
Definition dotgraph.cpp:271
std::string str() const
Return the contents of the buffer as a std::string object.
Definition textstream.h:232
void writeDotDirDepGraph(TextStream &t, const DirDef *dd, bool linkRelations)
Write DOT code for directory dependency graph.

References Definition::displayName(), m_dir, m_linkRelations, DotGraph::m_theGraph, TextStream::str(), writeDotDirDepGraph(), DotGraph::writeGraphFooter(), and DotGraph::writeGraphHeader().

◆ getBaseName()

DString DotDirDeps::getBaseName ( ) const
overrideprotectedvirtual

Implements DotGraph.

Definition at line 411 of file dotdirdeps.cpp.

412{
413 return m_dir->getOutputFileBase()+"_dep";
414
415}
virtual DString getOutputFileBase() const =0

References Definition::getOutputFileBase(), and m_dir.

◆ getImgAltText()

DString DotDirDeps::getImgAltText ( ) const
overrideprotectedvirtual

Reimplemented from DotGraph.

Definition at line 433 of file dotdirdeps.cpp.

434{
435 return convertToXML(m_dir->displayName());
436}
DString convertToXML(const DString &s, bool keepEntities, const bool citeEntry)
Definition util.cpp:3956

References convertToXML(), Definition::displayName(), and m_dir.

◆ getMapLabel()

DString DotDirDeps::getMapLabel ( ) const
overrideprotectedvirtual

Implements DotGraph.

Definition at line 428 of file dotdirdeps.cpp.

429{
430 return escapeCharsInString(m_baseName,false);
431}
DString m_baseName
Definition dotgraph.h:94
DString escapeCharsInString(const DString &name, bool allowDots, bool allowUnderscore)
Definition util.cpp:3376

References escapeCharsInString(), and DotGraph::m_baseName.

◆ isTrivial()

bool DotDirDeps::isTrivial ( ) const

Definition at line 450 of file dotdirdeps.cpp.

451{
452 return m_dir->depGraphIsTrivial();
453}
virtual bool depGraphIsTrivial() const =0

References DirDef::depGraphIsTrivial(), and m_dir.

Referenced by DirDefImpl::writeDirectoryGraph().

◆ writeGraph()

DString DotDirDeps::writeGraph ( TextStream & out,
GraphOutputFormat gf,
EmbeddedOutputFormat ef,
const DString & path,
const DString & fileName,
const DString & relPath,
bool writeImageMap = true,
int graphId = -1,
bool linkRelations = true )

Definition at line 438 of file dotdirdeps.cpp.

441{
442 m_linkRelations = linkRelations;
443 m_urlOnly = true;
444
446
447 return DotGraph::writeGraph(out, graphFormat, textFormat, path, fileName, relPath, generateImageMap, graphId);
448}
bool m_urlOnly
Definition dotgraph.h:100
bool m_doNotAddImageToIndex
Definition dotgraph.h:97
DString writeGraph(TextStream &t, GraphOutputFormat gf, EmbeddedOutputFormat ef, const DString &path, const DString &fileName, const DString &relPath, bool writeImageMap=true, int graphId=-1)
Definition dotgraph.cpp:113

References Html, DotGraph::m_doNotAddImageToIndex, m_linkRelations, DotGraph::m_urlOnly, and DotGraph::writeGraph().

Referenced by DocbookGenerator::endDirDepGraph(), HtmlGenerator::endDirDepGraph(), LatexGenerator::endDirDepGraph(), and RTFGenerator::endDirDepGraph().

Member Data Documentation

◆ m_dir

const DirDef* DotDirDeps::m_dir = nullptr
private

Definition at line 50 of file dotdirdeps.h.

Referenced by computeTheGraph(), DotDirDeps(), getBaseName(), getImgAltText(), and isTrivial().

◆ m_linkRelations

bool DotDirDeps::m_linkRelations = false
private

Definition at line 52 of file dotdirdeps.h.

Referenced by computeTheGraph(), and writeGraph().


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