浏览该文件的文档.
148 bool isConstantGroup);
211 const QCString &,
int,
bool)
override {}
284 mg->distributeMemberGroupDocumentation();
294 mg->findSectionsInDocumentation(
this);
301 ml->findSectionsInDocumentation(
this);
318 tagFile <<
" <compound kind=\"file\">\n";
327 bool isIDLorJava =
FALSE;
330 const char *locStr = (ii.local || isIDLorJava) ?
"yes" :
"no";
331 const char *impStr = (ii.imported || isIDLorJava) ?
"yes" :
"no";
332 tagFile <<
" <includes id=\""
335 <<
"local=\"" << locStr <<
"\" "
336 <<
"imported=\"" << impStr <<
"\">"
369 if (nd->isLinkableInProject())
371 tagFile <<
" <concept>" <<
convertToXML(nd->name()) <<
"</concept>\n";
380 if (nd->isLinkableInProject())
382 tagFile <<
" <namespace>" <<
convertToXML(nd->name()) <<
"</namespace>\n";
401 mg->writeTagFile(tagFile);
411 tagFile <<
" </compound>\n";
459 int fileMarkerPos = refText.
find(
"@0");
460 if (fileMarkerPos!=-1)
465 refText.
length()-fileMarkerPos-2));
469 err(
"translation error: invalid marker in trDefinedInSourceFile()\n");
487 if (rootNode && !rootNode->isEmpty())
518 for (
const auto &cd : list)
520 if (cd->isLinkableInProject())
522 tagFile <<
" <class kind=\"" << cd->compoundTypeString() <<
536 bool isIDLorJava =
FALSE;
547 else if (ii.imported)
555 if (ii.local || isIDLorJava)
560 ol.
docify(ii.includeName);
575 ol.
docify(ii.includeName);
579 if (ii.local || isIDLorJava)
600 warn_uncond(
"Include graph for '%s' not generated, too many nodes (%d), threshold is %d. Consider increasing DOT_GRAPH_MAX_NODES.\n",
625 warn_uncond(
"Included by graph for '%s' not generated, too many nodes (%d), threshold is %d. Consider increasing DOT_GRAPH_MAX_NODES.\n",
659 bool const isConstantGroup)
724 && mg->header()!=
"[NOHEADER]")
726 mg->writeDeclarations(ol,0,0,
this,0);
838 if (!generateTreeView)
858 if (!generateTreeView)
1010 err(
"Internal inconsistency: member %d should not be part of "
1011 "LayoutDocManager::File entry list\n",lde->kind());
1039 ml->writeDocumentationPage(ol,
name(),
this);
1056 for (
const auto &md : *allMemberList)
1058 if (md->getFileDef()==
this && md->getNamespaceDef()==0 && md->isLinkable() && !md->isEnumValue())
1060 if (md->isLinkableInProject())
1106 if (!generateTreeView)
1151 intf->resetCodeParserState();
1153 bool needs2PassParsing =
1155 !filterSourceFiles &&
1158 if (needs2PassParsing)
1161 intf->parseCode(devNullIntf,
QCString(),
1194 static bool filterSourceFiles =
Config_getBool(FILTER_SOURCE_FILES);
1207 intf->resetCodeParserState();
1233 mg->addToDeclarationSection();
1245 if (allMemberList && allMemberList->
contains(md))
1250 if (allMemberList==0)
1291 err(
"FileDefImpl::insertMembers(): "
1292 "member '%s' with class scope '%s' inserted in file scope '%s'!\n",
1404 if (visitedFiles.find(
this)!=visitedFiles.end())
return;
1405 visitedFiles.insert(
this);
1424 const auto &ii = *ii_it;
1425 if (ii.fileDef && ii.fileDef!=
this)
1428 auto unl = ii.fileDef->getUsedNamespaces();
1429 for (
auto it = unl.rbegin(); it!=unl.rend(); ++it)
1431 const auto *nd = *it;
1435 auto udl = ii.fileDef->getUsedClasses();
1436 for (
auto it = udl.rbegin(); it!=udl.rend(); ++it)
1438 const auto *cd = *it;
1450 bool local,
bool imported)
1493 mg->addListReferences(
this);
1499 ml->addListReferences(
this);
1510 for (
auto &nd : usingDirList)
1519 for (
auto &nd : usingDirList)
1522 for (
const auto &und : nd->getUsedNamespaces())
1527 for (
const auto &ucd : nd->getUsedClasses())
1556 err(
"could not execute %s\n",
qPrint(vercmd));
1559 const int bufSize=1024;
1561 int numRead = (int)fread(buf,1,bufSize-1,f);
1563 if (numRead>0 && numRead<bufSize)
1573 msg(
"no version available\n");
1606 ml->setNeedsSorting(
1624 if (ml->needsSorting()) { ml->sort(); ml->setNeedsSorting(
FALSE); }
1634 [](
const auto &fi1,
const auto &fi2) { return fi1.includeName < fi2.includeName; });
1663 if (ml->listType()==lt)
1706 if (ii.fileDef && !ii.fileDef->isReference() &&
1707 filesVisited.find(ii.fileDef->absFilePath().str())==filesVisited.end())
1710 incFiles.push_back(ii.fileDef->absFilePath().str());
1711 filesVisited.insert(ii.fileDef->absFilePath().str());
1747 ml->countDecMembers();
1748 ml->countDocMembers();
1752 mg->countDecMembers();
1753 mg->countDocMembers();
1783 return static_cast<FileDef*
>(d);
1796 return static_cast<const FileDef*
>(d);
virtual void writeMemberPages(OutputList &ol)
virtual QCString briefFile() const
bool add(const char *k, T *obj)
Adds an object reference to the ordered vector if it was not added already.
std::vector< std::string > StringVector
NamespaceLinkedRefMap m_namespaces
void disableAllBut(OutputGenerator::OutputType o)
virtual bool isReference() const
std::set< const FileDef * > FileDefSet
MemberLists m_memberLists
void startTitle(OutputList &ol, const QCString &fileName, const DefinitionMutable *def)
MemberDefLineMap m_srcMemberMap
DefinitionLineMap m_srcDefMap
LinkedRefMap< const ClassDef > m_usingDeclList
virtual void writeSourceBody(OutputList &ol, ClangTUParser *clangParser)
void endGroupHeader(int extraLevels=0)
virtual QCString trDefinedInSourceFile()=0
int numDecMembers() const
Represents of a member declaration list with configurable title and subtitle.
@ NamespaceNestedNamespaces
virtual DefType definitionType() const
FILE * popen(const QCString &name, const QCString &type)
@ MemberListType_docDictionaryMembers
void writeDeclaration(OutputList &ol, const QCString &header, bool localNames) const
virtual void addIncludedByDependency(const FileDef *fd, const QCString &incName, bool local, bool imported)
void endTitle(OutputList &ol, const QCString &fileName, const QCString &name)
MemberDefMutable * toMemberDefMutable(Definition *d)
void switchToFile(const FileDef *fd)
Switches to another file within the translation unit started with start().
virtual bool generateSourceFile() const =0
virtual LinkedRefMap< const NamespaceDef > getUsedNamespaces() const
virtual void writeLineNumber(const QCString &, const QCString &, const QCString &, int, bool) override
virtual void writeDocumentation(OutputList &ol)
void writeMemberGroups(OutputList &ol)
The common base class of all entity definitions found in the sources.
@ MemberListType_docEnumMembers
virtual const RefItemVector & xrefListItems() const
MemberGroupList m_memberGroups
An abstract interface of a namespace symbol.
virtual QCString fileName() const
void writeDeclaration(OutputList &ol, const ClassDef::CompoundType *filter, const QCString &header, bool localNames) const
virtual QCString fileVersion() const
void docify(const QCString &s)
virtual void writeDocAnchorsToTagFile(TextStream &fs) const
void writeIncludedByGraph(OutputList &ol)
virtual void addUsingDeclaration(const ClassDef *cd)
uint length() const
Returns the length of the string, not counting the 0-terminator.
virtual void codify(const QCString &) override
virtual DirDef * getDirDef() const
virtual int numDocMembers() const
ConceptLinkedRefMap m_concepts
virtual QCString includedByDependencyGraphFileName() const
void writeIncludeFiles(OutputList &ol)
const std::unique_ptr< MemberList > & get(MemberListType lt, MemberListContainer con)
A model of a directory symbol.
virtual void addListReferences()
virtual QCString docFile() const
void writeNamespaceDeclarations(OutputList &ol, const QCString &title, bool isConstantGroup)
LinkedRefMap< const NamespaceDef > m_usingDirList
virtual void addIncludedUsingDirectives(FileDefSet &visitedFiles)
bool isEmpty() const
Returns TRUE iff the string is empty
virtual void addIncludeDependency(const FileDef *fd, const QCString &incName, bool local, bool imported)
@ MemberListType_allMembersList
virtual void startFontClass(const QCString &) override
virtual const MemberGroupList & getMemberGroups() const
void startMemberSections()
void writeString(const QCString &text)
QCString title(SrcLangExt lang) const
static void writeVhdlDeclarations(const MemberList *, OutputList &, const GroupDef *, const ClassDef *, const FileDef *, const NamespaceDef *)
virtual void writeSourceFooter(OutputList &ol)
void push_back(const MemberDef *md)
virtual void endFontClass() override
SrcLangExt
Language as given by extension
@ MemberListType_docSequenceMembers
void writeDocumentation(OutputList &ol, const Definition *container=0) const
ClassLinkedRefMap m_exceptions
FileDefImpl(const QCString &p, const QCString &n, const QCString &ref=QCString(), const QCString &dn=QCString())
virtual bool isHidden() const =0
@ MemberListType_docDefineMembers
virtual void endCodeFragment(const QCString &) override
virtual SrcLangExt getLanguage() const
virtual void setSectionList(const Definition *container, const MemberList *sl)=0
virtual void getAllIncludeFilesRecursively(StringVector &incFiles) const
virtual void computeAnchors()
@ MemberListType_decDictionaryMembers
std::unordered_map< int, const Definition * > DefinitionLineMap
static bool parseSourcesNeeded
void err(const char *fmt,...)
virtual bool isLinkable() const =0
Text streaming class that buffers data.
virtual QCString name() const
int find(char c, int index=0, bool cs=TRUE) const
void writeClassesToTagFile(TextStream &t, const ClassLinkedRefMap &list)
void writeAuthorSection(OutputList &ol)
virtual void addMembersToMemberGroup()
virtual int briefLine() const
void endFileWithNavPath(const Definition *d, OutputList &ol)
bool prepend(const char *k, T *obj)
Prepends an object reference to the ordered vector if it was not added already.
virtual void parseSource(ClangTUParser *clangParser)
virtual bool isSource() const
virtual bool hasBriefDescription() const
void writeDoc(DocRoot *root, const Definition *ctx, const MemberDef *md, int id=0)
std::unordered_map< int, const MemberDef * > MemberDefLineMap
virtual const NamespaceLinkedRefMap & getNamespaces() const
virtual void writeNavigationPath(OutputList &ol) const =0
virtual SrcLangExt getLanguage() const =0
Returns the programming language this definition was written in.
virtual QCString getSourceFileBase() const
virtual void writeCodeAnchor(const QCString &) override
@ NamespaceNestedConstantGroups
QCString m_inclByDepFileName
QCString m_inclDepFileName
void writeSummaryLink(const QCString &file, const QCString &anchor, const QCString &title, bool first)
void endTextBlock(bool paraBreak=FALSE)
virtual const IncludeInfoList & includedByFileList() const
@ MemberListType_declarationLists
std::unordered_set< std::string > StringUnorderedSet
@ MemberListType_decSequenceMembers
virtual QCString trSourceFile(QCString &filename)=0
void addMemberToList(MemberListType lt, MemberDef *md)
@ ClassCollaborationGraph
QCString title(SrcLangExt lang) const
NamespaceDefMutable * toNamespaceDefMutable(Definition *d)
virtual QCString includeName() const =0
virtual void endCodeLine() override
virtual void combineUsingRelations(NamespaceDefSet &visitedNamespace)=0
static QCString listTypeAsString(MemberListType type)
Class representing a list of output generators that are written to in parallel.
virtual QCString qualifiedName() const =0
virtual void writeTagFile(TextStream &t)
Represents of a member definition list with configurable title.
QCString addHtmlExtensionIfMissing(const QCString &fName)
A model of a class/file/namespace member symbol.
void writeTagFile(TextStream &)
virtual void insertClass(const ClassDef *cd)
void warn_uncond(const char *fmt,...)
virtual QCString briefDescription(bool abbreviate=FALSE) const
FileDef * createFileDef(const QCString &p, const QCString &n, const QCString &ref, const QCString &dn)
virtual QCString name() const
A abstract class representing of a compound symbol.
@ MemberListType_decVarMembers
static bool clangAssistedParsing
QCString stripWhiteSpace() const
returns a copy of this string with leading and trailing whitespace removed
#define Config_getInt(name)
void startTextBlock(bool dense=FALSE)
void disable(OutputGenerator::OutputType o)
void writeConcepts(OutputList &ol, const QCString &title)
QCString left(size_t len) const
virtual QCString name() const =0
MemberListType listType() const
virtual void writeCodeLink(CodeSymbolType, const QCString &, const QCString &, const QCString &, const QCString &, const QCString &) override
virtual void writeSummaryLinks(OutputList &ol) const
static ParserManager * parserManager
QCString m_outputDiskName
void writeAnchor(const QCString &fileName, const QCString &name)
virtual QCString getVersion() const
void startMemberDeclarations(OutputList &ol)
virtual const MemberLists & getMemberLists() const
virtual void startCodeLine(bool) override
virtual QCString trMore()=0
virtual int getStartBodyLine() const
virtual void combineUsingRelations()
static void print(DebugMask mask, int prio, const char *fmt,...)
virtual void insertMember(MemberDef *md)
virtual QCString anchor() const
virtual void writeSourceHeader(OutputList &ol)
int numDocMembers() const
void writeSources(CodeOutputInterface &ol, const FileDef *fd)
writes the syntax highlighted source code for a file
void endInclDepGraph(DotInclDepGraph &g)
IncludeInfoList m_includedByList
int qstricmp(const char *str1, const char *str2)
void lineBreak(const QCString &style=QCString())
Translator * theTranslator
virtual bool isReference() const =0
virtual QCString name() const =0
virtual void startCodeFragment(const QCString &) override
virtual bool isLinkableViaGroup() const
void endMemberDocumentation(OutputList &ol)
void writeClassDeclarations(OutputList &ol, const QCString &title, const ClassLinkedRefMap &list)
virtual void countMembers()
virtual const ClassDef * getClassDef() const =0
virtual void setCurrentDoc(const Definition *, const QCString &, bool) override
virtual QCString trGeneratedAutomatically(const QCString &s)=0
virtual QCString absFilePath() const
DocRoot * validatingParseDoc(IDocParser &parserIntf, const QCString &fileName, int startLine, const Definition *ctx, const MemberDef *md, const QCString &input, bool indexWords, bool isExample, const QCString &exampleName, bool singleLine, bool linkFromIndex, bool markdownSupport)
IncludeInfoMap m_includedByMap
@ MemberListType_docFuncMembers
virtual bool generateSourceFile() const
virtual void setPackageDef(PackageDef *pd)
void startMemberDocumentation(OutputList &ol)
void startFile(OutputList &ol, const QCString &name, const QCString &manName, const QCString &title, HighlightedItem hli, bool additionalIndices, const QCString &altSidebarName)
virtual void addUsingDirective(const NamespaceDef *nd)
QCString fileToString(const QCString &name, bool filter, bool isSourceCode)
IncludeInfoList m_includeList
std::unique_ptr< CodeParserInterface > getCodeParser(const QCString &extension)
Gets the interface to the parser associated with a given extension.
SrcLangExt getLanguageFromFileName(const QCString &fileName, SrcLangExt defLang)
void startProjectNumber()
virtual bool isDocumentationFile() const
bool needsSorting() const
void endMemberDeclarations(OutputList &ol)
void writeDeclarations(OutputList &ol, const ClassDef *cd, const NamespaceDef *nd, const FileDef *fd, const GroupDef *gd, const QCString &title, const QCString &subtitle, bool showEnumValues=FALSE, bool showInline=FALSE, const ClassDef *inheritedFrom=0, MemberListType lt=MemberListType_pubMethods) const
Writes the list of members to the output.
std::unordered_map< std::string, const IncludeInfo * > IncludeInfoMap
void writeMemberDocumentation(OutputList &ol, MemberListType lt, const QCString &title)
virtual PackageDef * packageDef() const
bool isEnabled(OutputGenerator::OutputType o)
@ MemberListType_decEnumMembers
virtual void addWord(const QCString &, bool) override
void addRefItem(const RefItemVector &sli, const QCString &key, const QCString &prefix, const QCString &name, const QCString &title, const QCString &args, const Definition *scope)
virtual int docLine() const
void writeMemberDeclarations(OutputList &ol, MemberListType lt, const QCString &title)
void startGroupHeader(int extraLevels=0)
@ MemberListType_decDefineMembers
void startTextLink(const QCString &file, const QCString &anchor)
virtual int numDecMembers() const
virtual CompoundType compoundType() const =0
Returns the type of compound this is, i.e.
void docFindSections(const QCString &input, const Definition *d, const QCString &fileName)
virtual bool subGrouping() const
void writeDetailedDescription(OutputList &ol, const QCString &title)
virtual CodeSymbolType codeSymbolType() const
@ MemberListType_decFuncMembers
void startCodeFragment(const QCString &style)
virtual void writeQuickMemberLinks(OutputList &ol, const MemberDef *currentMd) const
virtual QCString getReference() const =0
virtual void sortMemberLists()
virtual QCString documentation() const
static void getAllIncludeFilesRecursively(StringUnorderedSet &filesVisited, const FileDef *fd, StringVector &incFiles)
virtual void insertNamespace(const NamespaceDef *nd)
bool compareFileDefs(const FileDef *fd1, const FileDef *fd2)
ClassLinkedRefMap m_classes
void writeIncludeGraph(OutputList &ol)
std::vector< RefItem * > RefItemVector
virtual const Definition * getSourceDefinition(int lineNr) const
void writeBriefDescription(OutputList &ol)
void writeSourceLink(OutputList &ol)
#define Config_getBool(name)
virtual QCString trFile(bool first_capital, bool singular)=0
void writeDocumentation(OutputList &ol, const QCString &scopeName, const Definition *container, const QCString &title, bool showEnumValues=FALSE, bool showInline=FALSE) const
IncludeInfoMap m_includeMap
virtual const ClassLinkedRefMap & getClasses() const
void msg(const char *fmt,...)
@ MemberListType_documentationLists
Output interface for code parser.
@ MemberListType_docVarMembers
static LayoutDocManager & instance()
Returns a reference to this singleton.
virtual void setDiskName(const QCString &name)
virtual bool hasDocumentation() const
virtual const FileDef * getBodyDef() const
virtual QCString displayName(bool=TRUE) const
virtual QCString includeDependencyGraphFileName() const
@ MemberListType_decTypedefMembers
virtual const IncludeInfoList & includeFileList() const
void parseText(const QCString &textStr)
virtual QCString absFilePath() const =0
bool declVisible(bool isContantGroup) const
const char * qPrint(const char *s)
#define Config_getString(name)
virtual LinkedRefMap< const ClassDef > getUsedClasses() const
void generateDoc(const QCString &fileName, int startLine, const Definition *ctx, const MemberDef *md, const QCString &docStr, bool indexWords, bool isExample, const QCString &exampleName, bool singleLine, bool linkFromIndex, bool markdownSupport)
void addGroupListToTitle(OutputList &ol, const Definition *d)
bool contains(const MemberDef *md)
virtual QCString getPath() const
QCString convertNameToFile(const QCString &name, bool allowDots, bool allowUnderscore)
virtual bool hasDetailedDescription() const
virtual void distributeMemberGroupDocumentation()
bool declVisible(const ClassDef::CompoundType *filter=0) const
void pushGeneratorState()
QCString getFileNameExtension(const QCString &fn)
virtual QCString trInclByDepGraph()=0
Clang parser object for a single translation unit, which consists of a source file and the directly o...
QCString convertToXML(const QCString &s, bool keepEntities)
void setNeedsSorting(bool b)
A model of a file symbol.
virtual bool isLinkableInProject() const
virtual QCString trInclDepGraph(const QCString &fName)=0
virtual void setReference(const QCString &r)
FileDef * toFileDef(Definition *d)
Representation of an include dependency graph
virtual bool isIncluded(const QCString &name) const
virtual QCString includeName() const
virtual void findSectionsInDocumentation()
virtual const QCString & docName() const
static QCString stripFromPath(const QCString &path, const StringVector &l)
void acquireFileVersion()
virtual QCString trGotoDocumentation()=0
static bool suppressDocWarnings
void writeObjectLink(const QCString &ref, const QCString &file, const QCString &anchor, const QCString &name)
virtual QCString getOutputFileBase() const
ClassLinkedRefMap m_structs
Class implementing CodeOutputInterface by throwing away everything.
virtual const MemberDef * getSourceMember(int lineNr) const
Portable versions of functions that are platform dependent.
virtual void setDirDef(DirDef *dd)
virtual const ConceptLinkedRefMap & getConcepts() const
virtual QCString getDefFileExtension() const
virtual bool isLinkable() const
ClassLinkedRefMap m_interfaces
void writeInlineClasses(OutputList &ol)
virtual QCString getOutputFileBase() const =0
int guessSection(const QCString &name)
A bunch of utility functions.
void createSubDirs(const Dir &d)
QCString getFileFilter(const QCString &name, bool isSourceCode)
virtual void addSourceRef(int line, const Definition *d, const MemberDef *md)
virtual QCString trFileReference(const QCString &fileName)=0
virtual QCString trGotoSourceCode()=0
void enable(OutputGenerator::OutputType o)
void writeDeclaration(OutputList &ol, const QCString &title, bool isConstantGroup=false, bool localName=FALSE)
std::set< const NamespaceDef * > NamespaceDefSet
virtual void setLanguage(SrcLangExt lang)
A list of MemberDef objects as shown in documentation sections.
virtual QCString title() const
QCString right(size_t len) const
virtual QCString className() const =0
Returns the name of the class including outer classes, but not including namespaces.
virtual void insertConcept(const ConceptDef *cd)
void endCodeFragment(const QCString &style)
QCString & prepend(const char *s)
@ MemberListType_docTypedefMembers
virtual MemberList * getMemberList(MemberListType lt) const
virtual MemberType memberType() const =0
QCString convertToHtml(const QCString &s, bool keepEntities)
virtual void writeTooltip(const QCString &, const DocLinkInfo &, const QCString &, const QCString &, const SourceLinkInfo &, const SourceLinkInfo &) override
void startParagraph(const QCString &classDef=QCString())
QCString title(SrcLangExt lang) const
std::unique_ptr< IDocParser > createDocParser()
virtual const IncludeInfoList & includeFileList() const =0
virtual QCString trAuthor(bool first_capital, bool singular)=0
This is an alternative implementation of QCString.