Doxygen
Loading...
Searching...
No Matches
DirRelation Class Reference

A usage relation between two directories. More...

#include <src/dirdef.h>

+ Collaboration diagram for DirRelation:

Public Member Functions

 DirRelation (const QCString &name, const DirDef *src, UsedDir *dst)
 
const DirDefsource () const
 
UsedDirdestination () const
 
void writeDocumentation (OutputList &ol)
 
QCString getOutputFileBase () const
 

Private Attributes

QCString m_name
 
const DirDefm_src
 
UsedDirm_dst
 

Detailed Description

A usage relation between two directories.

Definition at line 154 of file dirdef.h.

Constructor & Destructor Documentation

◆ DirRelation()

DirRelation::DirRelation ( const QCString & name,
const DirDef * src,
UsedDir * dst )
inline

Definition at line 157 of file dirdef.h.

158 : m_name(name), m_src(src), m_dst(dst) {}
const DirDef * m_src
Definition dirdef.h:166
UsedDir * m_dst
Definition dirdef.h:167
QCString m_name
Definition dirdef.h:165

References m_dst, m_name, and m_src.

Member Function Documentation

◆ destination()

UsedDir * DirRelation::destination ( ) const
inline

Definition at line 160 of file dirdef.h.

160{ return m_dst; }

References m_dst.

◆ getOutputFileBase()

QCString DirRelation::getOutputFileBase ( ) const
inline

Definition at line 162 of file dirdef.h.

162{ return m_name; }

References m_name.

Referenced by writeDocumentation().

◆ source()

const DirDef * DirRelation::source ( ) const
inline

Definition at line 159 of file dirdef.h.

159{ return m_src; }

References m_src.

◆ writeDocumentation()

void DirRelation::writeDocumentation ( OutputList & ol)

Definition at line 919 of file dirdef.cpp.

920{
921 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
924
925 QCString shortTitle=theTranslator->trDirRelation(
926 (m_src->shortName()+" &rarr; "+m_dst->dir()->shortName()));
927 QCString title=theTranslator->trDirRelation(
928 (m_src->displayName()+" -> "+m_dst->dir()->shortName()));
929 AUTO_TRACE("title={}",title);
931 title,HighlightedItem::None,!generateTreeView,m_src->getOutputFileBase());
932
933 if (!generateTreeView)
934 {
935 // write navigation path
936 m_src->writeNavigationPath(ol);
937 ol.endQuickIndices();
938 }
939 ol.startContents();
940
941 ol.writeString("<h3>"+shortTitle+"</h3>");
942 ol.writeString("<table class=\"dirtab\">");
943 ol.writeString("<tr class=\"dirtab\">");
944 ol.writeString("<th class=\"dirtab\">");
945 ol.parseText(theTranslator->trFileIn(m_src->pathFragment()));
946 ol.writeString("</th>");
947 ol.writeString("<th class=\"dirtab\">");
948 ol.parseText(theTranslator->trIncludesFileIn(m_dst->dir()->pathFragment()));
949 ol.writeString("</th>");
950 ol.writeString("</tr>");
951
952 for (const auto &fp : m_dst->filePairs())
953 {
954 ol.writeString("<tr class=\"dirtab\">");
955 ol.writeString("<td class=\"dirtab\">");
956 writePartialFilePath(ol,m_src,fp->source());
957 ol.writeString("</td>");
958 ol.writeString("<td class=\"dirtab\">");
959 writePartialFilePath(ol,m_dst->dir(),fp->destination());
960 ol.writeString("</td>");
961 ol.writeString("</tr>");
962 }
963 ol.writeString("</table>");
964
965 ol.endContents();
966
968
970}
QCString getOutputFileBase() const
Definition dirdef.h:162
void writeString(const QCString &text)
Definition outputlist.h:412
void endContents()
Definition outputlist.h:619
void pushGeneratorState()
void disableAllBut(OutputType o)
void popGeneratorState()
void endQuickIndices()
Definition outputlist.h:605
void startContents()
Definition outputlist.h:617
void parseText(const QCString &textStr)
virtual QCString trIncludesFileIn(const QCString &name)=0
virtual QCString trDirRelation(const QCString &name)=0
virtual QCString trFileIn(const QCString &name)=0
#define Config_getBool(name)
Definition config.h:33
static void writePartialFilePath(OutputList &ol, const DirDef *root, const FileDef *fd)
Definition dirdef.cpp:900
#define AUTO_TRACE(...)
Definition docnode.cpp:46
void startFile(OutputList &ol, const QCString &name, const QCString &manName, const QCString &title, HighlightedItem hli, bool additionalIndices, const QCString &altSidebarName, int hierarchyLevel)
Definition index.cpp:402
void endFileWithNavPath(OutputList &ol, const Definition *d)
Definition index.cpp:441
Translator * theTranslator
Definition language.cpp:71

References AUTO_TRACE, Config_getBool, OutputList::disableAllBut(), OutputList::endContents(), endFileWithNavPath(), OutputList::endQuickIndices(), getOutputFileBase(), Html, m_dst, m_src, None, OutputList::parseText(), OutputList::popGeneratorState(), OutputList::pushGeneratorState(), OutputList::startContents(), startFile(), theTranslator, writePartialFilePath(), and OutputList::writeString().

Member Data Documentation

◆ m_dst

UsedDir* DirRelation::m_dst
private

Definition at line 167 of file dirdef.h.

Referenced by destination(), DirRelation(), and writeDocumentation().

◆ m_name

QCString DirRelation::m_name
private

Definition at line 165 of file dirdef.h.

Referenced by DirRelation(), and getOutputFileBase().

◆ m_src

const DirDef* DirRelation::m_src
private

Definition at line 166 of file dirdef.h.

Referenced by DirRelation(), source(), and writeDocumentation().


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