The dotdirdeps.cpp
File Reference
Included Headers
Classes Index
struct | DotDirProperty |
Properties are used to format the directories in the graph distinctively. More... | |
class | DotDirPropertyBuilder |
Builder helper to create instances of the DotDirProperty struct. More... | |
Typedefs Index
using | DirDefMap = std::map< std::string, const DirDef * > |
typedef | std::vector< std::pair< std::unique_ptr< DirRelation >, bool > > DirRelations |
Elements consist of (1) directory relation and (2) whether it is pointing only to inherited dependees. More... | |
Functions Index
static QCString | getDirectoryBackgroundColor (int depthIndex) |
Returns a DOT color name according to the directory depth. More... | |
static const char * | getDirectoryBorderColor (const DotDirProperty &property) |
Returns a DOT color name according to the directory properties. More... | |
static std::string | getDirectoryBorderStyle (const DotDirProperty &property) |
Returns a DOT node style according to the directory properties. More... | |
static TextStream & | common_attributes (TextStream &t, const DirDef *const dir, const DotDirProperty &prop) |
static void | drawDirectory (TextStream &t, const DirDef *const directory, const DotDirProperty &property, DirDefMap &directoriesInGraph, int startLevel) |
Puts DOT code for drawing directory to stream and adds it to the list. More... | |
static bool | isAtMaxDepth (const DirDef *const directory, const int startLevel) |
Checks, if the directory is a the maximum drawn directory level. More... | |
static void | drawClusterOpening (TextStream &outputStream, const DirDef *const directory, const DotDirProperty &directoryProperty, DirDefMap &directoriesInGraph, const bool isAncestor, int startLevel) |
Writes DOT code for opening a cluster subgraph to stream. More... | |
static void | drawClusterClosing (TextStream &t) |
static void | addDependencies (DirRelations &dependencies, const DirDef *const srcDir, bool isLeaf) |
Assembles a list of the directory relations and whether or not they result from "inheritance". More... | |
static void | drawTree (DirRelations &dependencies, TextStream &t, const DirDef *const directory, int startLevel, DirDefMap &directoriesInGraph, const bool isTreeRoot) |
Recursively draws directory tree. More... | |
void | writeDotDirDepGraph (TextStream &t, const DirDef *dd, bool linkRelations) |
Write DOT code for directory dependency graph. More... | |
Typedefs
DirDefMap
|
Definition at line 34 of file dotdirdeps.cpp.
DirRelations
|
Elements consist of (1) directory relation and (2) whether it is pointing only to inherited dependees.
Definition at line 61 of file dotdirdeps.cpp.
Functions
addDependencies()
| static |
Assembles a list of the directory relations and whether or not they result from "inheritance".
- Parameters
-
dependencies Array to add the dependencies to.
srcDir is the source of the dependency.
isLeaf true, if no children are drawn for this directory.
Definition at line 215 of file dotdirdeps.cpp.
References DirDef::dirIndex, QCString::sprintf and DirDef::usedDirs.
Referenced by drawTree.
common_attributes()
| static |
Definition at line 137 of file dotdirdeps.cpp.
References addHtmlExtensionIfMissing, Definition::briefDescriptionAsTooltip, escapeTooltip, getDirectoryBorderStyle and Definition::getOutputFileBase.
Referenced by drawClusterOpening and drawDirectory.
drawClusterClosing()
| static |
Definition at line 204 of file dotdirdeps.cpp.
Referenced by drawTree.
drawClusterOpening()
| static |
Writes DOT code for opening a cluster subgraph to stream.
Ancestor clusters directly get a label. Other clusters get a plain text node with a label instead. This is because the plain text node can be used to draw dependency relationships.
Definition at line 179 of file dotdirdeps.cpp.
References common_attributes, Config_getString, DotNode::convertLabel, getDirectoryBackgroundColor, getDirectoryBorderColor, Definition::getOutputFileBase, DirDef::level, DirDef::shortName and QCString::str.
Referenced by drawTree and writeDotDirDepGraph.
drawDirectory()
| static |
Puts DOT code for drawing directory to stream and adds it to the list.
- Parameters
-
[inout] t stream to which the DOT code is written to
[in] directory will be mapped to a node in DOT code
[in] property are evaluated for formatting
[inout] directoriesInGraph lists the directories which have been written to the output stream
[in] startLevel current level to calculate relative distances from to determine the background color
Definition at line 155 of file dotdirdeps.cpp.
References common_attributes, DotNode::convertLabel, getDirectoryBackgroundColor, getDirectoryBorderColor, Definition::getOutputFileBase, DirDef::level, DirDef::shortName and QCString::str.
Referenced by drawTree.
drawTree()
| static |
Recursively draws directory tree.
Definition at line 233 of file dotdirdeps.cpp.
References addDependencies, drawClusterClosing, drawClusterOpening, drawDirectory, drawTree, DirDef::hasSubdirs, isAtMaxDepth, DotDirPropertyBuilder::makeOriginal and DirDef::subDirs.
Referenced by drawTree.
getDirectoryBackgroundColor()
| static |
Returns a DOT color name according to the directory depth.
Definition at line 64 of file dotdirdeps.cpp.
References Config_getInt, hex and ColoredImage::hsl2rgb.
Referenced by drawClusterOpening and drawDirectory.
getDirectoryBorderColor()
| static |
Returns a DOT color name according to the directory properties.
Definition at line 98 of file dotdirdeps.cpp.
References DotDirProperty::isOrphaned and DotDirProperty::isTruncated.
Referenced by drawClusterOpening and drawDirectory.
getDirectoryBorderStyle()
| static |
Returns a DOT node style according to the directory properties.
Definition at line 119 of file dotdirdeps.cpp.
References DotDirProperty::isIncomplete, DotDirProperty::isOriginal, DotDirProperty::isOrphaned and DotDirProperty::isTruncated.
Referenced by common_attributes.
isAtMaxDepth()
| static |
Checks, if the directory is a the maximum drawn directory level.
Definition at line 168 of file dotdirdeps.cpp.
References Config_getInt and DirDef::level.
Referenced by drawTree.
writeDotDirDepGraph()
|
Write DOT code for directory dependency graph.
Code is generated for a directory. Successors (sub-directories) of this directory are recursively drawn. Recursion is limited by DIR_GRAPH_MAX_DEPTH. The dependencies of those directories are drawn.
If a dependee is not part of directory tree above, then the dependency is drawn to the first parent of the dependee, whose parent is an ancestor (sub-directory) of the original directory.
- Parameters
-
t stream where the DOT code is written to
dd directory for which the graph is generated for
linkRelations if true, hyperlinks to the list of file dependencies are added
Definition at line 287 of file dotdirdeps.cpp.
References drawClusterOpening, Definition::getOutputFileBase, DirDef::parent, parent, QCString::str and DirDef::usedDirs.
Referenced by DotDirDeps::computeTheGraph.
Generated via doxygen2docusaurus by Doxygen 1.14.0.