Skip to main content

The FileDefImpl Class Reference

Declaration

class FileDefImpl { ... }

Base class

classDefinitionMixin<Base>

Public Constructors Index

FileDefImpl (const QCString &p, const QCString &n, const QCString &ref=QCString(), const QCString &dn=QCString())

Public Destructor Index

~FileDefImpl () override

Public Member Functions Index

DefTypedefinitionType () const override
CodeSymbolTypecodeSymbolType () const override
const QCString &name () const override
QCStringdisplayName (bool=TRUE) const override
QCStringfileName () const override
QCStringgetOutputFileBase () const override
QCStringanchor () const override
QCStringgetSourceFileBase () const override
QCStringincludeName () const override
QCStringincludeDependencyGraphFileName () const override
QCStringincludedByDependencyGraphFileName () const override
QCStringabsFilePath () const override
const QCString &docName () const override
boolisSource () const override
boolisDocumentationFile () const override
const Definition *getSourceDefinition (int lineNr) const override
const MemberDef *getSourceMember (int lineNr) const override
QCStringgetPath () const override
QCStringgetVersion () const override
boolisLinkableInProject () const override
boolisLinkable () const override
boolisIncluded (const QCString &name) const override
DirDef *getDirDef () const override
ModuleDef *getModuleDef () const override
const LinkedRefMap< NamespaceDef > &getUsedNamespaces () const override
const LinkedRefMap< const Definition > &getUsedDefinitions () const override
const IncludeInfoList &includeFileList () const override
const IncludeInfoList &includedByFileList () const override
voidgetAllIncludeFilesRecursively (StringVector &incFiles) const override
MemberList *getMemberList (MemberListType lt) const override
const MemberLists &getMemberLists () const override
const MemberGroupList &getMemberGroups () const override
const NamespaceLinkedRefMap &getNamespaces () const override
const ConceptLinkedRefMap &getConcepts () const override
const ClassLinkedRefMap &getClasses () const override
QCStringtitle () const override
boolhasDetailedDescription () const override
QCStringfileVersion () const override
boolsubGrouping () const override
voidcountMembers () override
intnumDocMembers () const override
intnumDecMembers () const override
voidaddSourceRef (int line, const Definition *d, const MemberDef *md) override
voidwriteDocumentation (OutputList &ol) override
voidwriteMemberPages (OutputList &ol) override
voidwriteQuickMemberLinks (OutputList &ol, const MemberDef *currentMd) const override
voidwriteSummaryLinks (OutputList &ol) const override
voidwritePageNavigation (OutputList &ol) const override
voidwriteTagFile (TextStream &t) override
voidwriteSourceHeader (OutputList &ol) override
voidwriteSourceBody (OutputList &ol, ClangTUParser *clangParser) override
voidwriteSourceFooter (OutputList &ol) override
voidparseSource (ClangTUParser *clangParser) override
voidsetDiskName (const QCString &name) override
voidinsertMember (MemberDef *md) override
voidremoveMember (MemberDef *md) override
voidinsertClass (ClassDef *cd) override
voidinsertConcept (ConceptDef *cd) override
voidinsertNamespace (NamespaceDef *nd) override
voidcomputeAnchors () override
voidsetDirDef (DirDef *dd) override
voidsetModuleDef (ModuleDef *mod) override
voidaddUsingDirective (NamespaceDef *nd) override
voidaddUsingDeclaration (const Definition *d) override
voidcombineUsingRelations () override
boolgenerateSourceFile () const override
voidsortMemberLists () override
voidaddIncludeDependency (const FileDef *fd, const QCString &incName, IncludeKind kind) override
voidaddIncludedByDependency (const FileDef *fd, const QCString &incName, IncludeKind kind) override
voidaddMembersToMemberGroup () override
voiddistributeMemberGroupDocumentation () override
voidfindSectionsInDocumentation () override
voidaddIncludedUsingDirectives (FileDefSet &visitedFiles) override
voidaddListReferences () override
boolhasIncludeGraph () const override
boolhasIncludedByGraph () const override
voidoverrideIncludeGraph (bool e) override
voidoverrideIncludedByGraph (bool e) override

Private Member Functions Index

voidsetDiskNameLocal (const QCString &name)
voidacquireFileVersion ()
voidaddMemberToList (MemberListType lt, MemberDef *md)
voidwriteMemberDeclarations (OutputList &ol, MemberListType lt, const QCString &title)
voidwriteMemberDocumentation (OutputList &ol, MemberListType lt, const QCString &title)
voidwriteIncludeFiles (OutputList &ol)
voidwriteIncludeGraph (OutputList &ol)
voidwriteIncludedByGraph (OutputList &ol)
voidwriteMemberGroups (OutputList &ol)
voidwriteAuthorSection (OutputList &ol)
voidwriteSourceLink (OutputList &ol)
voidwriteNamespaceDeclarations (OutputList &ol, const QCString &title, bool isConstantGroup)
voidwriteClassDeclarations (OutputList &ol, const QCString &title, const ClassLinkedRefMap &list)
voidwriteConcepts (OutputList &ol, const QCString &title)
voidwriteInlineClasses (OutputList &ol)
voidstartMemberDeclarations (OutputList &ol)
voidendMemberDeclarations (OutputList &ol)
voidstartMemberDocumentation (OutputList &ol)
voidendMemberDocumentation (OutputList &ol)
voidwriteDetailedDescription (OutputList &ol, const QCString &title)
voidwriteBriefDescription (OutputList &ol)
voidwriteClassesToTagFile (TextStream &t, const ClassLinkedRefMap &list)
voidremoveMemberFromList (MemberListType lt, MemberDef *md)

Private Member Attributes Index

IncludeInfoMapm_includeMap
IncludeInfoListm_includeList
IncludeInfoMapm_includedByMap
IncludeInfoListm_includedByList
LinkedRefMap< NamespaceDef >m_usingDirList
LinkedRefMap< const Definition >m_usingDeclList
QCStringm_path
QCStringm_filePath
QCStringm_inclDepFileName
QCStringm_inclByDepFileName
QCStringm_outputDiskName
QCStringm_fileName
QCStringm_docname
DefinitionLineMapm_srcDefMap
MemberDefLineMapm_srcMemberMap
boolm_isSource
QCStringm_fileVersion
DirDef *m_dir = nullptr
ModuleDef *m_moduleDef = nullptr
MemberListsm_memberLists
MemberGroupListm_memberGroups
NamespaceLinkedRefMapm_namespaces
ClassLinkedRefMapm_classes
ClassLinkedRefMapm_interfaces
ClassLinkedRefMapm_structs
ClassLinkedRefMapm_exceptions
ConceptLinkedRefMapm_concepts
boolm_subGrouping
boolm_hasIncludeGraph = Config_getBool(INCLUDE_GRAPH)
boolm_hasIncludedByGraph = Config_getBool(INCLUDED_BY_GRAPH)

Definition at line 122 of file filedef.cpp.

Public Constructors

FileDefImpl()

FileDefImpl::FileDefImpl (const QCString & p, const QCString & nm, const QCString & lref=QCString(), const QCString & dn=QCString())

create a new file definition, where p is the file path, nm the file name, and lref is an HTML anchor name if the file was read from a tag file or nullptr otherwise

Definition at line 125 of file filedef.cpp.

281 const QCString &lref,const QCString &dn)
282 : DefinitionMixin(QCString(p)+nm,1,1,nm,nullptr,nullptr,!p.isEmpty())
283{
285 m_filePath=p+nm;
286 m_fileName=nm;
287
288 setReference(lref);
289 setDiskNameLocal(!dn.isEmpty() ? dn : nm);
290 m_isSource = guessSection(nm).isSource();
291 m_docname = nm;
292 m_dir = nullptr;
293 if (Config_getBool(FULL_PATH_NAMES))
294 {
296 }
298 Config_getBool(FULL_PATH_NAMES) ? m_fileName : DefinitionMixin::name()));
300 m_subGrouping=Config_getBool(SUBGROUPING);
301}

References acquireFileVersion, Config_getBool, DefinitionMixin< FileDef >::DefinitionMixin, getLanguageFromFileName, guessSection, QCString::isEmpty, m_dir, m_docname, m_fileName, m_filePath, m_isSource, m_path, m_subGrouping, DefinitionMixin< Base >::name, removeLongPathMarker, setDiskNameLocal, DefinitionMixin< FileDef >::setLanguage, DefinitionMixin< FileDef >::setReference and stripFromPath.

Public Destructor

~FileDefImpl()

FileDefImpl::~FileDefImpl ()

destroy the file definition

Definition at line 126 of file filedef.cpp.

Public Member Functions

absFilePath()

QCString FileDefImpl::absFilePath ()
inline virtual

Returns the absolute path including the file name.

Definition at line 141 of file filedef.cpp.

141 QCString absFilePath() const override { return m_filePath; }

Reference m_filePath.

Referenced by parseSource and writeSourceBody.

addIncludedByDependency()

void FileDefImpl::addIncludedByDependency (const FileDef * fd, const QCString & incName, IncludeKind kind)
virtual

Definition at line 198 of file filedef.cpp.

1578{
1579 //printf("FileDefImpl::addIncludedByDependency(%p,%s,%d)\n",fd,incName,local);
1580 QCString iName = fd ? fd->absFilePath() : incName;
1581 if (!iName.isEmpty() && m_includedByMap.find(iName.str())==m_includedByMap.end())
1582 {
1583 m_includedByList.emplace_back(fd,incName,kind);
1584 m_includedByMap.emplace(iName.str(),&m_includedByList.back());
1585 }
1586}

References FileDef::absFilePath, QCString::isEmpty, m_includedByList, m_includedByMap and QCString::str.

addIncludeDependency()

void FileDefImpl::addIncludeDependency (const FileDef * fd, const QCString & incName, IncludeKind kind)
virtual

Definition at line 197 of file filedef.cpp.

1519{
1520 //printf("FileDefImpl::addIncludeDependency(%p,%s,%d)\n",(void*)fd,qPrint(incName),kind);
1521 QCString iName = fd ? fd->absFilePath() : incName;
1522 if (!iName.isEmpty() && m_includeMap.find(iName.str())==m_includeMap.end())
1523 {
1524 m_includeList.emplace_back(fd,incName,kind);
1525 m_includeMap.emplace(iName.str(),&m_includeList.back());
1526 }
1527}

References FileDef::absFilePath, QCString::isEmpty, m_includeList, m_includeMap and QCString::str.

addIncludedUsingDirectives()

void FileDefImpl::addIncludedUsingDirectives (FileDefSet & visitedFiles)
virtual

Definition at line 202 of file filedef.cpp.

1530{
1531 if (visitedFiles.find(this)!=visitedFiles.end()) return; // file already processed
1532 visitedFiles.insert(this);
1533 //printf("( FileDefImpl::addIncludedUsingDirectives for file %s\n",qPrint(name()));
1534
1535 if (!m_includeList.empty()) // file contains #includes
1536 {
1537 {
1538 for (const auto &ii : m_includeList) // foreach #include...
1539 {
1540 if (ii.fileDef) // ...that is a known file
1541 {
1542 // recurse into this file
1543 const_cast<FileDef*>(ii.fileDef)->addIncludedUsingDirectives(visitedFiles);
1544 }
1545 }
1546 }
1547 {
1548 // iterate through list from last to first
1549 for (auto ii_it = m_includeList.rbegin(); ii_it!=m_includeList.rend(); ++ii_it)
1550 {
1551 auto &ii = *ii_it;
1552 if (ii.fileDef && ii.fileDef!=this)
1553 {
1554 // add using directives
1555 auto unl = ii.fileDef->getUsedNamespaces();
1556 for (auto it = unl.rbegin(); it!=unl.rend(); ++it)
1557 {
1558 auto *nd = *it;
1559 //printf(" adding using directive for %s\n",qPrint(nd->qualifiedName()));
1560 m_usingDirList.prepend(nd->qualifiedName(),nd);
1561 }
1562 // add using declarations
1563 auto udl = ii.fileDef->getUsedDefinitions();
1564 for (auto it = udl.rbegin(); it!=udl.rend(); ++it)
1565 {
1566 auto *d = *it;
1567 m_usingDeclList.prepend(d->qualifiedName(),d);
1568 }
1569 }
1570 }
1571 }
1572 }
1573 //printf(") end FileDefImpl::addIncludedUsingDirectives for file %s\n",qPrint(name()));
1574}

References addIncludedUsingDirectives, QCString::insert, m_includeList, m_usingDeclList and m_usingDirList.

Referenced by addIncludedUsingDirectives.

addListReferences()

void FileDefImpl::addListReferences ()
virtual

Definition at line 203 of file filedef.cpp.

1607{
1608 {
1609 const RefItemVector &xrefItems = xrefListItems();
1610 addRefItem(xrefItems,
1612 theTranslator->trFile(TRUE,TRUE),
1614 QCString(),
1615 nullptr
1616 );
1617 }
1618 for (const auto &mg : m_memberGroups)
1619 {
1620 mg->addListReferences(this);
1621 }
1622 for (auto &ml : m_memberLists)
1623 {
1624 if (ml->listType().isDocumentation())
1625 {
1626 ml->addListReferences(this);
1627 }
1628 }
1629}

References addRefItem, getOutputFileBase, m_memberGroups, m_memberLists, name, theTranslator, TRUE and DefinitionMixin< FileDef >::xrefListItems.

addMembersToMemberGroup()

void FileDefImpl::addMembersToMemberGroup ()
virtual

Definition at line 199 of file filedef.cpp.

1284{
1285 for (auto &ml : m_memberLists)
1286 {
1287 if (ml->listType().isDeclaration())
1288 {
1290 }
1291 }
1292
1293 // add members inside sections to their groups
1294 for (const auto &mg : m_memberGroups)
1295 {
1296 if (mg->allMembersInSameSection() && m_subGrouping)
1297 {
1298 //printf("----> addToDeclarationSection(%s)\n",qPrint(mg->header()));
1299 mg->addToDeclarationSection();
1300 }
1301 }
1302}

References addMembersToMemberGroup, m_memberGroups, m_memberLists and m_subGrouping.

Referenced by addMembersToMemberGroup.

addSourceRef()

void FileDefImpl::addSourceRef (int line, const Definition * d, const MemberDef * md)
virtual

Definition at line 172 of file filedef.cpp.

1474void FileDefImpl::addSourceRef(int line,const Definition *d,const MemberDef *md)
1475{
1476 //printf("FileDefImpl::addSourceRef(%d,%s,%s)\n",line,qPrint(d?d->name():"nullptr"),qPrint(md?md->name():"nullptr"));
1477 if (d)
1478 {
1479 m_srcDefMap.emplace(line,d);
1480 if (md) m_srcMemberMap.emplace(line,md);
1481 //printf("Adding member %s with anchor %s at line %d to file %s\n",
1482 // md?qPrint(md->name()):"<none>",md?qPrint(md->anchor()):"<none>",line,qPrint(name()));
1483 }
1484}

References m_srcDefMap and m_srcMemberMap.

addUsingDeclaration()

void FileDefImpl::addUsingDeclaration (const Definition * d)
virtual

Definition at line 193 of file filedef.cpp.

1514{
1515 m_usingDeclList.add(d->qualifiedName(),d);
1516}

References m_usingDeclList and Definition::qualifiedName.

Referenced by combineUsingRelations.

addUsingDirective()

void FileDefImpl::addUsingDirective (NamespaceDef * nd)
virtual

Definition at line 192 of file filedef.cpp.

1502{
1503 m_usingDirList.add(nd->qualifiedName(),nd);
1504 //printf("%p: FileDefImpl::addUsingDirective: %s:%d\n",this,qPrint(name()),usingDirList->count());
1505}

References m_usingDirList and Definition::qualifiedName.

Referenced by combineUsingRelations.

anchor()

QCString FileDefImpl::anchor ()
inline virtual

Returns the anchor within a page where this item can be found

Definition at line 136 of file filedef.cpp.

136 QCString anchor() const override { return QCString(); }

codeSymbolType()

CodeSymbolType FileDefImpl::codeSymbolType ()
inline virtual

Used for syntax highlighting symbol class

Definition at line 130 of file filedef.cpp.

Reference Default.

combineUsingRelations()

void FileDefImpl::combineUsingRelations ()
virtual

Definition at line 194 of file filedef.cpp.

1634{
1636 NamespaceDefSet visitedNamespaces;
1637 for (auto &nd : usingDirList)
1638 {
1640 if (ndm)
1641 {
1642 ndm->combineUsingRelations(visitedNamespaces);
1643 }
1644 }
1645
1646 for (auto &nd : usingDirList)
1647 {
1648 // add used namespaces of namespace nd to this namespace
1649 for (const auto &und : nd->getUsedNamespaces())
1650 {
1652 }
1653 // add used classes of namespace nd to this namespace
1654 for (const auto &ud : nd->getUsedDefinitions())
1655 {
1657 }
1658 }
1659}

References addUsingDeclaration, addUsingDirective, NamespaceDefMutable::combineUsingRelations, m_usingDirList and toNamespaceDefMutable.

computeAnchors()

void FileDefImpl::computeAnchors ()
virtual

Compute the HTML anchor names for all members in the class

Definition at line 189 of file filedef.cpp.

331{
332 MemberList *ml = getMemberList(MemberListType::AllMembersList());
333 if (ml) ml->setAnchors();
334}

References getMemberList and MemberList::setAnchors.

countMembers()

void FileDefImpl::countMembers ()
virtual

Definition at line 169 of file filedef.cpp.

1878{
1879 for (auto &ml : m_memberLists)
1880 {
1881 ml->countDecMembers();
1882 ml->countDocMembers();
1883 }
1884 for (const auto &mg : m_memberGroups)
1885 {
1886 mg->countDecMembers();
1887 mg->countDocMembers();
1888 }
1889}

References m_memberGroups and m_memberLists.

definitionType()

DefType FileDefImpl::definitionType ()
inline virtual

Use this for dynamic inspection of the type of the derived class

Definition at line 129 of file filedef.cpp.

129 DefType definitionType() const override { return TypeFile; }

References definitionType and Definition::TypeFile.

Referenced by definitionType.

displayName()

QCString FileDefImpl::displayName (bool includeScope=TRUE)
inline virtual

Returns the name of the definition as it appears in the output

Definition at line 133 of file filedef.cpp.

133 QCString displayName(bool=TRUE) const override { return localName(); }

References DefinitionMixin< FileDef >::localName and TRUE.

Referenced by writeDocumentation.

distributeMemberGroupDocumentation()

void FileDefImpl::distributeMemberGroupDocumentation ()
virtual

Definition at line 200 of file filedef.cpp.

337{
338 //printf("FileDefImpl::distributeMemberGroupDocumentation()\n");
339 for (const auto &mg : m_memberGroups)
340 {
341 mg->distributeMemberGroupDocumentation();
342 }
343}

Reference m_memberGroups.

docName()

const QCString & FileDefImpl::docName ()
inline virtual

Returns the name as it is used in the documentation

Definition at line 142 of file filedef.cpp.

142 const QCString &docName() const override { return m_docname; }

Reference m_docname.

fileName()

QCString FileDefImpl::fileName ()
inline virtual

Returns the unique file name (this may include part of the path).

Definition at line 134 of file filedef.cpp.

134 QCString fileName() const override { return m_fileName; }

Reference m_fileName.

fileVersion()

QCString FileDefImpl::fileVersion ()
virtual

Definition at line 167 of file filedef.cpp.

1863{
1864 return m_fileVersion;
1865}

Reference m_fileVersion.

findSectionsInDocumentation()

void FileDefImpl::findSectionsInDocumentation ()
virtual

Definition at line 201 of file filedef.cpp.

346{
350 for (const auto &mg : m_memberGroups)
351 {
352 mg->findSectionsInDocumentation(this);
353 }
354
355 for (auto &ml : m_memberLists)
356 {
357 if (ml->listType().isDeclaration())
358 {
359 ml->findSectionsInDocumentation(this);
360 }
361 }
362}

References DefinitionMixin< FileDef >::briefDescription, DefinitionMixin< FileDef >::docFile, docFindSections, DefinitionMixin< FileDef >::documentation, DefinitionMixin< FileDef >::inbodyDocumentation, m_memberGroups and m_memberLists.

generateSourceFile()

bool FileDefImpl::generateSourceFile ()
virtual

Definition at line 195 of file filedef.cpp.

1595{
1596 bool sourceBrowser = Config_getBool(SOURCE_BROWSER);
1597 bool verbatimHeaders = Config_getBool(VERBATIM_HEADERS);
1598 return !isReference() &&
1599 (sourceBrowser ||
1600 (verbatimHeaders && (guessSection(name()).isHeader() || !m_includedByMap.empty()))
1601 ) &&
1603}

References Config_getBool, guessSection, isDocumentationFile, DefinitionMixin< FileDef >::isReference, m_includedByMap and name.

Referenced by writeSourceHeader and writeSourceLink.

getAllIncludeFilesRecursively()

void FileDefImpl::getAllIncludeFilesRecursively (StringVector & incFiles)
virtual

Definition at line 158 of file filedef.cpp.

1845{
1846 StringUnorderedSet includes;
1847 ::getAllIncludeFilesRecursively(includes,this,incFiles);
1848}

Reference getAllIncludeFilesRecursively.

Referenced by getAllIncludeFilesRecursively.

getClasses()

const ClassLinkedRefMap & FileDefImpl::getClasses ()
inline virtual

Definition at line 164 of file filedef.cpp.

164 const ClassLinkedRefMap &getClasses() const override { return m_classes; }

Reference m_classes.

getConcepts()

const ConceptLinkedRefMap & FileDefImpl::getConcepts ()
inline virtual

Definition at line 163 of file filedef.cpp.

163 const ConceptLinkedRefMap &getConcepts() const override { return m_concepts; }

Reference m_concepts.

getDirDef()

DirDef * FileDefImpl::getDirDef ()
inline virtual

Definition at line 152 of file filedef.cpp.

152 DirDef *getDirDef() const override { return m_dir; }

Reference m_dir.

Referenced by writeDocumentation and writeSourceHeader.

getMemberGroups()

const MemberGroupList & FileDefImpl::getMemberGroups ()
inline virtual

Definition at line 161 of file filedef.cpp.

161 const MemberGroupList &getMemberGroups() const override { return m_memberGroups; }

Reference m_memberGroups.

getMemberList()

MemberList * FileDefImpl::getMemberList (MemberListType lt)
virtual

Definition at line 159 of file filedef.cpp.

1787{
1788 for (auto &ml : m_memberLists)
1789 {
1790 if (ml->listType()==lt)
1791 {
1792 return ml.get();
1793 }
1794 }
1795 return nullptr;
1796}

Reference m_memberLists.

Referenced by computeAnchors, insertMember, numDecMembers, numDocMembers, removeMemberFromList, writeDocumentation, writeMemberDeclarations, writeMemberDocumentation, writeQuickMemberLinks, writeSummaryLinks and writeTagFile.

getMemberLists()

const MemberLists & FileDefImpl::getMemberLists ()
inline virtual

Definition at line 160 of file filedef.cpp.

160 const MemberLists &getMemberLists() const override { return m_memberLists; }

Reference m_memberLists.

getModuleDef()

ModuleDef * FileDefImpl::getModuleDef ()
inline virtual

Definition at line 153 of file filedef.cpp.

153 ModuleDef *getModuleDef() const override { return m_moduleDef; }

Reference m_moduleDef.

getNamespaces()

const NamespaceLinkedRefMap & FileDefImpl::getNamespaces ()
inline virtual

Definition at line 162 of file filedef.cpp.

162 const NamespaceLinkedRefMap &getNamespaces() const override { return m_namespaces; }

Reference m_namespaces.

getOutputFileBase()

QCString FileDefImpl::getOutputFileBase ()
virtual

Returns the base file name (without extension) of this definition. as it is referenced to/written to disk.

Definition at line 135 of file filedef.cpp.

Reference m_outputDiskName.

Referenced by addListReferences, writeDocumentation, writeSourceHeader and writeTagFile.

getPath()

QCString FileDefImpl::getPath ()
inline virtual

Returns the absolute path of this file.

Definition at line 147 of file filedef.cpp.

147 QCString getPath() const override { return m_path; }

Reference m_path.

Referenced by writeTagFile.

getSourceDefinition()

const Definition * FileDefImpl::getSourceDefinition (int lineNr)
virtual

Definition at line 145 of file filedef.cpp.

1487{
1488 auto it = m_srcDefMap.find(lineNr);
1489 //printf("%s::getSourceDefinition(%d)=%s\n",qPrint(name()),lineNr,it!=m_srcDefMap.end()?qPrint(it->second->name()):"none");
1490 return it!=m_srcDefMap.end() ? it->second : nullptr;
1491}

Reference m_srcDefMap.

getSourceFileBase()

QCString FileDefImpl::getSourceFileBase ()
virtual

Returns the name of the source listing of this definition.

Definition at line 137 of file filedef.cpp.

1706{
1707 if (Htags::useHtags)
1708 {
1710 }
1711 else
1712 {
1713 return m_outputDiskName+"_source";
1714 }
1715}

References m_filePath, m_outputDiskName, Htags::path2URL and Htags::useHtags.

Referenced by includeName, writeDetailedDescription and writeSourceHeader.

getSourceMember()

const MemberDef * FileDefImpl::getSourceMember (int lineNr)
virtual

Definition at line 146 of file filedef.cpp.

1494{
1495 auto it = m_srcMemberMap.find(lineNr);
1496 //printf("%s::getSourceMember(%d)=%s\n",qPrint(name()),lineNr,it!=m_srcMemberMap.end()?qPrint(it->second->name()):"none");
1497 return it!=m_srcMemberMap.end() ? it->second : nullptr;
1498}

Reference m_srcMemberMap.

getUsedDefinitions()

const LinkedRefMap< const Definition > & FileDefImpl::getUsedDefinitions ()
inline virtual

Definition at line 155 of file filedef.cpp.

Reference m_usingDeclList.

getUsedNamespaces()

const LinkedRefMap< NamespaceDef > & FileDefImpl::getUsedNamespaces ()
virtual

Definition at line 154 of file filedef.cpp.

1508{
1509 //printf("%p: FileDefImpl::getUsedNamespace: %s:%d\n",this,qPrint(name()),usingDirList?usingDirList->count():0);
1510 return m_usingDirList;
1511}

Reference m_usingDirList.

getVersion()

QCString FileDefImpl::getVersion ()
inline virtual

Returns version of this file.

Definition at line 148 of file filedef.cpp.

148 QCString getVersion() const override { return m_fileVersion; }

Reference m_fileVersion.

hasDetailedDescription()

bool FileDefImpl::hasDetailedDescription ()
virtual

Definition at line 166 of file filedef.cpp.

365{
366 bool repeatBrief = Config_getBool(REPEAT_BRIEF);
367 bool sourceBrowser = Config_getBool(SOURCE_BROWSER);
368 return ((!briefDescription().isEmpty() && repeatBrief) ||
369 !documentation().stripWhiteSpace().isEmpty() || // avail empty section
370 (sourceBrowser && getStartBodyLine()!=-1 && getBodyDef())
371 );
372}

References DefinitionMixin< FileDef >::briefDescription, Config_getBool, DefinitionMixin< FileDef >::documentation, DefinitionMixin< FileDef >::getBodyDef, DefinitionMixin< FileDef >::getStartBodyLine and stripWhiteSpace.

Referenced by writeDetailedDescription.

hasIncludedByGraph()

bool FileDefImpl::hasIncludedByGraph ()
virtual

Definition at line 206 of file filedef.cpp.

1919{
1921}

Reference m_hasIncludedByGraph.

hasIncludeGraph()

bool FileDefImpl::hasIncludeGraph ()
virtual

Definition at line 205 of file filedef.cpp.

1914{
1915 return m_hasIncludeGraph;
1916}

Reference m_hasIncludeGraph.

includedByDependencyGraphFileName()

QCString FileDefImpl::includedByDependencyGraphFileName ()
virtual

Definition at line 140 of file filedef.cpp.

Reference m_inclByDepFileName.

includedByFileList()

const IncludeInfoList & FileDefImpl::includedByFileList ()
inline virtual

Definition at line 157 of file filedef.cpp.

157 const IncludeInfoList &includedByFileList() const override { return m_includedByList; }

Reference m_includedByList.

includeDependencyGraphFileName()

QCString FileDefImpl::includeDependencyGraphFileName ()
virtual

Definition at line 139 of file filedef.cpp.

Reference m_inclDepFileName.

includeFileList()

const IncludeInfoList & FileDefImpl::includeFileList ()
inline virtual

Definition at line 156 of file filedef.cpp.

156 const IncludeInfoList &includeFileList() const override { return m_includeList; }

Reference m_includeList.

includeName()

QCString FileDefImpl::includeName ()
virtual

Returns the name of the verbatim copy of this file (if any).

Definition at line 138 of file filedef.cpp.

1724{
1725 return getSourceFileBase();
1726}

Reference getSourceFileBase.

Referenced by writeSourceLink.

insertClass()

void FileDefImpl::insertClass (ClassDef * cd)
virtual

Adds compound definition cd to the list of all compounds of this file

Definition at line 186 of file filedef.cpp.

1429{
1430 if (cd->isHidden()) return;
1431
1433
1434 if (Config_getBool(OPTIMIZE_OUTPUT_SLICE))
1435 {
1437 {
1438 list = &m_interfaces;
1439 }
1440 else if (cd->compoundType()==ClassDef::Struct)
1441 {
1442 list = &m_structs;
1443 }
1444 else if (cd->compoundType()==ClassDef::Exception)
1445 {
1446 list = &m_exceptions;
1447 }
1448 }
1449
1450 list->add(cd->name(),cd);
1451}

References LinkedRefMap< T, Hash, KeyEqual, Map >::add, ClassDef::compoundType, Config_getBool, ClassDef::Exception, ClassDef::Interface, Definition::isHidden, m_classes, m_exceptions, m_interfaces, m_structs, Definition::name and ClassDef::Struct.

insertConcept()

void FileDefImpl::insertConcept (ConceptDef * cd)
virtual

Definition at line 187 of file filedef.cpp.

1454{
1455 if (cd->isHidden()) return;
1456 m_concepts.add(cd->name(),cd);
1457}

References Definition::isHidden, m_concepts and Definition::name.

insertMember()

void FileDefImpl::insertMember (MemberDef * md)
virtual

Adds member definition md to the list of all members of this file

Definition at line 184 of file filedef.cpp.

1306{
1307 if (md->isHidden()) return;
1308 MemberList *allMemberList = getMemberList(MemberListType::AllMembersList());
1309 //printf("%s:FileDefImpl::insertMember(%s (=%p) list has %zu elements)\n",
1310 // qPrint(name()),qPrint(md->name()),(void*)md,allMemberList ? allMemberList->size() : 0);
1311 if (allMemberList && allMemberList->contains(md))
1312 {
1313 //printf("already added\n");
1314 return;
1315 }
1316
1317 if (allMemberList==nullptr)
1318 {
1319 m_memberLists.emplace_back(std::make_unique<MemberList>(MemberListType::AllMembersList(),MemberListContainer::File));
1320 allMemberList = m_memberLists.back().get();
1321 }
1322 allMemberList->push_back(md);
1323 switch (md->memberType())
1324 {
1326 if (md->getLanguage() == SrcLangExt::Python)
1327 {
1328 addMemberToList(MemberListType::PropertyMembers(),md);
1329 addMemberToList(MemberListType::Properties(),md);
1330 break;
1331 }
1332 // fallthrough, explicitly no break here
1334 addMemberToList(MemberListType::DecVarMembers(),md);
1335 addMemberToList(MemberListType::DocVarMembers(),md);
1336 break;
1338 addMemberToList(MemberListType::DecFuncMembers(),md);
1339 addMemberToList(MemberListType::DocFuncMembers(),md);
1340 break;
1342 addMemberToList(MemberListType::DecTypedefMembers(),md);
1343 addMemberToList(MemberListType::DocTypedefMembers(),md);
1344 break;
1346 addMemberToList(MemberListType::DecSequenceMembers(),md);
1347 addMemberToList(MemberListType::DocSequenceMembers(),md);
1348 break;
1350 addMemberToList(MemberListType::DecDictionaryMembers(),md);
1351 addMemberToList(MemberListType::DocDictionaryMembers(),md);
1352 break;
1354 addMemberToList(MemberListType::DecEnumMembers(),md);
1355 addMemberToList(MemberListType::DocEnumMembers(),md);
1356 break;
1357 case MemberType::EnumValue: // enum values are shown inside their enums
1358 break;
1360 addMemberToList(MemberListType::DecDefineMembers(),md);
1361 addMemberToList(MemberListType::DocDefineMembers(),md);
1362 break;
1363 default:
1364 err("FileDefImpl::insertMembers(): "
1365 "member '{}' with class scope '{}' inserted in file scope '{}'!\n",
1366 md->name(),
1367 md->getClassDef() ? md->getClassDef()->name() : "<global>",
1368 name());
1369 }
1370 //addMemberToGroup(md,groupId);
1371}

References addMemberToList, MemberVector::contains, Define, Dictionary, Enumeration, EnumValue, err, File, Function, MemberDef::getClassDef, Definition::getLanguage, getMemberList, Definition::isHidden, m_memberLists, MemberDef::memberType, Definition::name, name, Property, MemberVector::push_back, Sequence, Typedef and Variable.

insertNamespace()

void FileDefImpl::insertNamespace (NamespaceDef * nd)
virtual

Adds namespace definition nd to the list of all compounds of this file

Definition at line 188 of file filedef.cpp.

1461{
1462 if (nd->isHidden()) return;
1463 m_namespaces.add(nd->name(),nd);
1464}

References Definition::isHidden, m_namespaces and Definition::name.

isDocumentationFile()

bool FileDefImpl::isDocumentationFile ()
virtual

Definition at line 144 of file filedef.cpp.

1662{
1663 static const std::unordered_set<std::string> docExtensions =
1664 { "doc", "txt", "dox", "md", "markdown" };
1665
1666 int lastDot = name().findRev('.');
1667 return (lastDot!=-1 && docExtensions.find(name().mid(lastDot+1).str())!=docExtensions.end()) ||
1668 getLanguageFromFileName(getFileNameExtension(name())) == SrcLangExt::Markdown;
1669}

References QCString::findRev, getFileNameExtension, getLanguageFromFileName and name.

Referenced by generateSourceFile and writeSourceHeader.

isIncluded()

bool FileDefImpl::isIncluded (const QCString & name)
virtual

Definition at line 151 of file filedef.cpp.

1589{
1590 if (name.isEmpty()) return FALSE;
1591 return m_includeMap.find(name.str())!=m_includeMap.end();
1592}

References FALSE, m_includeMap and name.

isLinkable()

bool FileDefImpl::isLinkable ()
inline virtual

Returns TRUE iff it is possible to link to this item. This can be a link to another project imported via a tag file.

Definition at line 150 of file filedef.cpp.

150 bool isLinkable() const override { return isLinkableInProject() || isReference(); }

References isLinkableInProject and DefinitionMixin< FileDef >::isReference.

Referenced by writeSourceHeader.

isLinkableInProject()

bool FileDefImpl::isLinkableInProject ()
virtual

Returns TRUE iff it is possible to link to this item within this project.

Definition at line 149 of file filedef.cpp.

1823{
1824 bool showFiles = Config_getBool(SHOW_FILES);
1825 return hasDocumentation() && !isReference() && (showFiles || isLinkableViaGroup());
1826}

References Config_getBool, DefinitionMixin< FileDef >::hasDocumentation, DefinitionMixin< FileDef >::isLinkableViaGroup and DefinitionMixin< FileDef >::isReference.

Referenced by isLinkable.

isSource()

bool FileDefImpl::isSource ()
inline virtual

Returns TRUE if this file is a source file.

Definition at line 143 of file filedef.cpp.

143 bool isSource() const override { return m_isSource; }

Reference m_isSource.

name()

const QCString & FileDefImpl::name ()
virtual

numDecMembers()

int FileDefImpl::numDecMembers ()
virtual

Definition at line 171 of file filedef.cpp.

1898{
1899 MemberList *ml = getMemberList(MemberListType::AllMembersList());
1900 return ml ? ml->numDecMembers() : 0;
1901}

References getMemberList and MemberList::numDecMembers.

numDocMembers()

int FileDefImpl::numDocMembers ()
virtual

Definition at line 170 of file filedef.cpp.

1892{
1893 MemberList *ml = getMemberList(MemberListType::AllMembersList());
1894 return ml ? ml->numDocMembers() : 0;
1895}

References getMemberList and MemberList::numDocMembers.

overrideIncludedByGraph()

void FileDefImpl::overrideIncludedByGraph (bool e)
virtual

Definition at line 208 of file filedef.cpp.

Reference m_hasIncludedByGraph.

overrideIncludeGraph()

void FileDefImpl::overrideIncludeGraph (bool e)
virtual

Definition at line 207 of file filedef.cpp.

1904{
1906}

Reference m_hasIncludeGraph.

parseSource()

void FileDefImpl::parseSource (ClangTUParser * clangParser)
virtual

Definition at line 182 of file filedef.cpp.

1256void FileDefImpl::parseSource([[maybe_unused]] ClangTUParser *clangParser)
1257{
1258 bool filterSourceFiles = Config_getBool(FILTER_SOURCE_FILES);
1259 OutputCodeList devNullList;
1260 devNullList.add<DevNullCodeGenerator>();
1261#if USE_LIBCLANG
1262 if (Doxygen::clangAssistedParsing && clangParser &&
1263 (getLanguage()==SrcLangExt::Cpp || getLanguage()==SrcLangExt::ObjC))
1264 {
1265 clangParser->switchToFile(this);
1266 clangParser->writeSources(devNullList,this);
1267 }
1268 else
1269#endif
1270 {
1271 auto intf = Doxygen::parserManager->getCodeParser(getDefFileExtension());
1272 intf->resetCodeParserState();
1273 intf->parseCode(
1274 devNullList,QCString(),
1275 fileToString(absFilePath(),filterSourceFiles,TRUE),
1276 getLanguage(),
1277 Config_getBool(STRIP_CODE_COMMENTS),
1278 FALSE,QCString(),this
1279 );
1280 }
1281}

References absFilePath, OutputCodeList::add, Doxygen::clangAssistedParsing, Config_getBool, FALSE, fileToString, DefinitionMixin< FileDef >::getDefFileExtension, DefinitionMixin< FileDef >::getLanguage, Doxygen::parserManager and TRUE.

removeMember()

void FileDefImpl::removeMember (MemberDef * md)
virtual

Definition at line 185 of file filedef.cpp.

1380{
1381 removeMemberFromList(MemberListType::AllMembersList(),md);
1382 switch(md->memberType())
1383 {
1385 if (md->getLanguage() == SrcLangExt::Python)
1386 {
1387 removeMemberFromList(MemberListType::PropertyMembers(),md);
1388 removeMemberFromList(MemberListType::Properties(),md);
1389 break;
1390 }
1391 // fallthrough, explicitly no break here
1393 removeMemberFromList(MemberListType::DecVarMembers(),md);
1394 removeMemberFromList(MemberListType::DocVarMembers(),md);
1395 break;
1397 removeMemberFromList(MemberListType::DecFuncMembers(),md);
1398 removeMemberFromList(MemberListType::DocFuncMembers(),md);
1399 break;
1401 removeMemberFromList(MemberListType::DecTypedefMembers(),md);
1402 removeMemberFromList(MemberListType::DocTypedefMembers(),md);
1403 break;
1405 removeMemberFromList(MemberListType::DecSequenceMembers(),md);
1406 removeMemberFromList(MemberListType::DocSequenceMembers(),md);
1407 break;
1409 removeMemberFromList(MemberListType::DecDictionaryMembers(),md);
1410 removeMemberFromList(MemberListType::DocDictionaryMembers(),md);
1411 break;
1413 removeMemberFromList(MemberListType::DecEnumMembers(),md);
1414 removeMemberFromList(MemberListType::DocEnumMembers(),md);
1415 break;
1416 case MemberType::EnumValue: // enum values are shown inside their enums
1417 break;
1419 removeMemberFromList(MemberListType::DecDefineMembers(),md);
1420 removeMemberFromList(MemberListType::DocDefineMembers(),md);
1421 break;
1422 default:
1423 err("FileDefImpl::removeMember(): unexpected member remove in file!\n");
1424 }
1425}

References Define, Dictionary, Enumeration, EnumValue, err, Function, Definition::getLanguage, MemberDef::memberType, Property, removeMemberFromList, Sequence, Typedef and Variable.

setDirDef()

void FileDefImpl::setDirDef (DirDef * dd)
inline virtual

Definition at line 190 of file filedef.cpp.

190 void setDirDef(DirDef *dd) override { m_dir=dd; }

Reference m_dir.

setDiskName()

void FileDefImpl::setDiskName (const QCString & name)
virtual

Definition at line 183 of file filedef.cpp.

References name and setDiskNameLocal.

setModuleDef()

void FileDefImpl::setModuleDef (ModuleDef * mod)
inline virtual

Definition at line 191 of file filedef.cpp.

191 void setModuleDef(ModuleDef *mod) override { m_moduleDef=mod; }

Reference m_moduleDef.

sortMemberLists()

void FileDefImpl::sortMemberLists ()
virtual

Definition at line 196 of file filedef.cpp.

1748{
1749 for (auto &ml : m_memberLists)
1750 {
1751 if (ml->needsSorting()) { ml->sort(); ml->setNeedsSorting(FALSE); }
1752 }
1753
1754 for (const auto &mg : m_memberGroups)
1755 {
1756 MemberList &mlg = const_cast<MemberList&>(mg->members());
1757 if (mlg.needsSorting()) { mlg.sort(); mlg.setNeedsSorting(FALSE); }
1758 }
1759
1760 std::stable_sort(m_includedByList.begin(),m_includedByList.end(),
1761 [](const auto &fi1,const auto &fi2) { return fi1.includeName < fi2.includeName; });
1762
1763 if (Config_getBool(SORT_BRIEF_DOCS))
1764 {
1765 auto classComp = [](const ClassLinkedRefMap::Ptr &c1,const ClassLinkedRefMap::Ptr &c2)
1766 {
1767 return Config_getBool(SORT_BY_SCOPE_NAME) ?
1768 qstricmp_sort(c1->name(), c2->name())<0 :
1769 qstricmp_sort(c1->className(), c2->className())<0;
1770 };
1771
1772 std::stable_sort(m_classes.begin(), m_classes.end(), classComp);
1773 std::stable_sort(m_interfaces.begin(),m_interfaces.end(),classComp);
1774 std::stable_sort(m_structs.begin(), m_structs.end(), classComp);
1775 std::stable_sort(m_exceptions.begin(),m_exceptions.end(),classComp);
1776
1777 auto namespaceComp = [](const NamespaceLinkedRefMap::Ptr &n1,const NamespaceLinkedRefMap::Ptr &n2)
1778 {
1779 return qstricmp_sort(n1->name(),n2->name())<0;
1780 };
1781
1782 std::stable_sort(m_namespaces.begin(),m_namespaces.end(),namespaceComp);
1783 }
1784}

References ClassDef::className, Config_getBool, FALSE, m_classes, m_exceptions, m_includedByList, m_interfaces, m_memberGroups, m_memberLists, m_namespaces, m_structs, Definition::name, MemberList::needsSorting, qstricmp_sort, MemberList::setNeedsSorting and MemberVector::sort.

subGrouping()

bool FileDefImpl::subGrouping ()
inline virtual

Definition at line 168 of file filedef.cpp.

168 bool subGrouping() const override { return m_subGrouping; }

Reference m_subGrouping.

title()

QCString FileDefImpl::title ()
virtual

Definition at line 165 of file filedef.cpp.

1851{
1852 if (Config_getBool(HIDE_COMPOUND_REFERENCE))
1853 {
1854 return name();
1855 }
1856 else
1857 {
1858 return theTranslator->trFileReference(name());
1859 }
1860}

References Config_getBool, name and theTranslator.

Referenced by writeClassDeclarations, writeConcepts, writeDetailedDescription, writeDocumentation, writeMemberDeclarations, writeMemberDocumentation, writeNamespaceDeclarations and writeSourceHeader.

writeDocumentation()

void FileDefImpl::writeDocumentation (OutputList & ol)
virtual

Write the documentation page for this file to the file of output generators ol.

Definition at line 173 of file filedef.cpp.

858{
859 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
860 //funcList->countDecMembers();
861
862 //QCString fn = name();
863 //if (Config_getBool(FULL_PATH_NAMES))
864 //{
865 // fn.prepend(stripFromPath(getPath()));
866 //}
867
868 //printf("WriteDocumentation diskname=%s\n",qPrint(diskname));
869
870 QCString versionTitle;
871 if (!m_fileVersion.isEmpty())
872 {
873 versionTitle=("("+m_fileVersion+")");
874 }
875 QCString title = m_docname+versionTitle;
876 QCString pageTitle;
877 if (Config_getBool(HIDE_COMPOUND_REFERENCE))
878 {
879 pageTitle=m_docname;
880 }
881 else
882 {
883 pageTitle=theTranslator->trFileReference(m_docname);
884 }
885
886 if (getDirDef())
887 {
888 startFile(ol,getOutputFileBase(),name(),pageTitle,HighlightedItem::FileVisible,!generateTreeView);
889 if (!generateTreeView)
890 {
892 ol.endQuickIndices();
893 }
897 if (Config_getBool(HIDE_COMPOUND_REFERENCE))
898 {
899 ol.parseText(displayName()); // Html only
900 }
901 else
902 {
903 ol.parseText(theTranslator->trFileReference(displayName())); // Html only
904 }
905 ol.enableAll();
907 if (Config_getBool(HIDE_COMPOUND_REFERENCE))
908 {
909 ol.parseText(Config_getBool(FULL_PATH_NAMES) ? // other output formats
910 pageTitle :
911 name());
912 }
913 else
914 {
915 ol.parseText(Config_getBool(FULL_PATH_NAMES) ? // other output formats
916 pageTitle :
917 theTranslator->trFileReference(name()));
918 }
920 addGroupListToTitle(ol,this);
922 }
923 else
924 {
925 startFile(ol,getOutputFileBase(),name(),pageTitle,HighlightedItem::FileVisible,!generateTreeView);
926 if (!generateTreeView)
927 {
928 ol.endQuickIndices();
929 }
931 ol.parseText(pageTitle);
932 addGroupListToTitle(ol,this);
934 }
935
936 ol.startContents();
937
938 if (!m_fileVersion.isEmpty())
939 {
942 ol.docify(versionTitle);
944 ol.enableAll();
945 }
946
947 //---------------------------------------- start flexible part -------------------------------
948
949 SrcLangExt lang = getLanguage();
950 for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::File))
951 {
952 const LayoutDocEntrySection *ls = dynamic_cast<const LayoutDocEntrySection*>(lde.get());
953 switch (lde->kind())
954 {
955 case LayoutDocEntry::BriefDesc:
957 break;
958 case LayoutDocEntry::MemberDeclStart:
960 break;
961 case LayoutDocEntry::FileIncludes:
963 break;
964 case LayoutDocEntry::FileIncludeGraph:
966 break;
967 case LayoutDocEntry::FileIncludedByGraph:
969 break;
970 case LayoutDocEntry::FileSourceLink:
972 break;
973 case LayoutDocEntry::FileClasses:
974 if (ls) writeClassDeclarations(ol,ls->title(lang),m_classes);
975 break;
976 case LayoutDocEntry::FileInterfaces:
977 if (ls) writeClassDeclarations(ol,ls->title(lang),m_interfaces);
978 break;
979 case LayoutDocEntry::FileStructs:
980 if (ls) writeClassDeclarations(ol,ls->title(lang),m_structs);
981 break;
982 case LayoutDocEntry::FileExceptions:
983 if (ls) writeClassDeclarations(ol,ls->title(lang),m_exceptions);
984 break;
985 case LayoutDocEntry::FileConcepts:
986 if (ls) writeConcepts(ol,ls->title(lang));
987 break;
988 case LayoutDocEntry::FileNamespaces:
989 if (ls) writeNamespaceDeclarations(ol,ls->title(lang),false);
990 break;
991 case LayoutDocEntry::FileConstantGroups:
992 if (ls) writeNamespaceDeclarations(ol,ls->title(lang),true);
993 break;
994 case LayoutDocEntry::MemberGroups:
996 break;
997 case LayoutDocEntry::MemberDecl:
998 {
999 const LayoutDocEntryMemberDecl *lmd = dynamic_cast<const LayoutDocEntryMemberDecl*>(lde.get());
1000 if (lmd) writeMemberDeclarations(ol,lmd->type,lmd->title(lang));
1001 }
1002 break;
1003 case LayoutDocEntry::MemberDeclEnd:
1005 break;
1006 case LayoutDocEntry::DetailedDesc:
1007 if (ls) writeDetailedDescription(ol,ls->title(lang));
1008 break;
1009 case LayoutDocEntry::MemberDefStart:
1011 break;
1012 case LayoutDocEntry::FileInlineClasses:
1014 break;
1015 case LayoutDocEntry::MemberDef:
1016 {
1017 const LayoutDocEntryMemberDef *lmd = dynamic_cast<const LayoutDocEntryMemberDef*>(lde.get());
1018 if (lmd) writeMemberDocumentation(ol,lmd->type,lmd->title(lang));
1019 }
1020 break;
1021 case LayoutDocEntry::MemberDefEnd:
1023 break;
1024 case LayoutDocEntry::AuthorSection:
1026 break;
1027 case LayoutDocEntry::ClassIncludes:
1028 case LayoutDocEntry::ClassInheritanceGraph:
1029 case LayoutDocEntry::ClassNestedClasses:
1030 case LayoutDocEntry::ClassCollaborationGraph:
1031 case LayoutDocEntry::ClassAllMembersLink:
1032 case LayoutDocEntry::ClassUsedFiles:
1033 case LayoutDocEntry::ClassInlineClasses:
1034 case LayoutDocEntry::NamespaceNestedNamespaces:
1035 case LayoutDocEntry::NamespaceNestedConstantGroups:
1036 case LayoutDocEntry::NamespaceClasses:
1037 case LayoutDocEntry::NamespaceConcepts:
1038 case LayoutDocEntry::NamespaceInterfaces:
1039 case LayoutDocEntry::NamespaceStructs:
1040 case LayoutDocEntry::NamespaceExceptions:
1041 case LayoutDocEntry::NamespaceInlineClasses:
1042 case LayoutDocEntry::ConceptDefinition:
1043 case LayoutDocEntry::GroupClasses:
1044 case LayoutDocEntry::GroupConcepts:
1045 case LayoutDocEntry::GroupModules:
1046 case LayoutDocEntry::GroupInlineClasses:
1047 case LayoutDocEntry::GroupNamespaces:
1048 case LayoutDocEntry::GroupDirs:
1049 case LayoutDocEntry::GroupNestedGroups:
1050 case LayoutDocEntry::GroupFiles:
1051 case LayoutDocEntry::GroupGraph:
1052 case LayoutDocEntry::GroupPageDocs:
1053 case LayoutDocEntry::ModuleExports:
1054 case LayoutDocEntry::ModuleClasses:
1055 case LayoutDocEntry::ModuleConcepts:
1056 case LayoutDocEntry::ModuleUsedFiles:
1057 case LayoutDocEntry::DirSubDirs:
1058 case LayoutDocEntry::DirFiles:
1059 case LayoutDocEntry::DirGraph:
1060 err("Internal inconsistency: member '{}' should not be part of "
1061 "LayoutDocManager::File entry list\n",lde->entryToString());
1062 break;
1063 }
1064 }
1065
1066 //---------------------------------------- end flexible part -------------------------------
1067
1068 ol.endContents();
1069
1070 endFileWithNavPath(ol,this);
1071
1072 if (Config_getBool(SEPARATE_MEMBER_PAGES))
1073 {
1074 MemberList *ml = getMemberList(MemberListType::AllMembersList());
1075 if (ml) ml->sort();
1077 }
1078}

References addGroupListToTitle, Config_getBool, OutputList::disable, OutputList::disableAllBut, displayName, OutputList::docify, OutputList::enableAll, OutputList::endContents, endFileWithNavPath, endMemberDeclarations, endMemberDocumentation, OutputList::endProjectNumber, OutputList::endQuickIndices, endTitle, err, FileVisible, getDirDef, DefinitionMixin< FileDef >::getLanguage, getMemberList, getOutputFileBase, Html, LayoutDocManager::instance, m_classes, m_docname, m_exceptions, m_fileVersion, m_interfaces, m_structs, name, OutputList::parseText, OutputList::popGeneratorState, OutputList::pushGeneratorState, MemberVector::sort, OutputList::startContents, startFile, startMemberDeclarations, startMemberDocumentation, OutputList::startProjectNumber, startTitle, theTranslator, title, LayoutDocEntryMemberDecl::title, LayoutDocEntryMemberDef::title, LayoutDocEntrySection::title, LayoutDocEntryMemberDecl::type, LayoutDocEntryMemberDef::type, writeAuthorSection, writeBriefDescription, writeClassDeclarations, writeConcepts, writeDetailedDescription, writeIncludedByGraph, writeIncludeFiles, writeIncludeGraph, writeInlineClasses, writeMemberDeclarations, writeMemberDocumentation, writeMemberGroups, writeMemberPages, writeNamespaceDeclarations, DefinitionMutable::writeNavigationPath and writeSourceLink.

writeMemberPages()

void FileDefImpl::writeMemberPages (OutputList & ol)
virtual

Definition at line 174 of file filedef.cpp.

1081{
1084
1085 for (const auto &ml : m_memberLists)
1086 {
1087 if (ml->listType().isDocumentation())
1088 {
1089 ml->writeDocumentationPage(ol,name(),this);
1090 }
1091 }
1092
1094}

References OutputList::disableAllBut, Html, m_memberLists, name, OutputList::popGeneratorState and OutputList::pushGeneratorState.

Referenced by writeDocumentation.

writePageNavigation()

void FileDefImpl::writePageNavigation (OutputList & ol)
virtual

Definition at line 177 of file filedef.cpp.

Reference OutputList::writePageOutline.

writeQuickMemberLinks()

void FileDefImpl::writeQuickMemberLinks (OutputList & ol, const MemberDef * currentMd)
virtual

Definition at line 175 of file filedef.cpp.

1097{
1098 bool createSubDirs=Config_getBool(CREATE_SUBDIRS);
1099
1100 ol.writeString(" <div class=\"navtab\">\n");
1101 ol.writeString(" <table>\n");
1102
1103 MemberList *allMemberList = getMemberList(MemberListType::AllMembersList());
1104 if (allMemberList)
1105 {
1106 for (const auto &md : *allMemberList)
1107 {
1108 if (md->getFileDef()==this && md->getNamespaceDef()==nullptr && md->isLinkable() && !md->isEnumValue())
1109 {
1110 if (md->isLinkableInProject())
1111 {
1112 QCString fn=md->getOutputFileBase();
1114 if (md==currentMd) // selected item => highlight
1115 {
1116 ol.writeString(" <tr><td class=\"navtabHL\">");
1117 }
1118 else
1119 {
1120 ol.writeString(" <tr><td class=\"navtab\">");
1121 }
1122 ol.writeString("<span class=\"label\"><a ");
1123 ol.writeString("href=\"");
1124 if (createSubDirs) ol.writeString("../../");
1125 ol.writeString(fn+"#"+md->anchor());
1126 ol.writeString("\">");
1127 ol.writeString(convertToHtml(md->localName()));
1128 ol.writeString("</a></span>");
1129 ol.writeString("</td></tr>\n");
1130 }
1131 }
1132 }
1133 }
1134
1135 ol.writeString(" </table>\n");
1136 ol.writeString(" </div>\n");
1137}

References addHtmlExtensionIfMissing, Config_getBool, convertToHtml, createSubDirs, getMemberList and OutputList::writeString.

writeSourceBody()

void FileDefImpl::writeSourceBody (OutputList & ol, ClangTUParser * clangParser)
virtual

Definition at line 180 of file filedef.cpp.

1193void FileDefImpl::writeSourceBody(OutputList &ol,[[maybe_unused]] ClangTUParser *clangParser)
1194{
1195 bool filterSourceFiles = Config_getBool(FILTER_SOURCE_FILES);
1196 OutputCodeList devNullList;
1197 devNullList.add<DevNullCodeGenerator>();
1198#if USE_LIBCLANG
1199 if (Doxygen::clangAssistedParsing && clangParser &&
1200 (getLanguage()==SrcLangExt::Cpp || getLanguage()==SrcLangExt::ObjC))
1201 {
1202 auto &codeOL = ol.codeGenerators();
1203 codeOL.startCodeFragment("DoxyCode");
1204 clangParser->switchToFile(this);
1205 clangParser->writeSources(codeOL,this);
1206 codeOL.endCodeFragment("DoxyCode");
1207 }
1208 else
1209#endif
1210 {
1211 auto intf = Doxygen::parserManager->getCodeParser(getDefFileExtension());
1212 intf->resetCodeParserState();
1213 auto &codeOL = ol.codeGenerators();
1214 codeOL.startCodeFragment("DoxyCode");
1215 bool needs2PassParsing =
1216 Doxygen::parseSourcesNeeded && // we need to parse (filtered) sources for cross-references
1217 !filterSourceFiles && // but user wants to show sources as-is
1218 !getFileFilter(absFilePath(),TRUE).isEmpty(); // and there is a filter used while parsing
1219
1220 if (needs2PassParsing)
1221 {
1222 // parse code for cross-references only (see bug707641)
1223 intf->parseCode(devNullList,QCString(),
1225 getLanguage(),
1226 Config_getBool(STRIP_CODE_COMMENTS),
1227 FALSE,QCString(),this
1228 );
1229 }
1230 intf->parseCode(codeOL,QCString(),
1231 fileToString(absFilePath(),filterSourceFiles,TRUE),
1232 getLanguage(), // lang
1233 Config_getBool(STRIP_CODE_COMMENTS),
1234 FALSE, // isExampleBlock
1235 QCString(), // exampleName
1236 this, // fileDef
1237 -1, // startLine
1238 -1, // endLine
1239 FALSE, // inlineFragment
1240 nullptr, // memberDef
1241 TRUE, // showLineNumbers
1242 nullptr, // searchCtx
1243 !needs2PassParsing // collectXRefs
1244 );
1245 codeOL.endCodeFragment("DoxyCode");
1246 }
1247}

References absFilePath, OutputCodeList::add, Doxygen::clangAssistedParsing, OutputList::codeGenerators, Config_getBool, FALSE, fileToString, DefinitionMixin< FileDef >::getDefFileExtension, getFileFilter, DefinitionMixin< FileDef >::getLanguage, QCString::isEmpty, Doxygen::parserManager, Doxygen::parseSourcesNeeded, OutputCodeList::startCodeFragment and TRUE.

writeSourceFooter()

void FileDefImpl::writeSourceFooter (OutputList & ol)
virtual

Definition at line 181 of file filedef.cpp.

1250{
1251 ol.endContents();
1252 endFileWithNavPath(ol,this,false);
1253 ol.enableAll();
1254}

References OutputList::enableAll, OutputList::endContents and endFileWithNavPath.

writeSourceHeader()

void FileDefImpl::writeSourceHeader (OutputList & ol)
virtual

Write a source listing of this file to the output

Definition at line 179 of file filedef.cpp.

1141{
1142 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
1144 if (!m_fileVersion.isEmpty())
1145 {
1146 title+=(" ("+m_fileVersion+")");
1147 }
1148 QCString pageTitle = theTranslator->trSourceFile(title);
1150
1151 bool isDocFile = isDocumentationFile();
1152 bool genSourceFile = !isDocFile && generateSourceFile();
1153 if (getDirDef())
1154 {
1156 !generateTreeView,
1157 !isDocFile && genSourceFile ? QCString() : getOutputFileBase(),
1158 0);
1159 if (!generateTreeView)
1160 {
1162 ol.endQuickIndices();
1163 }
1165 ol.parseText(name());
1167 }
1168 else
1169 {
1171 !isDocFile && genSourceFile ? QCString() : getOutputFileBase(),
1172 0);
1174 ol.parseText(title);
1176 }
1177
1178 ol.startContents();
1179
1180 if (isLinkable())
1181 {
1183 ol.parseText(theTranslator->trGotoDocumentation());
1184 ol.endTextLink();
1185
1188 ol.writeString("\\par\n");
1190 }
1191}

References Config_getBool, OutputList::disable, OutputList::disableAllBut, OutputList::endQuickIndices, OutputList::endTextLink, endTitle, FileVisible, generateSourceFile, getDirDef, getOutputFileBase, getSourceFileBase, isDocumentationFile, isLinkable, m_docname, m_fileVersion, Man, name, OutputList::parseText, OutputList::popGeneratorState, OutputList::pushGeneratorState, RTF, OutputList::startContents, startFile, OutputList::startTextLink, startTitle, theTranslator, title, DefinitionMutable::writeNavigationPath and OutputList::writeString.

writeSummaryLinks()

void FileDefImpl::writeSummaryLinks (OutputList & ol)
virtual

Definition at line 176 of file filedef.cpp.

784{
787 bool first=TRUE;
789 for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::File))
790 {
791 const LayoutDocEntrySection *ls = dynamic_cast<const LayoutDocEntrySection*>(lde.get());
792 if (lde->kind()==LayoutDocEntry::FileClasses && m_classes.declVisible() && ls)
793 {
794 QCString label = "nested-classes";
795 ol.writeSummaryLink(QCString(),label,ls->title(lang),first);
796 first=FALSE;
797 }
798 else if (lde->kind()==LayoutDocEntry::FileInterfaces && m_interfaces.declVisible() && ls)
799 {
800 QCString label = "interfaces";
801 ol.writeSummaryLink(QCString(),label,ls->title(lang),first);
802 first=FALSE;
803 }
804 else if (lde->kind()==LayoutDocEntry::FileStructs && m_structs.declVisible() && ls)
805 {
806 QCString label = "structs";
807 ol.writeSummaryLink(QCString(),label,ls->title(lang),first);
808 first=FALSE;
809 }
810 else if (lde->kind()==LayoutDocEntry::FileExceptions && m_exceptions.declVisible() && ls)
811 {
812 QCString label = "exceptions";
813 ol.writeSummaryLink(QCString(),label,ls->title(lang),first);
814 first=FALSE;
815 }
816 else if (lde->kind()==LayoutDocEntry::FileNamespaces && m_namespaces.declVisible(false) && ls)
817 {
818 QCString label = "namespaces";
819 ol.writeSummaryLink(QCString(),label,ls->title(lang),first);
820 first=FALSE;
821 }
822 else if (lde->kind()==LayoutDocEntry::FileConcepts && m_concepts.declVisible() && ls)
823 {
824 QCString label = "concepts";
825 ol.writeSummaryLink(QCString(),label,ls->title(lang),first);
826 first=FALSE;
827 }
828 else if (lde->kind()==LayoutDocEntry::MemberDecl)
829 {
830 const LayoutDocEntryMemberDecl *lmd = dynamic_cast<const LayoutDocEntryMemberDecl*>(lde.get());
831 if (lmd)
832 {
833 MemberList * ml = getMemberList(lmd->type);
834 if (ml && ml->declVisible())
835 {
836 ol.writeSummaryLink(QCString(),ml->listType().toLabel(),lmd->title(lang),first);
837 first=FALSE;
838 }
839 }
840 }
841 }
842 if (!first)
843 {
844 ol.writeString(" </div>\n");
845 }
847}

References MemberList::declVisible, OutputList::disableAllBut, FALSE, DefinitionMixin< FileDef >::getLanguage, getMemberList, Html, LayoutDocManager::instance, MemberList::listType, m_classes, m_concepts, m_exceptions, m_interfaces, m_namespaces, m_structs, OutputList::popGeneratorState, OutputList::pushGeneratorState, LayoutDocEntryMemberDecl::title, LayoutDocEntrySection::title, MemberListType::toLabel, TRUE, LayoutDocEntryMemberDecl::type, OutputList::writeString and OutputList::writeSummaryLink.

writeTagFile()

void FileDefImpl::writeTagFile (TextStream & t)
virtual

Definition at line 178 of file filedef.cpp.

375{
378 tagFile << " <compound kind=\"file\">\n";
379 tagFile << " <name>" << convertToXML(name()) << "</name>\n";
380 tagFile << " <path>" << convertToXML(stripFromPath(getPath())) << "</path>\n";
381 tagFile << " <filename>" << fn << "</filename>\n";
382 for (const auto &ii : m_includeList)
383 {
384 const FileDef *fd=ii.fileDef;
385 if (fd && fd->isLinkable() && !fd->isReference())
386 {
387 QCString attr = includeTagFileAttributes(fd->getLanguage(),ii.kind);
388 tagFile << " <includes id=\""
389 << convertToXML(fd->getOutputFileBase()) << "\" "
390 << "name=\"" << convertToXML(fd->name()) << "\" "
391 << attr << ">"
392 << convertToXML(ii.includeName)
393 << "</includes>\n";
394 }
395 }
396 for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::File))
397 {
398 switch (lde->kind())
399 {
400 case LayoutDocEntry::FileClasses:
401 {
403 }
404 break;
405 case LayoutDocEntry::FileInterfaces:
406 {
408 }
409 break;
410 case LayoutDocEntry::FileStructs:
411 {
413 }
414 break;
415 case LayoutDocEntry::FileExceptions:
416 {
418 }
419 break;
420 case LayoutDocEntry::FileConcepts:
421 {
422 for (const auto *nd : m_concepts)
423 {
424 if (nd->isLinkableInProject())
425 {
426 tagFile << " <concept>" << convertToXML(nd->name()) << "</concept>\n";
427 }
428 }
429 }
430 break;
431 case LayoutDocEntry::FileNamespaces:
432 {
433 for (const auto *nd : m_namespaces)
434 {
435 if (nd->isLinkableInProject())
436 {
437 tagFile << " <namespace>" << convertToXML(nd->name()) << "</namespace>\n";
438 }
439 }
440 }
441 break;
442 case LayoutDocEntry::MemberDecl:
443 {
444 const LayoutDocEntryMemberDecl *lmd = dynamic_cast<const LayoutDocEntryMemberDecl*>(lde.get());
445 if (lmd)
446 {
447 MemberList * ml = getMemberList(lmd->type);
448 if (ml)
449 {
450 ml->writeTagFile(tagFile,false,false);
451 }
452 }
453 }
454 break;
455 case LayoutDocEntry::MemberGroups:
456 {
457 for (const auto &mg : m_memberGroups)
458 {
459 mg->writeTagFile(tagFile);
460 }
461 }
462 break;
463 default:
464 break;
465 }
466 }
467
469 tagFile << " </compound>\n";
470}

References addHtmlExtensionIfMissing, convertToXML, Definition::getLanguage, getMemberList, Definition::getOutputFileBase, getOutputFileBase, getPath, includeTagFileAttributes, LayoutDocManager::instance, Definition::isLinkable, Definition::isReference, m_classes, m_concepts, m_exceptions, m_includeList, m_interfaces, m_memberGroups, m_namespaces, m_structs, Definition::name, name, stripFromPath, LayoutDocEntryMemberDecl::type, writeClassesToTagFile, DefinitionMixin< FileDef >::writeDocAnchorsToTagFile and MemberList::writeTagFile.

Private Member Functions

acquireFileVersion()

void FileDefImpl::acquireFileVersion ()

Definition at line 212 of file filedef.cpp.

1672{
1673 QCString vercmd = Config_getString(FILE_VERSION_FILTER);
1674 if (!vercmd.isEmpty() && !m_filePath.isEmpty() && !isReference() &&
1675 m_filePath!="generated" && m_filePath!="graph_legend.dox")
1676 {
1677 msg("Version of {} : ",m_filePath);
1678 QCString cmd = vercmd+" \""+m_filePath+"\"";
1679 Debug::print(Debug::ExtCmd,0,"Executing popen(`{}`)\n",cmd);
1680 FILE *f=Portable::popen(cmd,"r");
1681 if (!f)
1682 {
1683 err("could not execute {}\n",vercmd);
1684 return;
1685 }
1686 const int bufSize=1024;
1687 char buf[bufSize];
1688 int numRead = static_cast<int>(fread(buf,1,bufSize-1,f));
1690 if (numRead>0 && numRead<bufSize)
1691 {
1692 buf[numRead]='\0';
1694 if (!m_fileVersion.isEmpty())
1695 {
1696 msg("{}\n",m_fileVersion);
1697 return;
1698 }
1699 }
1700 msg("no version available\n");
1701 }
1702}

References Config_getString, err, Debug::ExtCmd, QCString::isEmpty, DefinitionMixin< FileDef >::isReference, m_filePath, m_fileVersion, msg, Portable::pclose, Portable::popen, Debug::print and QCString::stripWhiteSpace.

Referenced by FileDefImpl.

addMemberToList()

void FileDefImpl::addMemberToList (MemberListType lt, MemberDef * md)

Definition at line 213 of file filedef.cpp.

1729{
1730 bool sortBriefDocs = Config_getBool(SORT_BRIEF_DOCS);
1731 bool sortMemberDocs = Config_getBool(SORT_MEMBER_DOCS);
1732 const auto &ml = m_memberLists.get(lt,MemberListContainer::File);
1733 ml->setNeedsSorting(
1734 (ml->listType().isDeclaration() && sortBriefDocs) ||
1735 (ml->listType().isDocumentation() && sortMemberDocs));
1736 ml->push_back(md);
1737 if (ml->listType().isDeclaration())
1738 {
1740 if (mdm)
1741 {
1742 mdm->setSectionList(this,ml.get());
1743 }
1744 }
1745}

References Config_getBool, File, m_memberLists, MemberDefMutable::setSectionList and toMemberDefMutable.

Referenced by insertMember.

endMemberDeclarations()

void FileDefImpl::endMemberDeclarations (OutputList & ol)

Definition at line 228 of file filedef.cpp.

Reference OutputList::endMemberSections.

Referenced by writeDocumentation.

endMemberDocumentation()

void FileDefImpl::endMemberDocumentation (OutputList & ol)

Definition at line 230 of file filedef.cpp.

751{
752 if (Config_getBool(SEPARATE_MEMBER_PAGES))
753 {
756 }
757}

References Config_getBool, OutputList::enable, FALSE, Html and Doxygen::suppressDocWarnings.

Referenced by writeDocumentation.

removeMemberFromList()

void FileDefImpl::removeMemberFromList (MemberListType lt, MemberDef * md)

Definition at line 234 of file filedef.cpp.

1374{
1375 MemberList *ml = getMemberList(lt);
1376 if (ml) ml->remove(md);
1377}

References getMemberList and MemberVector::remove.

Referenced by removeMember.

setDiskNameLocal()

void FileDefImpl::setDiskNameLocal (const QCString & name)

startMemberDeclarations()

void FileDefImpl::startMemberDeclarations (OutputList & ol)

Definition at line 227 of file filedef.cpp.

Reference OutputList::startMemberSections.

Referenced by writeDocumentation.

startMemberDocumentation()

void FileDefImpl::startMemberDocumentation (OutputList & ol)

Definition at line 229 of file filedef.cpp.

742{
743 if (Config_getBool(SEPARATE_MEMBER_PAGES))
744 {
747 }
748}

References Config_getBool, OutputList::disable, Html, Doxygen::suppressDocWarnings and TRUE.

Referenced by writeDocumentation.

writeAuthorSection()

void FileDefImpl::writeAuthorSection (OutputList & ol)

writeBriefDescription()

void FileDefImpl::writeBriefDescription (OutputList & ol)

Definition at line 232 of file filedef.cpp.

535{
537 {
538 auto parser { createDocParser() };
539 auto ast { validatingParseDoc(*parser.get(),
540 briefFile(),briefLine(),this,nullptr,
542 QCString(),TRUE,FALSE) };
543 if (!ast->isEmpty())
544 {
545 ol.startParagraph();
548 ol.writeString(" - ");
550 ol.writeDoc(ast.get(),this,nullptr);
553 ol.writeString(" \n");
555
556 if (Config_getBool(REPEAT_BRIEF) ||
557 !documentation().stripWhiteSpace().isEmpty()
558 )
559 {
561 ol.startTextLink(QCString(),"details");
562 ol.parseText(theTranslator->trMore());
563 ol.endTextLink();
564 }
566 ol.endParagraph();
567 }
568 }
569 ol.writeSynopsis();
570}

References DefinitionMixin< FileDef >::briefDescription, DefinitionMixin< FileDef >::briefFile, DefinitionMixin< FileDef >::briefLine, Config_getBool, createDocParser, OutputList::disable, OutputList::disableAllBut, DefinitionMixin< FileDef >::documentation, OutputList::enable, OutputList::endParagraph, OutputList::endTextLink, FALSE, DefinitionMixin< FileDef >::hasBriefDescription, Html, Man, OutputList::parseText, OutputList::popGeneratorState, OutputList::pushGeneratorState, RTF, OutputList::startParagraph, OutputList::startTextLink, stripWhiteSpace, theTranslator, TRUE, validatingParseDoc, OutputList::writeDoc, OutputList::writeString and OutputList::writeSynopsis.

Referenced by writeDocumentation.

writeClassDeclarations()

void FileDefImpl::writeClassDeclarations (OutputList & ol, const QCString & title, const ClassLinkedRefMap & list)

Definition at line 224 of file filedef.cpp.

707{
708 // write list of classes
709 list.writeDeclaration(ol,nullptr,title,FALSE);
710}

References FALSE, title and ClassLinkedRefMap::writeDeclaration.

Referenced by writeDocumentation.

writeClassesToTagFile()

void FileDefImpl::writeClassesToTagFile (TextStream & t, const ClassLinkedRefMap & list)

Definition at line 233 of file filedef.cpp.

573{
574 for (const auto &cd : list)
575 {
576 if (cd->isLinkableInProject())
577 {
578 tagFile << " <class kind=\"" << cd->compoundTypeString() <<
579 "\">" << convertToXML(cd->name()) << "</class>\n";
580 }
581 }
582}

Reference convertToXML.

Referenced by writeTagFile.

writeConcepts()

void FileDefImpl::writeConcepts (OutputList & ol, const QCString & title)

Definition at line 225 of file filedef.cpp.

713{
714 // write list of classes
715 m_concepts.writeDeclaration(ol,title,FALSE);
716}

References FALSE, m_concepts and title.

Referenced by writeDocumentation.

writeDetailedDescription()

void FileDefImpl::writeDetailedDescription (OutputList & ol, const QCString & title)

Definition at line 231 of file filedef.cpp.

473{
475 {
478 ol.writeRuler();
482 ol.writeAnchor(QCString(),"details");
484 ol.startGroupHeader("details");
485 ol.parseText(title);
486 ol.endGroupHeader();
487
488 ol.startTextBlock();
489 if (!briefDescription().isEmpty() && Config_getBool(REPEAT_BRIEF))
490 {
493 }
494 if (!briefDescription().isEmpty() && Config_getBool(REPEAT_BRIEF) &&
495 !documentation().isEmpty())
496 {
500 ol.enableAll();
503 ol.writeString("\n\n");
505 }
506 if (!documentation().isEmpty())
507 {
508 ol.generateDoc(docFile(),docLine(),this,nullptr,documentation()+"\n",TRUE,FALSE,
510 }
511 //printf("Writing source ref for file %s\n",qPrint(name()));
512 if (Config_getBool(SOURCE_BROWSER))
513 {
514 ol.startParagraph("definition");
515 QCString refText = theTranslator->trDefinedInSourceFile();
516 int fileMarkerPos = refText.find("@0");
517 if (fileMarkerPos!=-1) // should always pass this.
518 {
519 ol.parseText(refText.left(fileMarkerPos)); //text left from marker 1
521 ol.parseText(refText.right(
522 refText.length()-fileMarkerPos-2)); // text right from marker 2
523 }
524 else
525 {
526 err("translation error: invalid marker in trDefinedInSourceFile()\n");
527 }
528 ol.endParagraph();
529 }
530 ol.endTextBlock();
531 }
532}

References DefinitionMixin< FileDef >::briefDescription, DefinitionMixin< FileDef >::briefFile, DefinitionMixin< FileDef >::briefLine, Config_getBool, OutputList::disable, OutputList::disableAllBut, DefinitionMixin< FileDef >::docFile, DefinitionMixin< FileDef >::docLine, DefinitionMixin< FileDef >::documentation, OutputList::enable, OutputList::enableAll, OutputList::endGroupHeader, OutputList::endParagraph, OutputList::endTextBlock, err, FALSE, QCString::find, OutputList::generateDoc, getSourceFileBase, hasDetailedDescription, Html, Latex, QCString::left, QCString::length, Man, name, OutputList::parseText, OutputList::popGeneratorState, OutputList::pushGeneratorState, QCString::right, RTF, OutputList::startGroupHeader, OutputList::startParagraph, OutputList::startTextBlock, theTranslator, title, TRUE, OutputList::writeAnchor, OutputList::writeObjectLink, OutputList::writeRuler and OutputList::writeString.

Referenced by writeDocumentation.

writeIncludedByGraph()

void FileDefImpl::writeIncludedByGraph (OutputList & ol)

Definition at line 218 of file filedef.cpp.

659{
660 if (Config_getBool(HAVE_DOT) && m_hasIncludedByGraph /*&& Config_getBool(INCLUDED_BY_GRAPH)*/)
661 {
662 //printf("Graph for file %s\n",qPrint(name()));
663 DotInclDepGraph incDepGraph(this,TRUE);
664 if (incDepGraph.isTooBig())
665 {
666 warn_uncond("Included by graph for '{}' not generated, too many nodes ({}), threshold is {}. Consider increasing DOT_GRAPH_MAX_NODES.\n",
667 qPrint(name()), incDepGraph.numNodes(), Config_getInt(DOT_GRAPH_MAX_NODES));
668 }
669 else if (!incDepGraph.isTrivial())
670 {
671 ol.startTextBlock();
674 ol.parseText(theTranslator->trInclByDepGraph());
675 ol.endInclDepGraph(incDepGraph);
676 ol.enableAll();
678 }
679 //incDepGraph.writeGraph(Config_getString(HTML_OUTPUT),fd->getOutputFileBase());
680 }
681}

References Config_getBool, Config_getInt, OutputList::disable, OutputList::enableAll, OutputList::endInclDepGraph, OutputList::endTextBlock, DotInclDepGraph::isTooBig, DotInclDepGraph::isTrivial, m_hasIncludedByGraph, Man, name, DotInclDepGraph::numNodes, OutputList::parseText, qPrint, OutputList::startInclDepGraph, OutputList::startTextBlock, theTranslator, TRUE and warn_uncond.

Referenced by writeDocumentation.

writeIncludeFiles()

void FileDefImpl::writeIncludeFiles (OutputList & ol)

Definition at line 216 of file filedef.cpp.

585{
586 if (!m_includeList.empty())
587 {
589 for (const auto &ii : m_includeList)
590 {
591 const FileDef *fd=ii.fileDef;
592 ol.startTypewriter();
593 SrcLangExt lang = fd ? fd->getLanguage() : SrcLangExt::Cpp;
594 ol.docify(::includeStatement(lang,ii.kind));
595 ol.docify(::includeOpen(lang,ii.kind));
597 ol.docify(ii.includeName);
598 ol.enableAll();
600
601 // Here we use the include file name as it appears in the file.
602 // we could also we the name as it is used within doxygen,
603 // then we should have used fd->docName() instead of ii->includeName
604 if (fd && fd->isLinkable())
605 {
608 QCString(),ii.includeName);
609 }
610 else
611 {
613 if (ii.kind==IncludeKind::ImportModule && mod && mod->isLinkable())
614 {
616 QCString(),ii.includeName);
617 }
618 else
619 {
620 ol.docify(ii.includeName);
621 }
622 }
623
624 ol.enableAll();
625 ol.docify(::includeClose(lang,ii.kind));
626 ol.endTypewriter();
627 ol.lineBreak();
628 }
629 ol.endTextBlock();
630 }
631}

References OutputList::disable, OutputList::disableAllBut, OutputList::docify, OutputList::enableAll, OutputList::endTextBlock, OutputList::endTypewriter, FileDef::generateSourceFile, Definition::getLanguage, Definition::getOutputFileBase, ModuleManager::getPrimaryInterface, Definition::getReference, Html, ImportModule, includeClose, FileDef::includeName, includeOpen, includeStatement, ModuleManager::instance, Definition::isLinkable, OutputList::lineBreak, m_includeList, OutputList::startTextBlock, OutputList::startTypewriter, TRUE and OutputList::writeObjectLink.

Referenced by writeDocumentation.

writeIncludeGraph()

void FileDefImpl::writeIncludeGraph (OutputList & ol)

Definition at line 217 of file filedef.cpp.

634{
635 if (Config_getBool(HAVE_DOT) && m_hasIncludeGraph /*&& Config_getBool(INCLUDE_GRAPH)*/)
636 {
637 //printf("Graph for file %s\n",qPrint(name()));
638 DotInclDepGraph incDepGraph(this,FALSE);
639 if (incDepGraph.isTooBig())
640 {
641 warn_uncond("Include graph for '{}' not generated, too many nodes ({}), threshold is {}. Consider increasing DOT_GRAPH_MAX_NODES.\n",
642 qPrint(name()), incDepGraph.numNodes(), Config_getInt(DOT_GRAPH_MAX_NODES));
643 }
644 else if (!incDepGraph.isTrivial())
645 {
646 ol.startTextBlock();
649 ol.parseText(theTranslator->trInclDepGraph(name()));
650 ol.endInclDepGraph(incDepGraph);
651 ol.enableAll();
653 }
654 //incDepGraph.writeGraph(Config_getString(HTML_OUTPUT),fd->getOutputFileBase());
655 }
656}

References Config_getBool, Config_getInt, OutputList::disable, OutputList::enableAll, OutputList::endInclDepGraph, OutputList::endTextBlock, FALSE, DotInclDepGraph::isTooBig, DotInclDepGraph::isTrivial, m_hasIncludeGraph, Man, name, DotInclDepGraph::numNodes, OutputList::parseText, qPrint, OutputList::startInclDepGraph, OutputList::startTextBlock, theTranslator, TRUE and warn_uncond.

Referenced by writeDocumentation.

writeInlineClasses()

void FileDefImpl::writeInlineClasses (OutputList & ol)

Definition at line 226 of file filedef.cpp.

719{
720 // temporarily undo the disabling could be done by startMemberDocumentation()
721 // as a result of setting SEPARATE_MEMBER_PAGES to YES; see bug730512
722 bool isEnabled = ol.isEnabled(OutputType::Html);
724
725 m_classes.writeDocumentation(ol,this);
726
727 // restore the initial state if needed
728 if (!isEnabled) ol.disable(OutputType::Html);
729}

References OutputList::disable, OutputList::enable, Html, OutputList::isEnabled and m_classes.

Referenced by writeDocumentation.

writeMemberDeclarations()

void FileDefImpl::writeMemberDeclarations (OutputList & ol, MemberListType lt, const QCString & title)

Definition at line 214 of file filedef.cpp.

1799{
1800 bool optVhdl = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
1801 MemberList * ml = getMemberList(lt);
1802 if (ml)
1803 {
1804 if (optVhdl) // use specific declarations function
1805 {
1806
1807 VhdlDocGen::writeVhdlDeclarations(ml,ol,nullptr,nullptr,this,nullptr,nullptr);
1808 }
1809 else
1810 {
1811 ml->writeDeclarations(ol,nullptr,nullptr,this,nullptr,nullptr,title,QCString());
1812 }
1813 }
1814}

References Config_getBool, getMemberList, title, MemberList::writeDeclarations and VhdlDocGen::writeVhdlDeclarations.

Referenced by writeDocumentation.

writeMemberDocumentation()

void FileDefImpl::writeMemberDocumentation (OutputList & ol, MemberListType lt, const QCString & title)

writeMemberGroups()

void FileDefImpl::writeMemberGroups (OutputList & ol)

Definition at line 219 of file filedef.cpp.

760{
761 /* write user defined member groups */
762 for (const auto &mg : m_memberGroups)
763 {
764 if (!mg->allMembersInSameSection() || !m_subGrouping)
765 {
766 mg->writeDeclarations(ol,nullptr,nullptr,this,nullptr,nullptr);
767 }
768 }
769}

References m_memberGroups and m_subGrouping.

Referenced by writeDocumentation.

writeNamespaceDeclarations()

void FileDefImpl::writeNamespaceDeclarations (OutputList & ol, const QCString & title, bool isConstantGroup)

Definition at line 222 of file filedef.cpp.

700 bool const isConstantGroup)
701{
702 // write list of namespaces
703 m_namespaces.writeDeclaration(ol,title,isConstantGroup);
704}

References m_namespaces and title.

Referenced by writeDocumentation.

writeSourceLink()

void FileDefImpl::writeSourceLink (OutputList & ol)

Definition at line 221 of file filedef.cpp.

685{
686 //printf("%s: generateSourceFile()=%d\n",qPrint(name()),generateSourceFile());
688 {
690 ol.startParagraph();
692 ol.parseText(theTranslator->trGotoSourceCode());
693 ol.endTextLink();
694 ol.endParagraph();
695 ol.enableAll();
696 }
697}

References OutputList::disableAllBut, OutputList::enableAll, OutputList::endParagraph, OutputList::endTextLink, generateSourceFile, Html, includeName, OutputList::parseText, OutputList::startParagraph, OutputList::startTextLink and theTranslator.

Referenced by writeDocumentation.

Private Member Attributes

m_classes

ClassLinkedRefMap FileDefImpl::m_classes

m_concepts

ConceptLinkedRefMap FileDefImpl::m_concepts

m_dir

DirDef* FileDefImpl::m_dir = nullptr

Definition at line 253 of file filedef.cpp.

253 DirDef *m_dir = nullptr;

Referenced by FileDefImpl, getDirDef and setDirDef.

m_docname

QCString FileDefImpl::m_docname

Definition at line 248 of file filedef.cpp.

Referenced by docName, FileDefImpl, writeDocumentation and writeSourceHeader.

m_exceptions

ClassLinkedRefMap FileDefImpl::m_exceptions

m_fileName

QCString FileDefImpl::m_fileName

Definition at line 247 of file filedef.cpp.

Referenced by FileDefImpl, fileName and name.

m_filePath

QCString FileDefImpl::m_filePath

Definition at line 243 of file filedef.cpp.

Referenced by absFilePath, acquireFileVersion, FileDefImpl and getSourceFileBase.

m_fileVersion

QCString FileDefImpl::m_fileVersion

m_hasIncludedByGraph

bool FileDefImpl::m_hasIncludedByGraph = Config_getBool(INCLUDED_BY_GRAPH)

Definition at line 265 of file filedef.cpp.

265 bool m_hasIncludedByGraph = Config_getBool(INCLUDED_BY_GRAPH);

Referenced by hasIncludedByGraph, overrideIncludedByGraph and writeIncludedByGraph.

m_hasIncludeGraph

bool FileDefImpl::m_hasIncludeGraph = Config_getBool(INCLUDE_GRAPH)

Definition at line 264 of file filedef.cpp.

264 bool m_hasIncludeGraph = Config_getBool(INCLUDE_GRAPH);

Referenced by hasIncludeGraph, overrideIncludeGraph and writeIncludeGraph.

m_inclByDepFileName

QCString FileDefImpl::m_inclByDepFileName

m_inclDepFileName

QCString FileDefImpl::m_inclDepFileName

Definition at line 244 of file filedef.cpp.

Referenced by includeDependencyGraphFileName and setDiskNameLocal.

m_includedByList

IncludeInfoList FileDefImpl::m_includedByList

m_includedByMap

IncludeInfoMap FileDefImpl::m_includedByMap

Definition at line 238 of file filedef.cpp.

Referenced by addIncludedByDependency and generateSourceFile.

m_includeList

IncludeInfoList FileDefImpl::m_includeList

m_includeMap

IncludeInfoMap FileDefImpl::m_includeMap

Definition at line 236 of file filedef.cpp.

Referenced by addIncludeDependency and isIncluded.

m_interfaces

ClassLinkedRefMap FileDefImpl::m_interfaces

m_isSource

bool FileDefImpl::m_isSource

Definition at line 251 of file filedef.cpp.

Referenced by FileDefImpl and isSource.

m_memberGroups

m_memberLists

m_moduleDef

ModuleDef* FileDefImpl::m_moduleDef = nullptr

Definition at line 254 of file filedef.cpp.

Referenced by getModuleDef and setModuleDef.

m_namespaces

NamespaceLinkedRefMap FileDefImpl::m_namespaces

m_outputDiskName

QCString FileDefImpl::m_outputDiskName

Definition at line 246 of file filedef.cpp.

Referenced by getOutputFileBase, getSourceFileBase and setDiskNameLocal.

m_path

QCString FileDefImpl::m_path

Definition at line 242 of file filedef.cpp.

Referenced by FileDefImpl and getPath.

m_srcDefMap

DefinitionLineMap FileDefImpl::m_srcDefMap

Definition at line 249 of file filedef.cpp.

Referenced by addSourceRef and getSourceDefinition.

m_srcMemberMap

MemberDefLineMap FileDefImpl::m_srcMemberMap

Definition at line 250 of file filedef.cpp.

Referenced by addSourceRef and getSourceMember.

m_structs

ClassLinkedRefMap FileDefImpl::m_structs

m_subGrouping

bool FileDefImpl::m_subGrouping

Definition at line 263 of file filedef.cpp.

Referenced by addMembersToMemberGroup, FileDefImpl, subGrouping and writeMemberGroups.

m_usingDeclList

LinkedRefMap<const Definition> FileDefImpl::m_usingDeclList

m_usingDirList

LinkedRefMap<NamespaceDef> FileDefImpl::m_usingDirList

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


Generated via doxygen2docusaurus by Doxygen 1.14.0.