My Project
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Public Attributes | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
FileDef Class Reference

#include <filedef.h>

Inheritance diagram for FileDef:
Definition DefinitionIntf

Public Member Functions

 FileDef (const char *p, const char *n, const char *ref=0, const char *dn=0)
 
 ~FileDef ()
 
DefType definitionType () const
 
QCString name () const
 
QCString displayName (bool=TRUE) const
 
QCString fileName () const
 
QCString getOutputFileBase () const
 
QCString anchor () const
 
QCString getSourceFileBase () const
 
QCString includeName () const
 
QCString includeDependencyGraphFileName () const
 
QCString includedByDependencyGraphFileName () const
 
QCString absFilePath () const
 
const QCString & docName () const
 
bool isSource () const
 
bool isDocumentationFile () const
 
DefinitiongetSourceDefinition (int lineNr) const
 
MemberDefgetSourceMember (int lineNr) const
 
QCString getPath () const
 
QCString getVersion () const
 
bool isLinkableInProject () const
 
bool isLinkable () const
 
bool isIncluded (const QCString &name) const
 
PackageDef * packageDef () const
 
DirDefgetDirDef () const
 
NamespaceSDictgetUsedNamespaces () const
 
SDict< Definition > * getUsedClasses () const
 
QList< IncludeInfo > * includeFileList () const
 
QList< IncludeInfo > * includedByFileList () const
 
void getAllIncludeFilesRecursively (QStrList &incFiles) const
 
MemberListgetMemberList (MemberListType lt) const
 
const QList< MemberList > & getMemberLists () const
 
MemberGroupSDictgetMemberGroupSDict () const
 
NamespaceSDictgetNamespaceSDict () const
 
ClassSDictgetClassSDict () const
 
QCString title () const
 
bool hasDetailedDescription () const
 
QCString fileVersion () const
 
bool subGrouping () const
 
void addSourceRef (int line, Definition *d, MemberDef *md)
 
void writeDocumentation (OutputList &ol)
 
void writeMemberPages (OutputList &ol)
 
void writeQuickMemberLinks (OutputList &ol, MemberDef *currentMd) const
 
void writeSummaryLinks (OutputList &ol)
 
void writeTagFile (FTextStream &t)
 
void startParsing ()
 
void writeSource (OutputList &ol, bool sameTu, QStrList &filesInSameTu)
 
void parseSource (bool sameTu, QStrList &filesInSameTu)
 
void finishParsing ()
 
void setDiskName (const QCString &name)
 
void insertMember (MemberDef *md)
 
void insertClass (ClassDef *cd)
 
void insertNamespace (NamespaceDef *nd)
 
void computeAnchors ()
 
void setPackageDef (PackageDef *pd)
 
void setDirDef (DirDef *dd)
 
void addUsingDirective (NamespaceDef *nd)
 
void addUsingDeclaration (Definition *def)
 
void combineUsingRelations ()
 
bool generateSourceFile () const
 
void sortMemberLists ()
 
void addIncludeDependency (FileDef *fd, const char *incName, bool local, bool imported, bool indirect)
 
void addIncludedByDependency (FileDef *fd, const char *incName, bool local, bool imported)
 
void addMembersToMemberGroup ()
 
void distributeMemberGroupDocumentation ()
 
void findSectionsInDocumentation ()
 
void addIncludedUsingDirectives ()
 
void addListReferences ()
 
- Public Member Functions inherited from Definition
 Definition (const char *defFileName, int defLine, int defColumn, const char *name, const char *b=0, const char *d=0, bool isSymbol=TRUE)
 
virtual ~Definition ()
 
const QCString & name () const
 
QCString localName () const
 
virtual QCString qualifiedName () const
 
QCString symbolName () const
 
virtual QCString getSourceAnchor () const
 
virtual QCString documentation () const
 
int docLine () const
 
QCString docFile () const
 
virtual QCString briefDescription (bool abbreviate=FALSE) const
 
QCString briefDescriptionAsTooltip () const
 
int briefLine () const
 
QCString inbodyDocumentation () const
 
QCString inbodyFile () const
 
int inbodyLine () const
 
QCString briefFile () const
 
QCString getDefFileName () const
 
QCString getDefFileExtension () const
 
int getDefLine () const
 
int getDefColumn () const
 
virtual bool hasDocumentation () const
 
virtual bool hasUserDocumentation () const
 
virtual bool isVisibleInProject () const
 
virtual bool isVisible () const
 
bool isHidden () const
 
bool isArtificial () const
 
virtual QCString getReference () const
 
virtual bool isReference () const
 
QCString externalReference (const QCString &relPath) const
 
int getStartBodyLine () const
 
int getEndBodyLine () const
 
FileDefgetBodyDef () const
 
SrcLangExt getLanguage () const
 
GroupListpartOfGroups () const
 
bool isLinkableViaGroup () const
 
QList< ListItemInfo > * xrefListItems () const
 
virtual DefinitionfindInnerCompound (const char *name)
 
virtual DefinitiongetOuterScope () const
 
MemberSDictgetReferencesMembers () const
 
MemberSDictgetReferencedByMembers () const
 
bool hasSections () const
 
bool hasSources () const
 
bool hasBriefDescription () const
 
QCString id () const
 
virtual void setName (const char *name)
 
void setId (const char *name)
 
virtual void setDocumentation (const char *d, const char *docFile, int docLine, bool stripWhiteSpace=TRUE)
 
virtual void setBriefDescription (const char *b, const char *briefFile, int briefLine)
 
virtual void setInbodyDocumentation (const char *d, const char *docFile, int docLine)
 
void setReference (const char *r)
 
void addSectionsToDefinition (QList< SectionInfo > *anchorList)
 
void setBodySegment (int bls, int ble)
 
void setBodyDef (FileDef *fd)
 
void addSourceReferencedBy (MemberDef *d)
 
void addSourceReferences (MemberDef *d)
 
void setRefItems (const QList< ListItemInfo > *sli)
 
void mergeRefItems (Definition *d)
 
virtual void addInnerCompound (Definition *d)
 
virtual void setOuterScope (Definition *d)
 
virtual void setHidden (bool b)
 
void setArtificial (bool b)
 
void setLanguage (SrcLangExt lang)
 
void writeSourceDef (OutputList &ol, const char *scopeName)
 
void writeInlineCode (OutputList &ol, const char *scopeName)
 
void writeSourceRefs (OutputList &ol, const char *scopeName)
 
void writeSourceReffedBy (OutputList &ol, const char *scopeName)
 
void makePartOfGroup (GroupDef *gd)
 
void writeNavigationPath (OutputList &ol) const
 
QCString navigationPathAsString () const
 
QCString pathFragment () const
 
void writeDocAnchorsToTagFile (FTextStream &)
 
void setLocalName (const QCString name)
 
void addSectionsToIndex ()
 
void writeToc (OutputList &ol)
 
void setCookie (Cookie *cookie)
 
Cookiecookie () const
 
- Public Member Functions inherited from DefinitionIntf
 DefinitionIntf ()
 
virtual ~DefinitionIntf ()
 

Public Attributes

bool visited
 

Protected Member Functions

void acquireFileVersion ()
 
- Protected Member Functions inherited from Definition
 Definition (const Definition &d)
 

Private Member Functions

MemberListcreateMemberList (MemberListType lt)
 
void addMemberToList (MemberListType lt, MemberDef *md)
 
void writeMemberDeclarations (OutputList &ol, MemberListType lt, const QCString &title)
 
void writeMemberDocumentation (OutputList &ol, MemberListType lt, const QCString &title)
 
void writeIncludeFiles (OutputList &ol)
 
void writeIncludeGraph (OutputList &ol)
 
void writeIncludedByGraph (OutputList &ol)
 
void writeMemberGroups (OutputList &ol)
 
void writeAuthorSection (OutputList &ol)
 
void writeSourceLink (OutputList &ol)
 
void writeNamespaceDeclarations (OutputList &ol, const QCString &title, bool isConstantGroup)
 
void writeClassDeclarations (OutputList &ol, const QCString &title)
 
void writeInlineClasses (OutputList &ol)
 
void startMemberDeclarations (OutputList &ol)
 
void endMemberDeclarations (OutputList &ol)
 
void startMemberDocumentation (OutputList &ol)
 
void endMemberDocumentation (OutputList &ol)
 
void writeDetailedDescription (OutputList &ol, const QCString &title)
 
void writeBriefDescription (OutputList &ol)
 

Private Attributes

QDict< IncludeInfo > * m_includeDict
 
QList< IncludeInfo > * m_includeList
 
QDict< IncludeInfo > * m_includedByDict
 
QList< IncludeInfo > * m_includedByList
 
NamespaceSDictm_usingDirList
 
SDict< Definition > * m_usingDeclList
 
QCString m_path
 
QCString m_filePath
 
QCString m_inclDepFileName
 
QCString m_inclByDepFileName
 
QCString m_outputDiskName
 
QCString m_fileName
 
QCString m_docname
 
QIntDict< Definition > * m_srcDefDict
 
QIntDict< MemberDef > * m_srcMemberDict
 
bool m_isSource
 
QCString m_fileVersion
 
PackageDef * m_package
 
DirDefm_dir
 
QList< MemberListm_memberLists
 
MemberGroupSDictm_memberGroupSDict
 
NamespaceSDictm_namespaceSDict
 
ClassSDictm_classSDict
 
bool m_subGrouping
 

Additional Inherited Members

- Public Types inherited from DefinitionIntf
enum  DefType {
  TypeClass = 0, TypeFile = 1, TypeNamespace = 2, TypeMember = 3,
  TypeGroup = 4, TypePackage = 5, TypePage = 6, TypeDir = 7,
  TypeSymbolList = 8
}
 

Detailed Description

A model of a file symbol.

An object of this class contains all file information that is gathered. This includes the members and compounds defined in the file.

The member writeDocumentation() can be used to generate the page of documentation to HTML and LaTeX.

Definition at line 64 of file filedef.h.

Constructor & Destructor Documentation

FileDef::FileDef ( const char *  p,
const char *  nm,
const char *  lref = 0,
const char *  dn = 0 
)
FileDef::~FileDef ( )

Member Function Documentation

QCString FileDef::absFilePath ( ) const
inline
void FileDef::acquireFileVersion ( )
protected

Retrieves the file version from version control system.

Definition at line 1743 of file filedef.cpp.

References Config_getString, err(), Debug::ExtCmd, m_filePath, m_fileVersion, msg(), portable_pclose(), portable_popen(), and Debug::print().

Referenced by FileDef().

{
QCString vercmd = Config_getString(FILE_VERSION_FILTER);
if (!vercmd.isEmpty() && !m_filePath.isEmpty() &&
m_filePath!="generated" && m_filePath!="graph_legend")
{
msg("Version of %s : ",m_filePath.data());
QCString cmd = vercmd+" \""+m_filePath+"\"";
Debug::print(Debug::ExtCmd,0,"Executing popen(`%s`)\n",qPrint(cmd));
FILE *f=portable_popen(cmd,"r");
if (!f)
{
err("could not execute %s\n",vercmd.data());
return;
}
const int bufSize=1024;
char buf[bufSize];
int numRead = (int)fread(buf,1,bufSize-1,f);
if (numRead>0 && numRead<bufSize)
{
buf[numRead]='\0';
m_fileVersion=QCString(buf,numRead).stripWhiteSpace();
if (!m_fileVersion.isEmpty())
{
msg("%s\n",m_fileVersion.data());
return;
}
}
msg("no version available\n");
}
}
void FileDef::addIncludedByDependency ( FileDef fd,
const char *  incName,
bool  local,
bool  imported 
)

Definition at line 1372 of file filedef.cpp.

References absFilePath(), IncludeInfo::fileDef, IncludeInfo::imported, IncludeInfo::includeName, IncludeInfo::indirect, IncludeInfo::local, m_includedByDict, and m_includedByList.

{
//printf("FileDef::addIncludedByDependency(%p,%s,%d)\n",fd,incName,local);
QCString iName = fd ? fd->absFilePath().data() : incName;
if (!iName.isEmpty() && (m_includedByDict==0 || m_includedByDict->find(iName)==0))
{
{
m_includedByDict = new QDict<IncludeInfo>(61);
m_includedByList = new QList<IncludeInfo>;
m_includedByList->setAutoDelete(TRUE);
}
ii->fileDef = fd;
ii->includeName = incName;
ii->local = local;
ii->imported = imported;
ii->indirect = FALSE;
m_includedByList->append(ii);
m_includedByDict->insert(iName,ii);
}
}
void FileDef::addIncludeDependency ( FileDef fd,
const char *  incName,
bool  local,
bool  imported,
bool  indirect 
)

Definition at line 1275 of file filedef.cpp.

References absFilePath(), IncludeInfo::fileDef, IncludeInfo::imported, IncludeInfo::includeName, IncludeInfo::indirect, IncludeInfo::local, m_includeDict, and m_includeList.

Referenced by TagFileParser::addIncludes().

{
//printf("FileDef::addIncludeDependency(%p,%s,%d)\n",fd,incName,local);
QCString iName = fd ? fd->absFilePath().data() : incName;
if (!iName.isEmpty() && (!m_includeDict || m_includeDict->find(iName)==0))
{
if (m_includeDict==0)
{
m_includeDict = new QDict<IncludeInfo>(61);
m_includeList = new QList<IncludeInfo>;
m_includeList->setAutoDelete(TRUE);
}
ii->fileDef = fd;
ii->includeName = incName;
ii->local = local;
ii->imported = imported;
ii->indirect = indirect;
m_includeList->append(ii);
m_includeDict->insert(iName,ii);
}
}
void FileDef::addIncludedUsingDirectives ( )

Definition at line 1299 of file filedef.cpp.

References addIncludedUsingDirectives(), IncludeInfo::fileDef, SDict< T >::find(), SDict< NamespaceDef >::Iterator, m_includeList, m_usingDeclList, m_usingDirList, SDict< T >::prepend(), Definition::qualifiedName(), and visited.

Referenced by addIncludedUsingDirectives(), and findIncludedUsingDirectives().

{
if (visited) return;
visited=TRUE;
//printf("( FileDef::addIncludedUsingDirectives for file %s\n",name().data());
if (m_includeList) // file contains #includes
{
{
QListIterator<IncludeInfo> iii(*m_includeList);
for (iii.toFirst();(ii=iii.current());++iii) // foreach #include...
{
if (ii->fileDef && !ii->fileDef->visited) // ...that is a known file
{
// recurse into this file
}
}
}
{
QListIterator<IncludeInfo> iii(*m_includeList);
// iterate through list from last to first
for (iii.toLast();(ii=iii.current());--iii)
{
if (ii->fileDef && ii->fileDef!=this)
{
// add using directives
if (unl)
{
for (nli.toLast();(nd=nli.current());--nli)
{
// append each using directive found in a #include file
//printf("Prepending used namespace %s to the list of file %s\n",
// nd->name().data(),name().data());
if (m_usingDirList->find(nd->qualifiedName())==0) // not yet added
{
}
}
}
// add using declarations
if (udl)
{
for (udi.toLast();(d=udi.current());--udi)
{
//printf("Adding using declaration %s\n",d->name().data());
{
}
{
}
}
}
}
}
}
}
//printf(") end FileDef::addIncludedUsingDirectives for file %s\n",name().data());
}
void FileDef::addListReferences ( )
void FileDef::addMembersToMemberGroup ( )

Definition at line 1077 of file filedef.cpp.

References MemberGroup::addToDeclarationSection(), MemberGroup::allMembersInSameSection(), SIntDict< MemberGroup >::Iterator, MemberList::listType(), m_memberGroupSDict, m_memberLists, m_subGrouping, and MemberListType_declarationLists.

Referenced by addMembersToMemberGroup().

{
QListIterator<MemberList> mli(m_memberLists);
for (mli.toFirst();(ml=mli.current());++mli)
{
{
}
}
// add members inside sections to their groups
{
for (;(mg=mgli.current());++mgli)
{
{
//printf("----> addToDeclarationSection(%s)\n",mg->header().data());
}
}
}
}
void FileDef::addMemberToList ( MemberListType  lt,
MemberDef md 
)
private

Definition at line 1818 of file filedef.cpp.

References MemberList::append(), Config_getBool, createMemberList(), MemberList::inSort(), MemberList::listType(), MemberListType_declarationLists, MemberListType_documentationLists, MemberList::needsSorting(), MemberList::setInFile(), MemberList::setNeedsSorting(), and MemberDef::setSectionList().

Referenced by insertMember().

{
static bool sortBriefDocs = Config_getBool(SORT_BRIEF_DOCS);
static bool sortMemberDocs = Config_getBool(SORT_MEMBER_DOCS);
((ml->listType()&MemberListType_declarationLists) && sortBriefDocs) ||
((ml->listType()&MemberListType_documentationLists) && sortMemberDocs));
ml->append(md);
#if 0
if (ml->needsSorting())
ml->inSort(md);
else
ml->append(md);
#endif
{
ml->setInFile(TRUE);
}
}
void FileDef::addSourceRef ( int  line,
Definition d,
MemberDef md 
)

Definition at line 1207 of file filedef.cpp.

References m_srcDefDict, and m_srcMemberDict.

Referenced by addSourceReferences().

{
//printf("FileDef::addSourceDef(%d,%p,%p)\n",line,d,md);
if (d)
{
if (m_srcDefDict==0) m_srcDefDict = new QIntDict<Definition>(257);
if (m_srcMemberDict==0) m_srcMemberDict = new QIntDict<MemberDef>(257);
m_srcDefDict->insert(line,d);
if (md) m_srcMemberDict->insert(line,md);
//printf("Adding member %s with anchor %s at line %d to file %s\n",
// md?md->name().data():"<none>",md?md->anchor().data():"<none>",line,name().data());
}
}
void FileDef::addUsingDeclaration ( Definition def)

Definition at line 1263 of file filedef.cpp.

References SDict< T >::append(), SDict< T >::find(), m_usingDeclList, and Definition::qualifiedName().

Referenced by combineUsingRelations(), and findUsingDeclarations().

{
{
}
if (m_usingDeclList->find(d->qualifiedName())==0)
{
m_usingDeclList->append(d->qualifiedName(),d);
}
}
void FileDef::addUsingDirective ( NamespaceDef nd)

Definition at line 1244 of file filedef.cpp.

References SDict< T >::append(), SDict< T >::find(), m_usingDirList, and Definition::qualifiedName().

Referenced by combineUsingRelations().

{
{
}
{
}
//printf("%p: FileDef::addUsingDirective: %s:%d\n",this,name().data(),usingDirList->count());
}
QCString FileDef::anchor ( ) const
inlinevirtual

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

Implements Definition.

Definition at line 83 of file filedef.h.

Referenced by MemberDef::_writeGroupInclude(), and writeDocumentation().

{ return QCString(); }
void FileDef::combineUsingRelations ( )

Definition at line 1694 of file filedef.cpp.

References addUsingDeclaration(), addUsingDirective(), NamespaceDef::combineUsingRelations(), NamespaceDef::getUsedClasses(), NamespaceDef::getUsedNamespaces(), SDict< NamespaceDef >::Iterator, m_usingDirList, and visited.

Referenced by combineUsingRelations().

{
if (visited) return; // already done
visited=TRUE;
{
for (nli.toFirst();(nd=nli.current());++nli)
{
}
for (nli.toFirst();(nd=nli.current());++nli)
{
// add used namespaces of namespace nd to this namespace
if (nd->getUsedNamespaces())
{
for (unli.toFirst();(und=unli.current());++unli)
{
//printf("Adding namespace %s to the using list of %s\n",und->qualifiedName().data(),qualifiedName().data());
}
}
// add used classes of namespace nd to this namespace
if (nd->getUsedClasses())
{
Definition *ucd;
for (cli.toFirst();(ucd=cli.current());++cli)
{
//printf("Adding class %s to the using list of %s\n",cd->qualifiedName().data(),qualifiedName().data());
}
}
}
}
}
void FileDef::computeAnchors ( )

Compute the HTML anchor names for all members in the class

Definition at line 135 of file filedef.cpp.

References getMemberList(), MemberListType_allMembersList, and setAnchors().

Referenced by computeMemberReferences().

MemberList * FileDef::createMemberList ( MemberListType  lt)
private

Definition at line 1800 of file filedef.cpp.

References MemberList::listType(), and m_memberLists.

Referenced by addMemberToList().

{
m_memberLists.setAutoDelete(TRUE);
QListIterator<MemberList> mli(m_memberLists);
for (mli.toFirst();(ml=mli.current());++mli)
{
if (ml->listType()==lt)
{
return ml;
}
}
// not found, create a new member list
ml = new MemberList(lt);
m_memberLists.append(ml);
return ml;
}
DefType FileDef::definitionType ( ) const
inlinevirtual

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

Implements DefinitionIntf.

Definition at line 74 of file filedef.h.

References DefinitionIntf::TypeFile.

{ return TypeFile; }
QCString FileDef::displayName ( bool  includeScope = TRUE) const
inlinevirtual

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

Implements Definition.

Definition at line 78 of file filedef.h.

References name().

Referenced by writeDirHierarchy(), writeDirTreeNode(), and MemberDef::writeDocumentation().

{ return name(); }
void FileDef::distributeMemberGroupDocumentation ( )

Definition at line 141 of file filedef.cpp.

References MemberGroup::distributeMemberGroupDocumentation(), SIntDict< MemberGroup >::Iterator, and m_memberGroupSDict.

Referenced by distributeMemberGroupDocumentation().

{
//printf("FileDef::distributeMemberGroupDocumentation()\n");
{
for (;(mg=mgli.current());++mgli)
{
}
}
}
const QCString& FileDef::docName ( ) const
inline
void FileDef::endMemberDeclarations ( OutputList ol)
private

Definition at line 563 of file filedef.cpp.

References OutputList::endMemberSections().

Referenced by writeDocumentation().

void FileDef::endMemberDocumentation ( OutputList ol)
private

Definition at line 577 of file filedef.cpp.

References Config_getBool, OutputList::enable(), OutputGenerator::Html, and Doxygen::suppressDocWarnings.

Referenced by writeDocumentation().

{
if (Config_getBool(SEPARATE_MEMBER_PAGES))
{
}
}
QCString FileDef::fileName ( ) const
inline

Definition at line 79 of file filedef.h.

References m_fileName.

Referenced by addInstance(), and FileName::compareValues().

{ return m_fileName; }
QCString FileDef::fileVersion ( ) const

Definition at line 1926 of file filedef.cpp.

References m_fileVersion.

Referenced by FileContext::Private::version().

{
return m_fileVersion;
}
void FileDef::findSectionsInDocumentation ( )
void FileDef::finishParsing ( )

Definition at line 1072 of file filedef.cpp.

References ClangParser::finish(), and ClangParser::instance().

Referenced by generateFileSources().

bool FileDef::generateSourceFile ( ) const

Definition at line 1402 of file filedef.cpp.

References Config_getBool, guessSection(), Entry::HEADER_SEC, Definition::isReference(), and name().

Referenced by FileListContext::Private::addFiles(), addIncludeFile(), addSourceReferences(), DotInclDepGraph::buildGraph(), RTFGenerator::endIndexSection(), LatexGenerator::endIndexSection(), fileVisibleInIndex(), generateFileSources(), FileContext::Private::hasSourceFile(), ClassDef::showUsedFiles(), FileContext::Private::sources(), DirDef::writeFileList(), writeIncludeFiles(), writeSingleFileIndex(), writeSource(), and writeSourceLink().

{
static bool sourceBrowser = Config_getBool(SOURCE_BROWSER);
static bool verbatimHeaders = Config_getBool(VERBATIM_HEADERS);
QCString extension = name().right(4);
return !isReference() &&
(sourceBrowser ||
(verbatimHeaders && guessSection(name())==Entry::HEADER_SEC)
) &&
extension!=".doc" && extension!=".txt" && extension!=".dox" &&
extension!=".md" && name().right(9)!=".markdown";
}
void FileDef::getAllIncludeFilesRecursively ( QStrList &  incFiles) const

Definition at line 1915 of file filedef.cpp.

Referenced by generateFileSources(), and parseFile().

{
QDict<void> includes(257);
::getAllIncludeFilesRecursively(&includes,this,incFiles);
}
ClassSDict* FileDef::getClassSDict ( ) const
inline
DirDef* FileDef::getDirDef ( ) const
inline
MemberGroupSDict* FileDef::getMemberGroupSDict ( ) const
inline
MemberList * FileDef::getMemberList ( MemberListType  lt) const
const QList<MemberList>& FileDef::getMemberLists ( ) const
inline

Definition at line 128 of file filedef.h.

References m_memberLists.

Referenced by generateDocbookForFile(), and generateXMLForFile().

{ return m_memberLists; }
NamespaceSDict* FileDef::getNamespaceSDict ( ) const
inline
QCString FileDef::getOutputFileBase ( ) const
virtual
QCString FileDef::getPath ( ) const
inline
Definition * FileDef::getSourceDefinition ( int  lineNr) const

Definition at line 1221 of file filedef.cpp.

References m_srcDefDict.

{
Definition *result=0;
{
result = m_srcDefDict->find(lineNr);
}
//printf("%s::getSourceDefinition(%d)=%s\n",name().data(),lineNr,result?result->name().data():"none");
return result;
}
QCString FileDef::getSourceFileBase ( ) const
virtual
MemberDef * FileDef::getSourceMember ( int  lineNr) const

Definition at line 1232 of file filedef.cpp.

References m_srcMemberDict.

{
MemberDef *result=0;
{
result = m_srcMemberDict->find(lineNr);
}
//printf("%s::getSourceMember(%d)=%s\n",name().data(),lineNr,result?result->name().data():"none");
return result;
}
SDict<Definition>* FileDef::getUsedClasses ( ) const
inline

Definition at line 122 of file filedef.h.

References m_usingDeclList.

Referenced by getResolvedClassRec(), and isAccessibleFrom().

{ return m_usingDeclList; }
NamespaceSDict * FileDef::getUsedNamespaces ( ) const

Definition at line 1257 of file filedef.cpp.

References m_usingDirList.

Referenced by findGlobalMember(), findMember(), findScopeFromQualifiedName(), getResolvedClassRec(), getResolvedSymbol(), isAccessibleFrom(), and isAccessibleFromWithExpScope().

{
//printf("%p: FileDef::getUsedNamespace: %s:%d\n",this,name().data(),usingDirList?usingDirList->count():0);
return m_usingDirList;
}
QCString FileDef::getVersion ( ) const
inline

Returns version of this file.

Definition at line 112 of file filedef.h.

References m_fileVersion.

Referenced by format_warn(), ClassDef::showUsedFiles(), and FileContext::Private::versionInfo().

{ return m_fileVersion; }
bool FileDef::hasDetailedDescription ( ) const

Definition at line 179 of file filedef.cpp.

References Definition::briefDescription(), Config_getBool, Definition::documentation(), Definition::getBodyDef(), and Definition::getStartBodyLine().

Referenced by FileContext::Private::hasDetails(), and writeDetailedDescription().

{
static bool repeatBrief = Config_getBool(REPEAT_BRIEF);
static bool sourceBrowser = Config_getBool(SOURCE_BROWSER);
return ((!briefDescription().isEmpty() && repeatBrief) ||
!documentation().stripWhiteSpace().isEmpty() || // avail empty section
(sourceBrowser && getStartBodyLine()!=-1 && getBodyDef())
);
}
QCString FileDef::includedByDependencyGraphFileName ( ) const

Definition at line 1936 of file filedef.cpp.

References m_inclByDepFileName.

Referenced by DotInclDepGraph::DotInclDepGraph().

{
}
QList<IncludeInfo>* FileDef::includedByFileList ( ) const
inline
QCString FileDef::includeDependencyGraphFileName ( ) const

Definition at line 1931 of file filedef.cpp.

References m_inclDepFileName.

Referenced by DotInclDepGraph::DotInclDepGraph().

{
}
QList<IncludeInfo>* FileDef::includeFileList ( ) const
inline
QCString FileDef::includeName ( ) const

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

Definition at line 1795 of file filedef.cpp.

References getSourceFileBase().

Referenced by DirDef::writeFileList(), writeIncludeFiles(), ClassDef::writeIncludeFiles(), writeSingleFileIndex(), and writeSourceLink().

{
}
void FileDef::insertClass ( ClassDef cd)

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

Definition at line 1160 of file filedef.cpp.

References SDict< T >::append(), Config_getBool, SDict< T >::inSort(), Definition::isHidden(), m_classSDict, and Definition::name().

Referenced by addClassToContext(), and createTagLessInstance().

{
if (cd->isHidden()) return;
if (m_classSDict==0)
{
}
if (Config_getBool(SORT_BRIEF_DOCS))
{
m_classSDict->inSort(cd->name(),cd);
}
else
{
m_classSDict->append(cd->name(),cd);
}
}
void FileDef::insertMember ( MemberDef md)

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

Definition at line 1106 of file filedef.cpp.

References addMemberToList(), MemberList::append(), err(), MemberList::findRef(), MemberDef::getClassDef(), getMemberList(), Definition::isHidden(), m_memberLists, MemberListType_allMembersList, MemberListType_decDefineMembers, MemberListType_decEnumMembers, MemberListType_decFuncMembers, MemberListType_decTypedefMembers, MemberListType_decVarMembers, MemberListType_docDefineMembers, MemberListType_docEnumMembers, MemberListType_docFuncMembers, MemberListType_docTypedefMembers, MemberListType_docVarMembers, MemberDef::memberType(), MemberType_Define, MemberType_Enumeration, MemberType_EnumValue, MemberType_Function, MemberType_Property, MemberType_Typedef, MemberType_Variable, name(), and Definition::name().

Referenced by addVariableToFile(), buildFunctionList(), and findEnums().

{
if (md->isHidden()) return;
//printf("%s:FileDef::insertMember(%s (=%p) list has %d elements)\n",
// name().data(),md->name().data(),md,allMemberList.count());
if (allMemberList && allMemberList->findRef(md)!=-1) // TODO optimize the findRef!
{
return;
}
if (allMemberList==0)
{
m_memberLists.append(allMemberList);
}
allMemberList->append(md);
//::addFileMemberNameToIndex(md);
switch (md->memberType())
{
break;
break;
break;
break;
case MemberType_EnumValue: // enum values are shown inside their enums
break;
break;
default:
err("FileDef::insertMembers(): "
"member `%s' with class scope `%s' inserted in file scope `%s'!\n",
md->name().data(),
md->getClassDef() ? md->getClassDef()->name().data() : "<global>",
name().data());
}
//addMemberToGroup(md,groupId);
}
void FileDef::insertNamespace ( NamespaceDef nd)

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

Definition at line 1178 of file filedef.cpp.

References SDict< T >::append(), Config_getBool, SDict< T >::find(), SDict< T >::inSort(), Definition::isHidden(), m_namespaceSDict, and Definition::name().

Referenced by buildNamespaceList().

{
if (nd->isHidden()) return;
if (!nd->name().isEmpty() &&
{
{
}
if (Config_getBool(SORT_BRIEF_DOCS))
{
}
else
{
}
}
}
bool FileDef::isDocumentationFile ( ) const

Definition at line 1734 of file filedef.cpp.

References name().

Referenced by FileListContext::Private::addFiles(), buildDirectories(), fileVisibleInIndex(), writeSingleFileIndex(), and writeSource().

{
return name().right(4)==".doc" ||
name().right(4)==".txt" ||
name().right(4)==".dox" ||
name().right(3)==".md" ||
name().right(9)==".markdown";
}
bool FileDef::isIncluded ( const QCString &  name) const

Definition at line 1396 of file filedef.cpp.

References m_includeDict.

{
if (name.isEmpty()) return FALSE;
return m_includeDict!=0 && m_includeDict->find(name)!=0;
}
bool FileDef::isLinkable ( ) const
inlinevirtual
bool FileDef::isLinkableInProject ( ) const
virtual
bool FileDef::isSource ( ) const
inline

Returns TRUE if this file is a source file.

Definition at line 101 of file filedef.h.

References m_isSource.

Referenced by generateFileSources(), and parseFiles().

{ return m_isSource; }
QCString FileDef::name ( ) const
PackageDef* FileDef::packageDef ( ) const
inline

Definition at line 119 of file filedef.h.

References m_package.

{ return m_package; }
void FileDef::parseSource ( bool  sameTu,
QStrList &  filesInSameTu 
)

Definition at line 1033 of file filedef.cpp.

References absFilePath(), Config_getBool, fileToString(), Definition::getDefFileExtension(), Definition::getLanguage(), ParserManager::getParser(), ClangParser::instance(), ParserInterface::parseCode(), Doxygen::parserManager, ParserInterface::resetCodeParserState(), SrcLangExt_Cpp, SrcLangExt_ObjC, ClangParser::start(), ClangParser::switchToFile(), and ClangParser::writeSources().

Referenced by generateFileSources().

{
static bool filterSourceFiles = Config_getBool(FILTER_SOURCE_FILES);
(void)sameTu;
(void)filesInSameTu;
#if USE_LIBCLANG
static bool clangAssistedParsing = Config_getBool(CLANG_ASSISTED_PARSING);
if (clangAssistedParsing &&
{
if (!sameTu)
{
}
else
{
}
ClangParser::instance()->writeSources(devNullIntf,this);
}
else
#endif
{
pIntf->parseCode(
devNullIntf,0,
fileToString(absFilePath(),filterSourceFiles,TRUE),
FALSE,0,this
);
}
}
void FileDef::setDirDef ( DirDef dd)
inline

Definition at line 163 of file filedef.h.

References m_dir.

Referenced by DirDef::addFile().

{ m_dir=dd; }
void FileDef::setDiskName ( const QCString &  name)
void FileDef::setPackageDef ( PackageDef *  pd)
inline

Definition at line 162 of file filedef.h.

References m_package.

{ m_package=pd; }
void FileDef::sortMemberLists ( )

Definition at line 1840 of file filedef.cpp.

References m_memberLists, MemberList::needsSorting(), MemberList::setNeedsSorting(), and MemberList::sort().

Referenced by sortMemberLists().

{
QListIterator<MemberList> mli(m_memberLists);
for (;(ml=mli.current());++mli)
{
if (ml->needsSorting()) { ml->sort(); ml->setNeedsSorting(FALSE); }
}
}
void FileDef::startMemberDeclarations ( OutputList ol)
private

Definition at line 558 of file filedef.cpp.

References OutputList::startMemberSections().

Referenced by writeDocumentation().

void FileDef::startMemberDocumentation ( OutputList ol)
private
void FileDef::startParsing ( )

Definition at line 1068 of file filedef.cpp.

Referenced by generateFileSources().

{
}
bool FileDef::subGrouping ( ) const
inline

Definition at line 139 of file filedef.h.

References m_subGrouping.

Referenced by FileContext::Private::memberGroups().

{ return m_subGrouping; }
QCString FileDef::title ( ) const
void FileDef::writeAuthorSection ( OutputList ol)
private
void FileDef::writeBriefDescription ( OutputList ol)
private
void FileDef::writeClassDeclarations ( OutputList ol,
const QCString &  title 
)
private

Definition at line 539 of file filedef.cpp.

References m_classSDict, and ClassSDict::writeDeclaration().

Referenced by writeDocumentation().

{
// write list of classes
}
void FileDef::writeDetailedDescription ( OutputList ol,
const QCString &  title 
)
private

Definition at line 295 of file filedef.cpp.

References Definition::briefDescription(), Definition::briefFile(), Definition::briefLine(), Config_getBool, OutputList::disable(), OutputList::disableAllBut(), Definition::docFile(), Definition::docLine(), Definition::documentation(), OutputList::enable(), OutputList::enableAll(), OutputList::endGroupHeader(), OutputList::endParagraph(), OutputList::endTextBlock(), OutputList::generateDoc(), getSourceFileBase(), hasDetailedDescription(), OutputGenerator::Html, OutputList::isEnabled(), OutputGenerator::Latex, OutputGenerator::Man, name(), OutputList::parseText(), OutputList::popGeneratorState(), OutputList::pushGeneratorState(), OutputGenerator::RTF, OutputList::startGroupHeader(), OutputList::startParagraph(), OutputList::startTextBlock(), theTranslator, Translator::trDefinedInSourceFile(), OutputList::writeAnchor(), OutputList::writeObjectLink(), OutputList::writeRuler(), and OutputList::writeString().

Referenced by writeDocumentation().

{
{
ol.writeRuler();
ol.writeAnchor(0,"details");
if (!briefDescription().isEmpty() && Config_getBool(REPEAT_BRIEF))
{
ol.generateDoc(briefFile(),briefLine(),this,0,briefDescription(),FALSE,FALSE);
}
if (!briefDescription().isEmpty() && Config_getBool(REPEAT_BRIEF) &&
!documentation().isEmpty())
{
// ol.newParagraph(); // FIXME:PARA
ol.enableAll();
ol.writeString("\n\n");
}
if (!documentation().isEmpty())
{
ol.generateDoc(docFile(),docLine(),this,0,documentation()+"\n",TRUE,FALSE);
}
//printf("Writing source ref for file %s\n",name().data());
if (Config_getBool(SOURCE_BROWSER))
{
//if Latex enabled and LATEX_SOURCE_CODE isn't -> skip, bug_738548
if (ol.isEnabled(OutputGenerator::Latex) && !Config_getBool(LATEX_SOURCE_CODE))
{
}
if (ol.isEnabled(OutputGenerator::RTF) && !Config_getBool(RTF_SOURCE_CODE))
{
}
QCString refText = theTranslator->trDefinedInSourceFile();
int fileMarkerPos = refText.find("@0");
if (fileMarkerPos!=-1) // should always pass this.
{
ol.parseText(refText.left(fileMarkerPos)); //text left from marker 1
0,name());
ol.parseText(refText.right(
refText.length()-fileMarkerPos-2)); // text right from marker 2
}
//Restore settings, bug_738548
}
}
}
void FileDef::writeDocumentation ( OutputList ol)

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

Definition at line 660 of file filedef.cpp.

References addGroupListToTitle(), SearchIndexIntf::addWord(), anchor(), LayoutDocEntry::AuthorSection, LayoutDocEntry::BriefDesc, LayoutDocEntry::ClassAllMembersLink, LayoutDocEntry::ClassCollaborationGraph, LayoutDocEntry::ClassIncludes, LayoutDocEntry::ClassInheritanceGraph, LayoutDocEntry::ClassInlineClasses, LayoutDocEntry::ClassNestedClasses, LayoutDocEntry::ClassUsedFiles, Config_getBool, LayoutDocEntry::DetailedDesc, LayoutDocEntry::DirFiles, LayoutDocEntry::DirGraph, LayoutDocEntry::DirSubDirs, OutputList::disable(), OutputList::disableAllBut(), OutputList::docify(), OutputList::enableAll(), OutputList::endContents(), endFileWithNavPath(), endMemberDeclarations(), endMemberDocumentation(), OutputList::endProjectNumber(), OutputList::endQuickIndices(), endTitle(), err(), LayoutDocManager::File, LayoutDocEntry::FileClasses, LayoutDocEntry::FileConstantGroups, LayoutDocEntry::FileIncludedByGraph, LayoutDocEntry::FileIncludeGraph, LayoutDocEntry::FileIncludes, LayoutDocEntry::FileInlineClasses, LayoutDocEntry::FileNamespaces, LayoutDocEntry::FileSourceLink, getDirDef(), Definition::getLanguage(), getMemberList(), getOutputFileBase(), LayoutDocEntry::GroupClasses, LayoutDocEntry::GroupDirs, LayoutDocEntry::GroupFiles, LayoutDocEntry::GroupGraph, LayoutDocEntry::GroupInlineClasses, LayoutDocEntry::GroupNamespaces, LayoutDocEntry::GroupNestedGroups, LayoutDocEntry::GroupPageDocs, HLI_FileVisible, OutputGenerator::Html, LayoutDocManager::instance(), LayoutDocEntry::kind(), Definition::localName(), m_docname, m_fileVersion, LayoutDocEntry::MemberDecl, LayoutDocEntry::MemberDeclEnd, LayoutDocEntry::MemberDeclStart, LayoutDocEntry::MemberDef, LayoutDocEntry::MemberDefEnd, LayoutDocEntry::MemberDefStart, LayoutDocEntry::MemberGroups, MemberListType_allMembersList, name(), LayoutDocEntry::NamespaceClasses, LayoutDocEntry::NamespaceInlineClasses, LayoutDocEntry::NamespaceNestedConstantGroups, LayoutDocEntry::NamespaceNestedNamespaces, OutputList::parseText(), OutputList::popGeneratorState(), OutputList::pushGeneratorState(), Doxygen::searchIndex, SearchIndexIntf::setCurrentDoc(), MemberList::sort(), OutputList::startContents(), startFile(), startMemberDeclarations(), startMemberDocumentation(), OutputList::startProjectNumber(), startTitle(), theTranslator, LayoutDocEntrySection::title(), LayoutDocEntryMemberDecl::title(), LayoutDocEntryMemberDef::title(), title(), Translator::trFileReference(), LayoutDocEntryMemberDecl::type, LayoutDocEntryMemberDef::type, writeAuthorSection(), writeBriefDescription(), writeClassDeclarations(), writeDetailedDescription(), writeIncludedByGraph(), writeIncludeFiles(), writeIncludeGraph(), writeInlineClasses(), writeMemberDeclarations(), writeMemberDocumentation(), writeMemberGroups(), writeMemberPages(), writeNamespaceDeclarations(), Definition::writeNavigationPath(), and writeSourceLink().

Referenced by generateFileDocs().

{
static bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
//funcList->countDecMembers();
//QCString fn = name();
//if (Config_getBool(FULL_PATH_NAMES))
//{
// fn.prepend(stripFromPath(getPath().copy()));
//}
//printf("WriteDocumentation diskname=%s\n",diskname.data());
QCString versionTitle;
if (!m_fileVersion.isEmpty())
{
versionTitle=("("+m_fileVersion+")");
}
QCString title = m_docname+versionTitle;
QCString pageTitle=theTranslator->trFileReference(m_docname);
if (getDirDef())
{
startFile(ol,getOutputFileBase(),name(),pageTitle,HLI_FileVisible,!generateTreeView);
if (!generateTreeView)
{
}
QCString pageTitleShort=theTranslator->trFileReference(name());
ol.parseText(pageTitleShort); // Html only
ol.enableAll();
ol.parseText(pageTitle); // other output formats
}
else
{
startFile(ol,getOutputFileBase(),name(),pageTitle,HLI_FileVisible,!generateTreeView);
if (!generateTreeView)
{
}
ol.parseText(pageTitle);
}
if (!m_fileVersion.isEmpty())
{
ol.docify(versionTitle);
ol.enableAll();
}
{
}
//---------------------------------------- start flexible part -------------------------------
QListIterator<LayoutDocEntry> eli(
for (eli.toFirst();(lde=eli.current());++eli)
{
switch (lde->kind())
{
break;
break;
break;
break;
break;
break;
{
}
break;
{
writeNamespaceDeclarations(ol,ls->title(lang),false);
}
break;
{
writeNamespaceDeclarations(ol,ls->title(lang),true);
}
break;
break;
{
writeMemberDeclarations(ol,lmd->type,lmd->title(lang));
}
break;
break;
{
}
break;
break;
break;
{
writeMemberDocumentation(ol,lmd->type,lmd->title(lang));
}
break;
break;
break;
err("Internal inconsistency: member %d should not be part of "
"LayoutDocManager::File entry list\n",lde->kind());
break;
}
}
//---------------------------------------- end flexible part -------------------------------
if (Config_getBool(SEPARATE_MEMBER_PAGES))
{
if (ml) ml->sort();
}
}
void FileDef::writeIncludedByGraph ( OutputList ol)
private

Definition at line 492 of file filedef.cpp.

References Config_getBool, OutputList::disable(), OutputList::enableAll(), OutputList::endInclDepGraph(), OutputList::endTextBlock(), DotInclDepGraph::isTooBig(), DotInclDepGraph::isTrivial(), OutputGenerator::Man, name(), OutputList::parseText(), OutputList::startInclDepGraph(), OutputList::startTextBlock(), theTranslator, Translator::trInclByDepGraph(), and warn_uncond().

Referenced by writeDocumentation().

{
if (Config_getBool(HAVE_DOT) /*&& Config_getBool(INCLUDED_BY_GRAPH)*/)
{
//printf("Graph for file %s\n",name().data());
DotInclDepGraph incDepGraph(this,TRUE);
if (incDepGraph.isTooBig())
{
warn_uncond("Included by graph for '%s' not generated, too many nodes. Consider increasing DOT_GRAPH_MAX_NODES.\n",name().data());
}
else if (!incDepGraph.isTrivial())
{
ol.endInclDepGraph(incDepGraph);
ol.enableAll();
ol.endTextBlock(TRUE);
}
//incDepGraph.writeGraph(Config_getString(HTML_OUTPUT),fd->getOutputFileBase());
}
}
void FileDef::writeIncludeFiles ( OutputList ol)
private

Definition at line 399 of file filedef.cpp.

References OutputList::disable(), OutputList::disableAllBut(), OutputList::docify(), OutputList::enableAll(), OutputList::endTextBlock(), OutputList::endTypewriter(), IncludeInfo::fileDef, generateSourceFile(), Definition::getLanguage(), getOutputFileBase(), Definition::getReference(), OutputGenerator::Html, IncludeInfo::imported, IncludeInfo::includeName, includeName(), IncludeInfo::indirect, isLinkable(), OutputList::lineBreak(), IncludeInfo::local, m_includeList, SrcLangExt_IDL, SrcLangExt_Java, OutputList::startTextBlock(), OutputList::startTypewriter(), and OutputList::writeObjectLink().

Referenced by writeDocumentation().

{
if (m_includeList && m_includeList->count()>0)
{
ol.startTextBlock(TRUE);
QListIterator<IncludeInfo> ili(*m_includeList);
for (;(ii=ili.current());++ili)
{
if (!ii->indirect)
{
FileDef *fd=ii->fileDef;
bool isIDLorJava = FALSE;
if (fd)
{
SrcLangExt lang = fd->getLanguage();
isIDLorJava = lang==SrcLangExt_IDL || lang==SrcLangExt_Java;
}
if (isIDLorJava) // IDL/Java include
{
ol.docify("import ");
}
else if (ii->imported) // Objective-C include
{
ol.docify("#import ");
}
else // C/C++ include
{
ol.docify("#include ");
}
if (ii->local || isIDLorJava)
ol.docify("\"");
else
ol.docify("<");
ol.enableAll();
// Here we use the include file name as it appears in the file.
// we could also we the name as it is used within doxygen,
// then we should have used fd->docName() instead of ii->includeName
if (fd && fd->isLinkable())
{
0,ii->includeName);
}
else
{
}
ol.enableAll();
if (ii->local || isIDLorJava)
ol.docify("\"");
else
ol.docify(">");
if (isIDLorJava)
ol.docify(";");
ol.lineBreak();
}
}
}
}
void FileDef::writeIncludeGraph ( OutputList ol)
private

Definition at line 468 of file filedef.cpp.

References Config_getBool, OutputList::disable(), OutputList::enableAll(), OutputList::endInclDepGraph(), OutputList::endTextBlock(), DotInclDepGraph::isTooBig(), DotInclDepGraph::isTrivial(), OutputGenerator::Man, name(), OutputList::parseText(), OutputList::startInclDepGraph(), OutputList::startTextBlock(), theTranslator, Translator::trInclDepGraph(), and warn_uncond().

Referenced by writeDocumentation().

{
if (Config_getBool(HAVE_DOT) /*&& Config_getBool(INCLUDE_GRAPH)*/)
{
//printf("Graph for file %s\n",name().data());
DotInclDepGraph incDepGraph(this,FALSE);
if (incDepGraph.isTooBig())
{
warn_uncond("Include graph for '%s' not generated, too many nodes. Consider increasing DOT_GRAPH_MAX_NODES.\n",name().data());
}
else if (!incDepGraph.isTrivial())
{
ol.endInclDepGraph(incDepGraph);
ol.enableAll();
ol.endTextBlock(TRUE);
}
//incDepGraph.writeGraph(Config_getString(HTML_OUTPUT),fd->getOutputFileBase());
}
}
void FileDef::writeInlineClasses ( OutputList ol)
private

Definition at line 545 of file filedef.cpp.

References OutputList::disable(), OutputList::enable(), OutputGenerator::Html, OutputList::isEnabled(), m_classSDict, and ClassSDict::writeDocumentation().

Referenced by writeDocumentation().

{
// temporarily undo the disbling could be done by startMemberDocumentation()
// as a result of setting SEPARATE_MEMBER_PAGES to YES; see bug730512
bool isEnabled = ol.isEnabled(OutputGenerator::Html);
// restore the initial state if needed
if (!isEnabled) ol.disable(OutputGenerator::Html);
}
void FileDef::writeMemberDeclarations ( OutputList ol,
MemberListType  lt,
const QCString &  title 
)
private

Definition at line 1864 of file filedef.cpp.

References Config_getBool, getMemberList(), MemberList::writeDeclarations(), and VhdlDocGen::writeVhdlDeclarations().

Referenced by writeDocumentation().

{
static bool optVhdl = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
if (ml)
{
if (optVhdl) // use specific declarations function
{
}
else
{
ml->writeDeclarations(ol,0,0,this,0,title,0);
}
}
}
void FileDef::writeMemberDocumentation ( OutputList ol,
MemberListType  lt,
const QCString &  title 
)
private

Definition at line 1882 of file filedef.cpp.

References getMemberList(), name(), and MemberList::writeDocumentation().

Referenced by writeDocumentation().

{
if (ml) ml->writeDocumentation(ol,name(),this,title);
}
void FileDef::writeMemberGroups ( OutputList ol)
private

Definition at line 586 of file filedef.cpp.

References MemberGroup::allMembersInSameSection(), MemberGroup::header(), SIntDict< MemberGroup >::Iterator, m_memberGroupSDict, m_subGrouping, SIntDict< T >::sort(), and MemberGroup::writeDeclarations().

Referenced by writeDocumentation().

{
/* write user defined member groups */
{
for (;(mg=mgli.current());++mgli)
{
&& mg->header()!="[NOHEADER]")
{
mg->writeDeclarations(ol,0,0,this,0);
}
}
}
}
void FileDef::writeMemberPages ( OutputList ol)
void FileDef::writeNamespaceDeclarations ( OutputList ol,
const QCString &  title,
bool  isConstantGroup 
)
private

Definition at line 532 of file filedef.cpp.

References m_namespaceSDict, and NamespaceSDict::writeDeclaration().

Referenced by writeDocumentation().

{
// write list of namespaces
}
void FileDef::writeQuickMemberLinks ( OutputList ol,
MemberDef currentMd 
) const
virtual

Reimplemented from Definition.

Definition at line 874 of file filedef.cpp.

References MemberDef::anchor(), Config_getBool, convertToHtml(), createSubDirs(), MemberDef::getFileDef(), getMemberList(), MemberDef::getNamespaceDef(), MemberDef::getOutputFileBase(), Doxygen::htmlFileExtension, MemberDef::isEnumValue(), MemberDef::isLinkable(), MemberDef::isLinkableInProject(), Definition::localName(), MemberListType_allMembersList, and OutputList::writeString().

{
static bool createSubDirs=Config_getBool(CREATE_SUBDIRS);
ol.writeString(" <div class=\"navtab\">\n");
ol.writeString(" <table>\n");
if (allMemberList)
{
MemberListIterator mli(*allMemberList);
MemberDef *md;
for (mli.toFirst();(md=mli.current());++mli)
{
if (md->getFileDef()==this && md->getNamespaceDef()==0 && md->isLinkable() && !md->isEnumValue())
{
ol.writeString(" <tr><td class=\"navtab\">");
{
if (md==currentMd) // selected item => highlight
{
ol.writeString("<a class=\"qindexHL\" ");
}
else
{
ol.writeString("<a class=\"qindex\" ");
}
ol.writeString("href=\"");
if (createSubDirs) ol.writeString("../../");
ol.writeString("\">");
ol.writeString("</a>");
}
ol.writeString("</td></tr>\n");
}
}
}
ol.writeString(" </table>\n");
ol.writeString(" </div>\n");
}
void FileDef::writeSource ( OutputList ol,
bool  sameTu,
QStrList &  filesInSameTu 
)

Write a source listing of this file to the output

Definition at line 918 of file filedef.cpp.

References absFilePath(), Config_getBool, OutputList::disable(), OutputList::enable(), OutputList::enableAll(), OutputList::endCodeFragment(), OutputList::endContents(), endFileWithNavPath(), OutputList::endQuickIndices(), OutputList::endTextLink(), endTitle(), fileToString(), generateSourceFile(), Definition::getDefFileExtension(), getDirDef(), getFileFilter(), Definition::getLanguage(), getOutputFileBase(), ParserManager::getParser(), getSourceFileBase(), HLI_FileVisible, ClangParser::instance(), isDocumentationFile(), isLinkable(), OutputGenerator::Latex, m_docname, m_fileVersion, OutputGenerator::Man, name(), ParserInterface::parseCode(), Doxygen::parserManager, Doxygen::parseSourcesNeeded, OutputList::parseText(), ParserInterface::resetCodeParserState(), OutputGenerator::RTF, SrcLangExt_Cpp, SrcLangExt_ObjC, ClangParser::start(), OutputList::startCodeFragment(), OutputList::startContents(), startFile(), OutputList::startTextLink(), startTitle(), ClangParser::switchToFile(), theTranslator, title(), Translator::trGotoDocumentation(), Translator::trSourceFile(), Definition::writeNavigationPath(), and ClangParser::writeSources().

Referenced by generateFileSources().

{
static bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
static bool filterSourceFiles = Config_getBool(FILTER_SOURCE_FILES);
static bool latexSourceCode = Config_getBool(LATEX_SOURCE_CODE);
static bool rtfSourceCode = Config_getBool(RTF_SOURCE_CODE);
QCString title = m_docname;
if (!m_fileVersion.isEmpty())
{
title+=(" ("+m_fileVersion+")");
}
QCString pageTitle = theTranslator->trSourceFile(title);
if (!latexSourceCode) ol.disable(OutputGenerator::Latex);
if (!rtfSourceCode) ol.disable(OutputGenerator::RTF);
bool isDocFile = isDocumentationFile();
bool genSourceFile = !isDocFile && generateSourceFile();
if (getDirDef())
{
!generateTreeView,
!isDocFile && genSourceFile ? QCString() : getOutputFileBase());
if (!generateTreeView)
{
}
ol.parseText(name());
}
else
{
!isDocFile && genSourceFile ? QCString() : getOutputFileBase());
ol.parseText(title);
}
if (isLinkable())
{
if (latexSourceCode) ol.disable(OutputGenerator::Latex);
if (rtfSourceCode) ol.disable(OutputGenerator::RTF);
if (latexSourceCode) ol.enable(OutputGenerator::Latex);
if (rtfSourceCode) ol.enable(OutputGenerator::RTF);
}
(void)sameTu;
(void)filesInSameTu;
#if USE_LIBCLANG
static bool clangAssistedParsing = Config_getBool(CLANG_ASSISTED_PARSING);
if (clangAssistedParsing &&
{
if (!sameTu)
{
}
else
{
}
}
else
#endif
{
bool needs2PassParsing =
Doxygen::parseSourcesNeeded && // we need to parse (filtered) sources for cross-references
!filterSourceFiles && // but user wants to show sources as-is
!getFileFilter(absFilePath(),TRUE).isEmpty(); // and there is a filter used while parsing
if (needs2PassParsing)
{
// parse code for cross-references only (see bug707641)
pIntf->parseCode(devNullIntf,0,
fileToString(absFilePath(),TRUE,TRUE),
FALSE,0,this
);
}
pIntf->parseCode(ol,0,
fileToString(absFilePath(),filterSourceFiles,TRUE),
getLanguage(), // lang
FALSE, // isExampleBlock
0, // exampleName
this, // fileDef
-1, // startLine
-1, // endLine
FALSE, // inlineFragment
0, // memberDef
TRUE, // showLineNumbers
0, // searchCtx
!needs2PassParsing // collectXRefs
);
}
ol.enableAll();
}
void FileDef::writeSourceLink ( OutputList ol)
private
void FileDef::writeSummaryLinks ( OutputList ol)
virtual

Reimplemented from Definition.

Definition at line 617 of file filedef.cpp.

References ClassSDict::declVisible(), MemberList::declVisible(), NamespaceSDict::declVisible(), OutputList::disableAllBut(), LayoutDocManager::File, LayoutDocEntry::FileClasses, LayoutDocEntry::FileNamespaces, Definition::getLanguage(), getMemberList(), OutputGenerator::Html, LayoutDocManager::instance(), LayoutDocEntry::kind(), MemberList::listType(), MemberList::listTypeAsString(), m_classSDict, m_namespaceSDict, LayoutDocEntry::MemberDecl, OutputList::popGeneratorState(), OutputList::pushGeneratorState(), LayoutDocEntrySection::title(), LayoutDocEntryMemberDecl::title(), LayoutDocEntryMemberDecl::type, OutputList::writeString(), and OutputList::writeSummaryLink().

{
QListIterator<LayoutDocEntry> eli(
bool first=TRUE;
for (eli.toFirst();(lde=eli.current());++eli)
{
)
{
QCString label = lde->kind()==LayoutDocEntry::FileClasses ? "nested-classes" : "namespaces";
ol.writeSummaryLink(0,label,ls->title(lang),first);
first=FALSE;
}
else if (lde->kind()==LayoutDocEntry::MemberDecl)
{
if (ml && ml->declVisible())
{
first=FALSE;
}
}
}
if (!first)
{
ol.writeString(" </div>\n");
}
}
void FileDef::writeTagFile ( FTextStream t)

Definition at line 189 of file filedef.cpp.

References ClassDef::compoundTypeString(), convertToXML(), endl(), LayoutDocManager::File, LayoutDocEntry::FileClasses, IncludeInfo::fileDef, LayoutDocEntry::FileNamespaces, Definition::getLanguage(), getMemberList(), getOutputFileBase(), getPath(), IncludeInfo::imported, IncludeInfo::includeName, IncludeInfo::indirect, LayoutDocManager::instance(), isLinkable(), NamespaceDef::isLinkableInProject(), ClassDef::isLinkableInProject(), Definition::isReference(), SIntDict< MemberGroup >::Iterator, LayoutDocEntry::kind(), IncludeInfo::local, m_classSDict, m_includeList, m_memberGroupSDict, m_namespaceSDict, LayoutDocEntry::MemberDecl, LayoutDocEntry::MemberGroups, name(), Definition::name(), SrcLangExt_IDL, SrcLangExt_Java, LayoutDocEntryMemberDecl::type, Definition::writeDocAnchorsToTagFile(), MemberGroup::writeTagFile(), and MemberList::writeTagFile().

Referenced by writeTagFile().

{
tagFile << " <compound kind=\"file\">" << endl;
tagFile << " <name>" << convertToXML(name()) << "</name>" << endl;
tagFile << " <path>" << convertToXML(getPath()) << "</path>" << endl;
tagFile << " <filename>" << convertToXML(getOutputFileBase()) << "</filename>" << endl;
if (m_includeList && m_includeList->count()>0)
{
QListIterator<IncludeInfo> ili(*m_includeList);
for (;(ii=ili.current());++ili)
{
if (!ii->indirect)
{
FileDef *fd=ii->fileDef;
if (fd && fd->isLinkable() && !fd->isReference())
{
bool isIDLorJava = FALSE;
SrcLangExt lang = fd->getLanguage();
isIDLorJava = lang==SrcLangExt_IDL || lang==SrcLangExt_Java;
const char *locStr = (ii->local || isIDLorJava) ? "yes" : "no";
const char *impStr = (ii->imported || isIDLorJava) ? "yes" : "no";
tagFile << " <includes id=\""
<< convertToXML(fd->getOutputFileBase()) << "\" "
<< "name=\"" << convertToXML(fd->name()) << "\" "
<< "local=\"" << locStr << "\" "
<< "imported=\"" << impStr << "\">"
<< "</includes>"
<< endl;
}
}
}
}
QListIterator<LayoutDocEntry> eli(
for (eli.toFirst();(lde=eli.current());++eli)
{
switch (lde->kind())
{
{
{
ClassDef *cd;
for (ci.toFirst();(cd=ci.current());++ci)
{
{
tagFile << " <class kind=\"" << cd->compoundTypeString() <<
"\">" << convertToXML(cd->name()) << "</class>" << endl;
}
}
}
}
break;
{
{
for (ni.toFirst();(nd=ni.current());++ni)
{
{
tagFile << " <namespace>" << convertToXML(nd->name()) << "</namespace>" << endl;
}
}
}
}
break;
{
if (ml)
{
ml->writeTagFile(tagFile);
}
}
break;
{
{
for (;(mg=mgli.current());++mgli)
{
mg->writeTagFile(tagFile);
}
}
}
break;
default:
break;
}
}
tagFile << " </compound>" << endl;
}

Member Data Documentation

ClassSDict* FileDef::m_classSDict
private
DirDef* FileDef::m_dir
private

Definition at line 231 of file filedef.h.

Referenced by FileDef(), getDirDef(), and setDirDef().

QCString FileDef::m_docname
private

Definition at line 225 of file filedef.h.

Referenced by docName(), FileDef(), writeDocumentation(), and writeSource().

QCString FileDef::m_fileName
private

Definition at line 224 of file filedef.h.

Referenced by FileDef(), fileName(), and name().

QCString FileDef::m_filePath
private

Definition at line 220 of file filedef.h.

Referenced by absFilePath(), acquireFileVersion(), FileDef(), and getSourceFileBase().

QCString FileDef::m_fileVersion
private
QCString FileDef::m_inclByDepFileName
private

Definition at line 222 of file filedef.h.

Referenced by includedByDependencyGraphFileName(), and setDiskName().

QCString FileDef::m_inclDepFileName
private

Definition at line 221 of file filedef.h.

Referenced by includeDependencyGraphFileName(), and setDiskName().

QDict<IncludeInfo>* FileDef::m_includedByDict
private

Definition at line 215 of file filedef.h.

Referenced by addIncludedByDependency(), FileDef(), and ~FileDef().

QList<IncludeInfo>* FileDef::m_includedByList
private

Definition at line 216 of file filedef.h.

Referenced by addIncludedByDependency(), FileDef(), includedByFileList(), and ~FileDef().

QDict<IncludeInfo>* FileDef::m_includeDict
private

Definition at line 213 of file filedef.h.

Referenced by addIncludeDependency(), FileDef(), isIncluded(), and ~FileDef().

QList<IncludeInfo>* FileDef::m_includeList
private
bool FileDef::m_isSource
private

Definition at line 228 of file filedef.h.

Referenced by FileDef(), and isSource().

MemberGroupSDict* FileDef::m_memberGroupSDict
private
QList<MemberList> FileDef::m_memberLists
private
NamespaceSDict* FileDef::m_namespaceSDict
private
QCString FileDef::m_outputDiskName
private

Definition at line 223 of file filedef.h.

Referenced by getOutputFileBase(), getSourceFileBase(), and setDiskName().

PackageDef* FileDef::m_package
private

Definition at line 230 of file filedef.h.

Referenced by FileDef(), packageDef(), and setPackageDef().

QCString FileDef::m_path
private

Definition at line 219 of file filedef.h.

Referenced by FileDef(), and getPath().

QIntDict<Definition>* FileDef::m_srcDefDict
private

Definition at line 226 of file filedef.h.

Referenced by addSourceRef(), FileDef(), getSourceDefinition(), and ~FileDef().

QIntDict<MemberDef>* FileDef::m_srcMemberDict
private

Definition at line 227 of file filedef.h.

Referenced by addSourceRef(), FileDef(), getSourceMember(), and ~FileDef().

bool FileDef::m_subGrouping
private

Definition at line 236 of file filedef.h.

Referenced by addMembersToMemberGroup(), FileDef(), subGrouping(), and writeMemberGroups().

SDict<Definition>* FileDef::m_usingDeclList
private
NamespaceSDict* FileDef::m_usingDirList
private
bool FileDef::visited

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