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 26 of file dotdirdeps.h.

Constructor & Destructor Documentation

◆ DotDirDeps()

DotDirDeps::DotDirDeps ( const DirDef * dir)

Definition at line 405 of file dotdirdeps.cpp.

405 : m_dir(dir)
406{
407}
const DirDef * m_dir
Definition dotdirdeps.h:51

References m_dir.

◆ ~DotDirDeps()

DotDirDeps::~DotDirDeps ( )
override

Definition at line 409 of file dotdirdeps.cpp.

410{
411}

Member Function Documentation

◆ computeTheGraph()

void DotDirDeps::computeTheGraph ( )
overrideprotectedvirtual

Implements DotGraph.

Definition at line 419 of file dotdirdeps.cpp.

420{
421 // compute md5 checksum of the graph were are about to generate
422 TextStream md5stream;
423 writeGraphHeader(md5stream, m_dir->displayName());
424 md5stream << " compound=true\n";
426 writeGraphFooter(md5stream);
427 m_theGraph = md5stream.str();
428}
virtual DString displayName(bool includeScope=true) const =0
bool m_linkRelations
Definition dotdirdeps.h:53
DString m_theGraph
Definition dotgraph.h:95
static void writeGraphFooter(TextStream &t)
Definition dotgraph.cpp:295
static void writeGraphHeader(TextStream &t, const DString &title=DString())
Definition dotgraph.cpp:270
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 413 of file dotdirdeps.cpp.

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

References Definition::getOutputFileBase(), and m_dir.

◆ getImgAltText()

DString DotDirDeps::getImgAltText ( ) const
overrideprotectedvirtual

Reimplemented from DotGraph.

Definition at line 435 of file dotdirdeps.cpp.

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

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

◆ getMapLabel()

DString DotDirDeps::getMapLabel ( ) const
overrideprotectedvirtual

Implements DotGraph.

Definition at line 430 of file dotdirdeps.cpp.

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

References escapeCharsInString(), and DotGraph::m_baseName.

◆ isTrivial()

bool DotDirDeps::isTrivial ( ) const

Definition at line 452 of file dotdirdeps.cpp.

453{
454 return m_dir->depGraphIsTrivial();
455}
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 440 of file dotdirdeps.cpp.

443{
444 m_linkRelations = linkRelations;
445 m_urlOnly = true;
446
448
449 return DotGraph::writeGraph(out, graphFormat, textFormat, path, fileName, relPath, generateImageMap, graphId);
450}
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:115

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 51 of file dotdirdeps.h.

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

◆ m_linkRelations

bool DotDirDeps::m_linkRelations = false
private

Definition at line 53 of file dotdirdeps.h.

Referenced by computeTheGraph(), and writeGraph().


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