FileDef Class Reference

A File definition. More...

#include <filedef.h>

Inheritance diagram for FileDef:

Definition DefinitionIntf LockableObj List of all members.

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 fileName () const
QCString getOutputFileBase () const
QCString getFileBase () const
QCString getSourceFileBase () const
QCString includeName () const
QCString absFilePath () const
QCString docName () const
void addSourceRef (int line, Definition *d, MemberDef *md)
DefinitiongetSourceDefinition (int lineNr)
MemberDefgetSourceMember (int lineNr)
QCString getPath () const
QCString getVersion () const
bool isLinkableInProject () const
bool isLinkable () const
bool isIncluded (const QCString &name) const
bool isJava () const
void writeDetailedDocumentation (OutputList &ol)
void writeDocumentation (OutputList &ol)
void writeMemberDocumentation (OutputList &ol)
void writeMemberPages (OutputList &ol)
void writeQuickMemberLinks (OutputList &ol, MemberDef *currentMd) const
void writeSource (OutputList &ol)
void parseSource ()
void insertMember (MemberDef *md)
void insertClass (ClassDef *cd)
void insertNamespace (NamespaceDef *nd)
void computeAnchors ()
void setPackageDef (PackageDef *pd)
PackageDef * packageDef () const
void setDirDef (DirDef *dd)
DirDefgetDirDef () const
void addUsingDirective (NamespaceDef *nd)
NamespaceSDictgetUsedNamespaces () const
void addUsingDeclaration (Definition *def)
SDict< Definition > * getUsedClasses () const
void combineUsingRelations ()
bool generateSourceFile () const
void addIncludeDependency (FileDef *fd, const char *incName, bool local, bool imported)
void addIncludedByDependency (FileDef *fd, const char *incName, bool local, bool imported)
QList< IncludeInfo > * includeFileList () const
QList< IncludeInfo > * includedByFileList () const
void addMembersToMemberGroup ()
void distributeMemberGroupDocumentation ()
void findSectionsInDocumentation ()
void addIncludedUsingDirectives ()
void addListReferences ()
bool isDocumentationFile () const
MemberListgetMemberList (MemberList::ListType lt) const
const QList< MemberList > & getMemberLists () const
MemberGroupSDictgetMemberGroupSDict () const
NamespaceSDictgetNamespaceSDict () const
ClassSDictgetClassSDict () const

Public Attributes

bool visited

Protected Member Functions

void acquireFileVersion ()

Friends

class FileName
void generatedFileNames ()

Detailed Description

A File definition.

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 63 of file filedef.h.


Constructor & Destructor Documentation

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

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

Definition at line 62 of file filedef.cpp.

References acquireFileVersion(), Config_getBool, name(), Definition::setReference(), and stripFromPath().

FileDef::~FileDef (  ) 

destroy the file definition

Definition at line 97 of file filedef.cpp.


Member Function Documentation

DefType FileDef::definitionType (  )  const [inline, virtual]

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

Implements DefinitionIntf.

Definition at line 72 of file filedef.h.

References DefinitionIntf::TypeFile.

QCString FileDef::name (  )  const [inline]

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

Reimplemented from Definition.

Definition at line 75 of file filedef.h.

References Config_getBool, and Definition::name().

Referenced by DocSets::addIndexItem(), addListReferences(), MemberNameInfo::compareItems(), MemberName::compareItems(), FileList::compareItems(), FilePairDict::compareItems(), FileDef(), generateDEFForFile(), PerlModGenerator::generatePerlModForFile(), PerlModGenerator::generatePerlModForGroup(), generateSourceFile(), generateXML(), insertMember(), MemberDef::isConstructor(), MemberDef::isDestructor(), isDocumentationFile(), parseFortranCode(), parseVhdlCode(), ClassDef::showUsedFiles(), writeDetailedDocumentation(), writeDirTreeNode(), MemberDef::writeDocumentation(), GroupDef::writeDocumentation(), writeDocumentation(), DirDef::writeDocumentation(), writeFileIndex(), writeGroupTreeNode(), writeMemberPages(), writeSource(), and Definition::writeSourceDef().

QCString FileDef::fileName (  )  const [inline]

Definition at line 83 of file filedef.h.

Referenced by VhdlDocGen::computeVhdlComponentRelations().

QCString FileDef::getOutputFileBase (  )  const [inline, virtual]

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

Implements Definition.

Definition at line 88 of file filedef.h.

References Definition::convertNameToFile().

Referenced by UsedDir::addFileDep(), TagFileParser::addIncludes(), DocSets::addIndexItem(), addListReferences(), DotGroupCollaboration::buildGraph(), LatexGenerator::endIndexSection(), generateDEFForFile(), generateDEFForMember(), generateFileRef(), PerlModGenerator::generatePerlModForClass(), PerlModGenerator::generatePerlModForFile(), MemberDef::getOutputFileBase(), ClassDef::showUsedFiles(), writeDirTreeNode(), GroupDef::writeDocumentation(), writeDocumentation(), DirDef::writeDocumentation(), writeFileIndex(), writeGroupTreeNode(), and writeSource().

QCString FileDef::getFileBase (  )  const [inline]

Definition at line 91 of file filedef.h.

Referenced by DotInclDepGraph::DotInclDepGraph().

QCString FileDef::getSourceFileBase (  )  const [virtual]

Returns the name of the source listing of this file.

Reimplemented from Definition.

Definition at line 1365 of file filedef.cpp.

References Definition::convertNameToFile(), Htags::path2URL(), and Htags::useHtags.

Referenced by parseFortranCode(), parseVhdlCode(), ClassDef::showUsedFiles(), writeDetailedDocumentation(), writeSource(), and Definition::writeSourceDef().

QCString FileDef::includeName (  )  const

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

Definition at line 1378 of file filedef.cpp.

References Definition::convertNameToFile(), Htags::path2URL(), and Htags::useHtags.

Referenced by writeDocumentation(), DirDef::writeDocumentation(), ClassDef::writeDocumentation(), and writeFileIndex().

QCString FileDef::absFilePath (  )  const [inline]

Returns the absolute path including the file name.

Definition at line 100 of file filedef.h.

Referenced by addIncludedByDependency(), addIncludeDependency(), DotInclDepGraph::DotInclDepGraph(), getResolvedClassRec(), DocDotFile::parse(), parseSource(), showFileDefMatches(), Definition::writeInlineCode(), writeSource(), and writeXMLCodeBlock().

QCString FileDef::docName (  )  const [inline]

Returns the name as it is used in the documentation

Definition at line 104 of file filedef.h.

Referenced by DotInclDepGraph::DotInclDepGraph(), PerlModGenerator::generatePerlModForClass(), and ClassDef::writeDocumentation().

void FileDef::addSourceRef ( int  line,
Definition d,
MemberDef md 
)

Definition at line 828 of file filedef.cpp.

Definition * FileDef::getSourceDefinition ( int  lineNr  ) 

Definition at line 842 of file filedef.cpp.

MemberDef * FileDef::getSourceMember ( int  lineNr  ) 

Definition at line 852 of file filedef.cpp.

QCString FileDef::getPath (  )  const [inline]

Returns the absolute path of this file.

Definition at line 114 of file filedef.h.

References FileList::path().

Referenced by TagFileParser::addIncludes(), buildDirectories(), findFileDef(), showFileDefMatches(), ClassDef::showUsedFiles(), writeDocumentation(), and writeFileIndex().

QCString FileDef::getVersion (  )  const [inline]

Returns version of this file.

Definition at line 117 of file filedef.h.

Referenced by ClassDef::showUsedFiles().

bool FileDef::isLinkableInProject (  )  const [inline, virtual]

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

Implements Definition.

Definition at line 119 of file filedef.h.

References Definition::hasDocumentation(), and Definition::isReference().

Referenced by addFileMemberNameToIndex(), countFiles(), LatexGenerator::endIndexSection(), isLinkable(), MemberDef::isLinkableInProject(), LatexGenerator::startIndexSection(), and writeFileIndex().

bool FileDef::isLinkable (  )  const [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.

Implements Definition.

Definition at line 124 of file filedef.h.

References isLinkableInProject(), and Definition::isReference().

Referenced by DocSets::addIndexItem(), generateFileRef(), getDefs(), resolveLink(), ClassDef::showUsedFiles(), DirDef::writeDocumentation(), and writeSource().

bool FileDef::isIncluded ( const QCString &  name  )  const

Definition at line 994 of file filedef.cpp.

bool FileDef::isJava (  )  const [inline]

Definition at line 130 of file filedef.h.

Referenced by getResolvedClass().

void FileDef::writeDetailedDocumentation ( OutputList ol  ) 

Definition at line 157 of file filedef.cpp.

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

Referenced by writeDocumentation().

void FileDef::writeDocumentation ( OutputList ol  ) 

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

Definition at line 217 of file filedef.cpp.

References addGroupListToTitle(), SearchIndex::addWord(), MemberGroup::allMembersInSameSection(), MemberList::allMembersList, Definition::briefDescription(), Definition::briefFile(), Definition::briefLine(), Config_getBool, Config_getString, convertToXML(), SDict< T >::count(), MemberList::decDefineMembers, MemberList::decEnumMembers, MemberList::decFuncMembers, MemberList::decProtoMembers, MemberList::decTypedefMembers, MemberList::decVarMembers, OutputList::disable(), OutputList::disableAllBut(), NamespaceDef::displayName(), OutputList::docify(), OutputList::enableAll(), OutputList::endBold(), endFile(), OutputList::endInclDepGraph(), OutputList::endMemberHeader(), OutputList::endMemberItem(), OutputList::endMemberList(), OutputList::endProjectNumber(), OutputList::endQuickIndices(), OutputList::endTextBlock(), OutputList::endTextLink(), endTitle(), OutputList::endTypewriter(), IncludeInfo::fileDef, found, generateSourceFile(), getDirDef(), getMemberList(), NamespaceDef::getOutputFileBase(), getOutputFileBase(), getPath(), Definition::getReference(), MemberGroup::header(), HLI_FileVisible, OutputGenerator::Html, IncludeInfo::imported, includeName(), IncludeInfo::includeName, OutputList::insertMemberAlign(), Definition::isArtificial(), NamespaceDef::isLinkable(), DotInclDepGraph::isTooBig(), DotInclDepGraph::isTrivial(), SIntDict< MemberGroup >::Iterator, SDict< NamespaceDef >::Iterator, OutputList::lineBreak(), IncludeInfo::local, Definition::localName(), OutputGenerator::Man, Definition::name(), name(), OutputList::newParagraph(), OutputList::parseDoc(), OutputList::parseText(), OutputList::popGeneratorState(), OutputList::pushGeneratorState(), QCString, OutputGenerator::RTF, Doxygen::searchIndex, SearchIndex::setCurrentDoc(), OutputList::startBold(), OutputList::startContents(), startFile(), OutputList::startInclDepGraph(), OutputList::startMemberHeader(), OutputList::startMemberItem(), OutputList::startMemberList(), OutputList::startMemberSections(), OutputList::startProjectNumber(), OutputList::startTextBlock(), OutputList::startTextLink(), startTitle(), OutputList::startTypewriter(), Doxygen::tagFile, theTranslator, Translator::trAuthor(), Translator::trDefines(), Translator::trEnumerations(), Translator::trFileReference(), Translator::trFuncProtos(), VhdlDocGen::trFunctionAndProc(), Translator::trFunctions(), Translator::trGeneratedAutomatically(), Translator::trGotoSourceCode(), Translator::trInclByDepGraph(), Translator::trInclDepGraph(), Translator::trModules(), Translator::trMore(), Translator::trNamespaces(), Translator::trSubprograms(), Translator::trTypedefs(), Translator::trVariables(), ClassSDict::writeDeclaration(), MemberGroup::writeDeclarations(), writeDetailedDocumentation(), Definition::writeDocAnchorsToTagFile(), writeMemberDocumentation(), writeMemberPages(), Definition::writeNavigationPath(), OutputList::writeObjectLink(), OutputList::writeString(), and OutputList::writeSynopsis().

void FileDef::writeMemberDocumentation ( OutputList ol  ) 

Definition at line 566 of file filedef.cpp.

References Config_getBool, OutputList::disable(), MemberList::docDefineMembers, MemberList::docEnumMembers, MemberList::docFuncMembers, MemberList::docProtoMembers, MemberList::docTypedefMembers, MemberList::docVarMembers, OutputGenerator::Html, theTranslator, Translator::trDefineDocumentation(), Translator::trEnumerationTypeDocumentation(), Translator::trFunctionDocumentation(), Translator::trFunctionPrototypeDocumentation(), Translator::trSubprogramDocumentation(), Translator::trTypedefDocumentation(), and Translator::trVariableDocumentation().

Referenced by writeDocumentation().

void FileDef::writeMemberPages ( OutputList ol  ) 

Definition at line 587 of file filedef.cpp.

References OutputList::disableAllBut(), MemberList::documentationLists, OutputGenerator::Html, MemberList::listType(), name(), OutputList::popGeneratorState(), OutputList::pushGeneratorState(), and MemberList::writeDocumentationPage().

Referenced by writeDocumentation().

void FileDef::writeQuickMemberLinks ( OutputList ol,
MemberDef currentMd 
) const [virtual]

Reimplemented from Definition.

Definition at line 605 of file filedef.cpp.

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

void FileDef::writeSource ( OutputList ol  ) 

Write a source listing of this file to the output

Definition at line 649 of file filedef.cpp.

References absFilePath(), Config_getBool, OutputList::disableAllBut(), OutputList::enableAll(), OutputList::endCodeFragment(), OutputList::endContents(), endFile(), OutputList::endQuickIndices(), OutputList::endTextLink(), endTitle(), fileToString(), Definition::getDefFileExtension(), getDirDef(), getOutputFileBase(), ParserManager::getParser(), getSourceFileBase(), HLI_FileVisible, OutputGenerator::Html, isLinkable(), name(), ParserInterface::parseCode(), Doxygen::parserManager, OutputList::parseText(), QCString, ParserInterface::resetCodeParserState(), OutputList::startCodeFragment(), startFile(), OutputList::startTextLink(), startTitle(), theTranslator, Translator::trGotoDocumentation(), Translator::trSourceFile(), and Definition::writeNavigationPath().

void FileDef::parseSource (  ) 

Definition at line 697 of file filedef.cpp.

References absFilePath(), Config_getBool, fileToString(), Definition::getDefFileExtension(), ParserManager::getParser(), ParserInterface::parseCode(), Doxygen::parserManager, and ParserInterface::resetCodeParserState().

void FileDef::insertMember ( MemberDef md  ) 

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

Definition at line 739 of file filedef.cpp.

References MemberList::allMembersList, MemberList::append(), MemberList::decDefineMembers, MemberList::decEnumMembers, MemberList::decFuncMembers, MemberList::decProtoMembers, MemberList::decTypedefMembers, MemberList::decVarMembers, MemberDef::Define, MemberList::docDefineMembers, MemberList::docEnumMembers, MemberList::docFuncMembers, MemberList::docProtoMembers, MemberList::docTypedefMembers, MemberList::docVarMembers, MemberDef::Enumeration, MemberDef::EnumValue, err(), MemberDef::Function, MemberDef::getClassDef(), getMemberList(), Definition::isHidden(), MemberDef::memberType(), name(), ClassDef::name, MemberDef::name, MemberDef::Property, MemberDef::Prototype, MemberDef::Typedef, and MemberDef::Variable.

Referenced by addDefine().

void FileDef::insertClass ( ClassDef cd  ) 

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

Definition at line 797 of file filedef.cpp.

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

void FileDef::insertNamespace ( NamespaceDef nd  ) 

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

Definition at line 811 of file filedef.cpp.

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

void FileDef::computeAnchors (  ) 

Compute the HTML anchor names for all members in the class

Definition at line 113 of file filedef.cpp.

References MemberList::allMembersList, getMemberList(), and setAnchors().

void FileDef::setPackageDef ( PackageDef *  pd  )  [inline]

Definition at line 146 of file filedef.h.

PackageDef* FileDef::packageDef (  )  const [inline]

Definition at line 147 of file filedef.h.

void FileDef::setDirDef ( DirDef dd  )  [inline]

Definition at line 149 of file filedef.h.

Referenced by DirDef::addFile().

DirDef* FileDef::getDirDef (  )  const [inline]

Definition at line 150 of file filedef.h.

Referenced by writeDocumentation(), and writeSource().

void FileDef::addUsingDirective ( NamespaceDef nd  ) 

Definition at line 863 of file filedef.cpp.

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

Referenced by combineUsingRelations().

NamespaceSDict * FileDef::getUsedNamespaces (  )  const

Definition at line 876 of file filedef.cpp.

Referenced by getResolvedClassRec().

void FileDef::addUsingDeclaration ( Definition def  ) 

Definition at line 882 of file filedef.cpp.

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

Referenced by combineUsingRelations().

SDict<Definition>* FileDef::getUsedClasses (  )  const [inline]

Definition at line 155 of file filedef.h.

Referenced by getResolvedClassRec().

void FileDef::combineUsingRelations (  ) 

Definition at line 1287 of file filedef.cpp.

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

bool FileDef::generateSourceFile (  )  const

Definition at line 1000 of file filedef.cpp.

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

Referenced by countFiles(), ClassDef::showUsedFiles(), writeDocumentation(), DirDef::writeDocumentation(), and writeFileIndex().

void FileDef::addIncludeDependency ( FileDef fd,
const char *  incName,
bool  local,
bool  imported 
)

Definition at line 894 of file filedef.cpp.

References absFilePath(), IncludeInfo::fileDef, IncludeInfo::imported, IncludeInfo::includeName, IncludeInfo::local, and QCString.

Referenced by TagFileParser::addIncludes().

void FileDef::addIncludedByDependency ( FileDef fd,
const char *  incName,
bool  local,
bool  imported 
)

Definition at line 971 of file filedef.cpp.

References absFilePath(), IncludeInfo::fileDef, IncludeInfo::imported, IncludeInfo::includeName, IncludeInfo::local, and QCString.

QList<IncludeInfo>* FileDef::includeFileList (  )  const [inline]

Definition at line 162 of file filedef.h.

Referenced by PerlModGenerator::generatePerlModForFile().

QList<IncludeInfo>* FileDef::includedByFileList (  )  const [inline]

Definition at line 163 of file filedef.h.

Referenced by PerlModGenerator::generatePerlModForFile().

void FileDef::addMembersToMemberGroup (  ) 

Definition at line 710 of file filedef.cpp.

References MemberGroup::addToDeclarationSection(), MemberGroup::allMembersInSameSection(), MemberList::declarationLists, SIntDict< MemberGroup >::Iterator, and MemberList::listType().

void FileDef::distributeMemberGroupDocumentation (  ) 

Definition at line 119 of file filedef.cpp.

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

void FileDef::findSectionsInDocumentation (  ) 

Definition at line 133 of file filedef.cpp.

References MemberList::declarationLists, Definition::docFile(), docFindSections(), Definition::documentation(), MemberList::findSectionsInDocumentation(), MemberGroup::findSectionsInDocumentation(), SIntDict< MemberGroup >::Iterator, and MemberList::listType().

void FileDef::addIncludedUsingDirectives (  ) 

Definition at line 917 of file filedef.cpp.

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

Referenced by addIncludedUsingDirectives().

void FileDef::addListReferences (  ) 

Definition at line 1011 of file filedef.cpp.

References MemberList::addListReferences(), MemberGroup::addListReferences(), addRefItem(), MemberList::documentationLists, getOutputFileBase(), SIntDict< MemberGroup >::Iterator, MemberList::listType(), name(), LockingPtr< T >::pointer(), theTranslator, Translator::trFile(), and Definition::xrefListItems().

bool FileDef::isDocumentationFile (  )  const

Definition at line 1327 of file filedef.cpp.

References name().

Referenced by buildDirectories(), countFiles(), and writeFileIndex().

MemberList * FileDef::getMemberList ( MemberList::ListType  lt  )  const

Definition at line 1426 of file filedef.cpp.

References MemberList::listType(), and m_memberLists.

Referenced by computeAnchors(), generateDEFForFile(), PerlModGenerator::generatePerlModForFile(), insertMember(), writeDocumentation(), and writeQuickMemberLinks().

const QList<MemberList>& FileDef::getMemberLists (  )  const [inline]

Definition at line 174 of file filedef.h.

MemberGroupSDict* FileDef::getMemberGroupSDict (  )  const [inline]

Definition at line 177 of file filedef.h.

NamespaceSDict* FileDef::getNamespaceSDict (  )  const [inline]

Definition at line 178 of file filedef.h.

ClassSDict* FileDef::getClassSDict (  )  const [inline]

Definition at line 179 of file filedef.h.

void FileDef::acquireFileVersion (  )  [protected]

Retrieves the file version from version control system.

Definition at line 1334 of file filedef.cpp.

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

Referenced by FileDef().


Friends And Related Function Documentation

friend class FileName [friend]

Definition at line 65 of file filedef.h.

void generatedFileNames (  )  [friend]


Member Data Documentation

bool FileDef::visited

Definition at line 181 of file filedef.h.

Referenced by addIncludedUsingDirectives(), and combineUsingRelations().


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



Generated on Mon Mar 31 10:58:59 2008 by  doxygen 1.5.1