Doxygen
UsedDir类 参考

Usage information of a directory. 更多...

#include <dirdef.h>

+ UsedDir 的协作图:

Public 成员函数

 UsedDir (const DirDef *dir)
 
virtual ~UsedDir ()
 
void addFileDep (const FileDef *srcFd, const FileDef *dstFd, bool srcDirect, bool dstDirect)
 Take up dependency between files. 更多...
 
FilePairfindFilePair (const QCString &name)
 
const FilePairLinkedMapfilePairs () const
 
const DirDefdir () const
 
bool hasDirectDeps () const
 Returns true iff any of the dependencies between source and destination files are direct (i.e. 更多...
 
bool hasDirectSrcDeps () const
 Returns true iff any of the dependencies from the source file to the destination file are directly coming from a file in the source directory (i.e. 更多...
 
bool hasDirectDstDeps () const
 Returns true iff any of the dependencies from the source file to the destination file are directly targeting a file in the destination directory (i.e. 更多...
 
void sort ()
 

Private 属性

const DirDefm_dir
 
FilePairLinkedMap m_filePairs
 
bool m_hasDirectDeps = false
 
bool m_hasDirectSrcDeps = false
 
bool m_hasDirectDstDeps = false
 

详细描述

Usage information of a directory.

在文件 dirdef.h63 行定义.

构造及析构函数说明

◆ UsedDir()

UsedDir::UsedDir ( const DirDef dir)

在文件 dirdef.cpp751 行定义.

751  :
752  m_dir(dir)
753 {
754 }

◆ ~UsedDir()

UsedDir::~UsedDir ( )
virtual

在文件 dirdef.cpp756 行定义.

757 {
758 }

成员函数说明

◆ addFileDep()

void UsedDir::addFileDep ( const FileDef srcFd,
const FileDef dstFd,
bool  srcDirect,
bool  dstDirect 
)

Take up dependency between files.

参数
[in]srcFddependent file which depends on dstFd
[in]dstFddependee file on which srcFd depends on
[in]srcDirecttrue iff the source dependency was the direct (not inherited from a sub dir)
[in]dstDirecttrue iff the destination dependency was direct (not inherited from a sub dir)

在文件 dirdef.cpp760 行定义.

761 {
762  m_filePairs.add(FilePair::key(srcFd,dstFd),std::make_unique<FilePair>(srcFd,dstFd));
763  m_hasDirectDeps = m_hasDirectDeps || (srcDirect && dstDirect);
764  m_hasDirectSrcDeps = m_hasDirectSrcDeps || srcDirect;
765  m_hasDirectDstDeps = m_hasDirectDstDeps || dstDirect;
766 }

引用了 LinkedMap< T, Hash, KeyEqual, Map >::add(), FilePair::key(), m_filePairs, m_hasDirectDeps, m_hasDirectDstDeps , 以及 m_hasDirectSrcDeps.

被这些函数引用 DirDefImpl::addUsesDependency().

◆ dir()

const DirDef* UsedDir::dir ( ) const
inline

在文件 dirdef.h79 行定义.

79 { return m_dir; }

引用了 m_dir.

被这些函数引用 DirRelation::writeDocumentation().

◆ filePairs()

const FilePairLinkedMap& UsedDir::filePairs ( ) const
inline

在文件 dirdef.h78 行定义.

78 { return m_filePairs; }

引用了 m_filePairs.

被这些函数引用 DirRelation::writeDocumentation().

◆ findFilePair()

FilePair * UsedDir::findFilePair ( const QCString name)

在文件 dirdef.cpp781 行定义.

782 {
783  return m_filePairs.find(name);
784 }

引用了 LinkedMap< T, Hash, KeyEqual, Map >::find() , 以及 m_filePairs.

被这些函数引用 DirDefImpl::addUsesDependency().

◆ hasDirectDeps()

bool UsedDir::hasDirectDeps ( ) const
inline

Returns true iff any of the dependencies between source and destination files are direct (i.e.

not "inherited" from sub directories)

在文件 dirdef.h84 行定义.

84 { return m_hasDirectDeps; }

引用了 m_hasDirectDeps.

◆ hasDirectDstDeps()

bool UsedDir::hasDirectDstDeps ( ) const
inline

Returns true iff any of the dependencies from the source file to the destination file are directly targeting a file in the destination directory (i.e.

not inherited via sub directories)

在文件 dirdef.h94 行定义.

94 { return m_hasDirectDstDeps; }

引用了 m_hasDirectDstDeps.

◆ hasDirectSrcDeps()

bool UsedDir::hasDirectSrcDeps ( ) const
inline

Returns true iff any of the dependencies from the source file to the destination file are directly coming from a file in the source directory (i.e.

not inherited via sub directories)

在文件 dirdef.h89 行定义.

89 { return m_hasDirectSrcDeps; }

引用了 m_hasDirectSrcDeps.

◆ sort()

void UsedDir::sort ( )

在文件 dirdef.cpp768 行定义.

769 {
770  std::sort(m_filePairs.begin(),
771  m_filePairs.end(),
772  [](const auto &left,const auto &right)
773  {
774  int orderHi = qstricmp(left->source()->name(),right->source()->name());
775  if (orderHi!=0) return orderHi<0;
776  int orderLo = qstricmp(left->destination()->name(),right->destination()->name());
777  return orderLo<0;
778  });
779 }

引用了 LinkedMap< T, Hash, KeyEqual, Map >::begin(), LinkedMap< T, Hash, KeyEqual, Map >::end() , 以及 m_filePairs.

类成员变量说明

◆ m_dir

const DirDef* UsedDir::m_dir
private

在文件 dirdef.h99 行定义.

被这些函数引用 dir().

◆ m_filePairs

FilePairLinkedMap UsedDir::m_filePairs
private

在文件 dirdef.h100 行定义.

被这些函数引用 addFileDep(), filePairs(), findFilePair() , 以及 sort().

◆ m_hasDirectDeps

bool UsedDir::m_hasDirectDeps = false
private

在文件 dirdef.h102 行定义.

被这些函数引用 addFileDep() , 以及 hasDirectDeps().

◆ m_hasDirectDstDeps

bool UsedDir::m_hasDirectDstDeps = false
private

在文件 dirdef.h104 行定义.

被这些函数引用 addFileDep() , 以及 hasDirectDstDeps().

◆ m_hasDirectSrcDeps

bool UsedDir::m_hasDirectSrcDeps = false
private

在文件 dirdef.h103 行定义.

被这些函数引用 addFileDep() , 以及 hasDirectSrcDeps().


该类的文档由以下文件生成:
FilePair::key
static QCString key(const FileDef *srcFd, const FileDef *dstFd)
Definition: dirdef.cpp:836
UsedDir::m_filePairs
FilePairLinkedMap m_filePairs
Definition: dirdef.h:100
UsedDir::m_hasDirectDstDeps
bool m_hasDirectDstDeps
Definition: dirdef.h:104
LinkedMap::add
T * add(const char *k, Args &&... args)
Adds a new object to the ordered vector if it was not added already.
Definition: linkedmap.h:103
UsedDir::m_dir
const DirDef * m_dir
Definition: dirdef.h:99
LinkedMap::begin
iterator begin()
Definition: linkedmap.h:214
UsedDir::m_hasDirectDeps
bool m_hasDirectDeps
Definition: dirdef.h:102
LinkedMap::find
const T * find(const std::string &key) const
Find an object given the key.
Definition: linkedmap.h:60
LinkedMap::end
iterator end()
Definition: linkedmap.h:215
UsedDir::dir
const DirDef * dir() const
Definition: dirdef.h:79
UsedDir::m_hasDirectSrcDeps
bool m_hasDirectSrcDeps
Definition: dirdef.h:103