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

#include <definition.h>

Inheritance diagram for Definition:
DefinitionIntf ClassDef DirDef FileDef GroupDef MemberDef NamespaceDef PageDef

Classes

struct  Cookie
 

Public Member Functions

 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
 
virtual QCString displayName (bool includeScope=TRUE) const =0
 
QCString localName () const
 
virtual QCString qualifiedName () const
 
QCString symbolName () const
 
virtual QCString getOutputFileBase () const =0
 
virtual QCString anchor () const =0
 
virtual QCString getSourceFileBase () 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 isLinkableInProject () const =0
 
virtual bool isLinkable () const =0
 
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
 
virtual void writeQuickMemberLinks (OutputList &, MemberDef *) const
 
virtual void writeSummaryLinks (OutputList &)
 
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 ()
 
virtual DefType definitionType () const =0
 

Protected Member Functions

 Definition (const Definition &d)
 

Private Member Functions

void _setSymbolName (const QCString &name)
 
int _getXRefListId (const char *listName) const
 
void _writeSourceRefList (OutputList &ol, const char *scopeName, const QCString &text, MemberSDict *members, bool)
 
void _setBriefDescription (const char *b, const char *briefFile, int briefLine)
 
void _setDocumentation (const char *d, const char *docFile, int docLine, bool stripWhiteSpace, bool atTop)
 
void _setInbodyDocumentation (const char *d, const char *docFile, int docLine)
 
bool _docsAlreadyAdded (const QCString &doc, QCString &sigList)
 

Static Private Member Functions

static void addToMap (const char *name, Definition *d)
 
static void removeFromMap (Definition *d)
 

Private Attributes

DefinitionImplm_impl
 
QCString m_name
 
bool m_isSymbol
 
QCString m_symbolName
 
int m_defLine
 
int m_defColumn
 
Cookiem_cookie
 

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

The common base class of all entity definitions found in the sources.

This can be a class or a member function, or a file, or a namespace, etc. Use definitionType() to find which type of definition this is.

Definition at line 92 of file definition.h.

Constructor & Destructor Documentation

Definition::Definition ( const char *  defFileName,
int  defLine,
int  defColumn,
const char *  name,
const char *  b = 0,
const char *  d = 0,
bool  isSymbol = TRUE 
)

Create a new definition

Definition at line 283 of file definition.cpp.

References _setBriefDescription(), _setDocumentation(), addToMap(), DefinitionImpl::hidden, DefinitionImpl::init(), m_defColumn, m_defLine, m_impl, m_isSymbol, m_name, matchExcludedSymbols(), and name().

: m_cookie(0)
{
m_defLine = dl;
m_isSymbol = isSymbol;
if (isSymbol) addToMap(name,this);
_setDocumentation(d,df,dl,TRUE,FALSE);
{
m_impl->hidden = TRUE;
}
}
Definition::~Definition ( )
virtual

Destroys the definition

Definition at line 381 of file definition.cpp.

References m_cookie, m_impl, m_isSymbol, and removeFromMap().

{
{
}
if (m_impl)
{
delete m_impl;
m_impl=0;
}
delete m_cookie;
}
Definition::Definition ( const Definition d)
protected

Definition at line 302 of file definition.cpp.

References addToMap(), SDict< T >::append(), DefinitionImpl::body, DefinitionImpl::brief, DefinitionImpl::details, DefinitionImpl::inbodyDocs, SDict< MemberDef >::IteratorDict, SectionInfo::label, m_defLine, m_impl, m_isSymbol, m_name, makePartOfGroup(), DefinitionImpl::partOfGroups, DefinitionImpl::sectionDict, setRefItems(), DefinitionImpl::sourceRefByDict, DefinitionImpl::sourceRefsDict, and DefinitionImpl::xrefListItems.

{
*m_impl = *d.m_impl;
m_impl->brief = 0;
m_impl->body = 0;
{
for (it.toFirst();(si=it.current());++it)
{
}
}
{
MemberDef *md;
for (it.toFirst();(md=it.current());++it)
{
m_impl->sourceRefByDict->append(it.currentKey(),md);
}
}
{
MemberDef *md;
for (it.toFirst();(md=it.current());++it)
{
m_impl->sourceRefsDict->append(it.currentKey(),md);
}
}
{
GroupDef *gd;
for (it.toFirst();(gd=it.current());++it)
{
}
}
{
}
if (d.m_impl->brief)
{
}
if (d.m_impl->details)
{
}
if (d.m_impl->body)
{
}
{
}
}

Member Function Documentation

bool Definition::_docsAlreadyAdded ( const QCString &  doc,
QCString &  sigList 
)
private

Definition at line 544 of file definition.cpp.

Referenced by _setBriefDescription(), and _setDocumentation().

{
uchar md5_sig[16];
QCString sigStr(33);
// to avoid mismatches due to differences in indenting, we first remove
// double whitespaces...
QCString docStr = doc.simplifyWhiteSpace();
MD5Buffer((const unsigned char *)docStr.data(),docStr.length(),md5_sig);
MD5SigToString(md5_sig,sigStr.rawData(),33);
//printf("%s:_docsAlreadyAdded doc='%s' sig='%s' docSigs='%s'\n",
// name().data(),doc.data(),sigStr.data(),sigList.data());
if (sigList.find(sigStr)==-1) // new docs, add signature to prevent re-adding it
{
sigList+=":"+sigStr;
return FALSE;
}
else
{
return TRUE;
}
}
int Definition::_getXRefListId ( const char *  listName) const
private

Definition at line 1489 of file definition.cpp.

References ListItemInfo::itemId, m_impl, ListItemInfo::type, and DefinitionImpl::xrefListItems.

Referenced by mergeRefItems().

{
{
QListIterator<ListItemInfo> slii(*m_impl->xrefListItems);
for (slii.toFirst();(lii=slii.current());++slii)
{
if (qstrcmp(lii->type,listName)==0)
{
return lii->itemId;
}
}
}
return -1;
}
void Definition::_setBriefDescription ( const char *  b,
const char *  briefFile,
int  briefLine 
)
private

Definition at line 632 of file definition.cpp.

References _docsAlreadyAdded(), _setDocumentation(), DefinitionImpl::brief, brief, briefFile(), briefLine(), DefinitionImpl::briefSignatures, Config_getEnum, BriefInfo::doc, BriefInfo::file, lastCharIsMultibyte(), BriefInfo::line, m_impl, and uni_isupper.

Referenced by Definition(), and setBriefDescription().

{
static QCString outputLanguage = Config_getEnum(OUTPUT_LANGUAGE);
static bool needsDot = outputLanguage!="Japanese" &&
outputLanguage!="Chinese" &&
outputLanguage!="Korean";
QCString brief = b;
brief = brief.stripWhiteSpace();
if (brief.isEmpty()) return;
int bl = brief.length();
if (bl>0 && needsDot) // add punctuation if needed
{
int c = brief.at(bl-1);
switch(c)
{
case '.': case '!': case '?': case '>': case ':': case ')': break;
default:
if (uni_isupper(brief.at(0)) && !lastCharIsMultibyte(brief)) brief+='.';
break;
}
}
{
if (m_impl->brief && !m_impl->brief->doc.isEmpty())
{
//printf("adding to details\n");
}
else
{
//fprintf(stderr,"Definition::setBriefDescription(%s,%s,%d)\n",b,briefFile,briefLine);
if (m_impl->brief==0)
{
}
if (briefLine!=-1)
{
}
else
{
m_impl->brief->line = 1;
}
}
}
else
{
//printf("do nothing!\n");
}
}
void Definition::_setDocumentation ( const char *  d,
const char *  docFile,
int  docLine,
bool  stripWhiteSpace,
bool  atTop 
)
private

Definition at line 566 of file definition.cpp.

References _docsAlreadyAdded(), DefinitionImpl::details, DocInfo::doc, doc, docFile(), docLine(), DefinitionImpl::docSignatures, DocInfo::file, DocInfo::line, m_impl, and stripLeadingAndTrailingEmptyLines().

Referenced by _setBriefDescription(), Definition(), and setDocumentation().

{
//printf("%s::setDocumentation(%s,%s,%d,%d)\n",name().data(),d,docFile,docLine,stripWhiteSpace);
if (d==0) return;
QCString doc = d;
if (stripWhiteSpace)
{
}
else // don't strip whitespace
{
doc=d;
}
{
//printf("setting docs for %s: `%s'\n",name().data(),m_doc.data());
if (m_impl->details==0)
{
}
if (m_impl->details->doc.isEmpty()) // fresh detailed description
{
}
else if (atTop) // another detailed description, append it to the start
{
m_impl->details->doc = doc+"\n\n"+m_impl->details->doc;
}
else // another detailed description, append it to the end
{
m_impl->details->doc += "\n\n"+doc;
}
if (docLine!=-1) // store location if valid
{
}
else
{
}
}
}
void Definition::_setInbodyDocumentation ( const char *  d,
const char *  docFile,
int  docLine 
)
private

Definition at line 693 of file definition.cpp.

References DocInfo::doc, doc, DocInfo::file, DefinitionImpl::inbodyDocs, inbodyFile(), inbodyLine(), DocInfo::line, and m_impl.

Referenced by setInbodyDocumentation().

{
if (m_impl->inbodyDocs==0)
{
}
if (m_impl->inbodyDocs->doc.isEmpty()) // fresh inbody docs
{
}
else // another inbody documentation fragment, append this to the end
{
m_impl->inbodyDocs->doc += QCString("\n\n")+doc;
}
}
void Definition::_setSymbolName ( const QCString &  name)
private

Definition at line 1940 of file definition.cpp.

References m_symbolName, and name().

Referenced by addToMap().

void Definition::_writeSourceRefList ( OutputList ol,
const char *  scopeName,
const QCString &  text,
MemberSDict members,
bool   
)
private

Write a reference to the source code fragments in which this definition is used.

Definition at line 1143 of file definition.cpp.

References MemberDef::anchor(), SDict< T >::at(), Config_getBool, SDict< T >::count(), OutputList::disable(), OutputList::docify(), OutputList::endParagraph(), getBodyDef(), getLanguageSpecificSeparator(), MemberDef::getOutputFileBase(), MemberDef::getReference(), MemberDef::getScopeString(), FileDef::getSourceFileBase(), getStartBodyLine(), OutputGenerator::Html, MemberDef::isFunction(), MemberDef::isLinkable(), MemberDef::isObjCMethod(), MemberDef::isPrototype(), MemberDef::isSignal(), MemberDef::isSlot(), DefinitionImpl::lang, OutputGenerator::Latex, m_impl, OutputGenerator::Man, name(), OutputList::parseText(), OutputList::popGeneratorState(), OutputList::pushGeneratorState(), OutputGenerator::RTF, SDict< T >::sort(), OutputList::startParagraph(), theTranslator, Translator::trWriteList(), OutputList::writeObjectLink(), and OutputList::writeString().

Referenced by writeSourceReffedBy(), and writeSourceRefs().

{
static bool latexSourceCode = Config_getBool(LATEX_SOURCE_CODE);
static bool rtfSourceCode = Config_getBool(RTF_SOURCE_CODE);
static bool sourceBrowser = Config_getBool(SOURCE_BROWSER);
static bool refLinkSource = Config_getBool(REFERENCES_LINK_SOURCE);
if (members)
{
members->sort();
ol.parseText(text);
ol.docify(" ");
QCString ldefLine=theTranslator->trWriteList(members->count());
QRegExp marker("@[0-9]+");
int index=0,newIndex,matchLen;
// now replace all markers in inheritLine with links to the classes
while ((newIndex=marker.match(ldefLine,index,&matchLen))!=-1)
{
bool ok;
ol.parseText(ldefLine.mid(index,newIndex-index));
uint entryIndex = ldefLine.mid(newIndex+1,matchLen-1).toUInt(&ok);
MemberDef *md=members->at(entryIndex);
if (ok && md)
{
QCString scope=md->getScopeString();
QCString name=md->name();
//printf("class=%p scope=%s scopeName=%s\n",md->getClassDef(),scope.data(),scopeName);
if (!scope.isEmpty() && scope!=scopeName)
{
name.prepend(scope+getLanguageSpecificSeparator(m_impl->lang));
}
if (!md->isObjCMethod() &&
(md->isFunction() || md->isSlot() ||
md->isPrototype() || md->isSignal()
)
)
{
name+="()";
}
//Definition *d = md->getOutputFileBase();
//if (d==Doxygen::globalScope) d=md->getBodyDef();
if (sourceBrowser &&
!(md->isLinkable() && !refLinkSource) &&
md->getStartBodyLine()!=-1 &&
md->getBodyDef()
)
{
//printf("md->getBodyDef()=%p global=%p\n",md->getBodyDef(),Doxygen::globalScope);
// for HTML write a real link
//ol.disableAllBut(OutputGenerator::Html);
if (!latexSourceCode)
{
}
if (!rtfSourceCode)
{
}
const int maxLineNrStr = 10;
char anchorStr[maxLineNrStr];
qsnprintf(anchorStr,maxLineNrStr,"l%05d",md->getStartBodyLine());
//printf("Write object link to %s\n",md->getBodyDef()->getSourceFileBase().data());
// for the other output formats just mention the name
if (latexSourceCode)
{
}
if (rtfSourceCode)
{
}
ol.docify(name);
}
else if (md->isLinkable() /*&& d && d->isLinkable()*/)
{
// for HTML write a real link
//ol.disableAllBut(OutputGenerator::Html);
if (!latexSourceCode)
{
}
if (!rtfSourceCode)
{
}
md->anchor(),name);
// for the other output formats just mention the name
if (latexSourceCode)
{
}
if (rtfSourceCode)
{
}
ol.docify(name);
}
else
{
ol.docify(name);
}
}
index=newIndex+matchLen;
}
ol.parseText(ldefLine.right(ldefLine.length()-index));
ol.writeString(".");
}
}
void Definition::addInnerCompound ( Definition d)
virtual

Reimplemented in ClassDef, NamespaceDef, and PageDef.

Definition at line 1370 of file definition.cpp.

References err().

Referenced by buildNamespaceList(), buildScopeFromQualifiedName(), createTagLessInstance(), and resolveClassNestingRelations().

{
err("Definition::addInnerCompound() called\n");
}
void Definition::addSectionsToDefinition ( QList< SectionInfo > *  anchorList)

Add the list of anchors that mark the sections that are found in the documentation.

Definition at line 418 of file definition.cpp.

References SDict< T >::append(), SectionInfo::definition, SDict< T >::find(), SectionInfo::label, m_impl, DefinitionImpl::sectionDict, and Doxygen::sectionDict.

Referenced by addClassToContext(), addEnumValuesToEnums(), addInterfaceOrServiceToServiceOrSingleton(), addMemberDocs(), addMethodToClass(), addRelatedPage(), addVariableToClass(), addVariableToFile(), buildExampleList(), buildFileList(), buildFunctionList(), buildGroupListFiltered(), buildNamespaceList(), findDefineDocumentation(), findEnumDocumentation(), findEnums(), findMainPage(), findMainPageTagFiles(), findMember(), findUsingDeclImports(), and findUsingDirectives().

{
if (!anchorList) return;
//printf("%s: addSectionsToDefinition(%d)\n",name().data(),anchorList->count());
QListIterator<SectionInfo> it(*anchorList);
for (;(si=it.current());++it)
{
//printf("Add section `%s' to definition `%s'\n",
// si->label.data(),name().data());
//printf("===== label=%s gsi=%p\n",si->label.data(),gsi);
if (gsi==0)
{
gsi = new SectionInfo(*si);
}
{
}
if (m_impl->sectionDict->find(gsi->label)==0)
{
gsi->definition = this;
}
}
}
void Definition::addSectionsToIndex ( )

Definition at line 467 of file definition.cpp.

References IndexList::addContentsItem(), IndexList::decContentsDepth(), getOutputFileBase(), getReference(), IndexList::incContentsDepth(), Doxygen::indexList, SectionInfo::label, m_impl, SectionInfo::Paragraph, SectionInfo::Section, DefinitionImpl::sectionDict, SectionInfo::Subsection, SectionInfo::Subsubsection, SectionInfo::title, and SectionInfo::type.

Referenced by writePages().

{
if (m_impl->sectionDict==0) return;
//printf("Definition::addSectionsToIndex()\n");
int level=1;
for (li.toFirst();(si=li.current());++li)
{
{
//printf(" level=%d title=%s\n",level,si->title.data());
int nextLevel = (int)si->type;
int i;
if (nextLevel>level)
{
for (i=level;i<nextLevel;i++)
{
}
}
else if (nextLevel<level)
{
for (i=nextLevel;i<level;i++)
{
}
}
QCString title = si->title;
if (title.isEmpty()) title = si->label;
// determine if there is a next level inside this item
++li;
bool isDir = ((li.current()) ? (int)(li.current()->type > nextLevel):FALSE);
--li;
si->label,
FALSE,
TRUE);
level = nextLevel;
}
}
while (level>1)
{
level--;
}
}
void Definition::addSourceReferencedBy ( MemberDef d)

Definition at line 1319 of file definition.cpp.

References SDict< T >::append(), SDict< T >::find(), MemberDef::getScopeString(), m_impl, name(), and DefinitionImpl::sourceRefByDict.

Referenced by addDocCrossReference(), and transferFunctionReferences().

{
if (md)
{
QCString name = md->name();
QCString scope = md->getScopeString();
if (!scope.isEmpty())
{
name.prepend(scope+"::");
}
{
}
if (m_impl->sourceRefByDict->find(name)==0)
{
}
}
}
void Definition::addSourceReferences ( MemberDef d)

Definition at line 1342 of file definition.cpp.

References SDict< T >::append(), SDict< T >::find(), MemberDef::getScopeString(), m_impl, name(), and DefinitionImpl::sourceRefsDict.

Referenced by addDocCrossReference(), and transferFunctionReferences().

{
if (md)
{
QCString name = md->name();
QCString scope = md->getScopeString();
if (!scope.isEmpty())
{
name.prepend(scope+"::");
}
{
}
if (m_impl->sourceRefsDict->find(name)==0)
{
}
}
}
void Definition::addToMap ( const char *  name,
Definition d 
)
staticprivate

Definition at line 207 of file definition.cpp.

References _setSymbolName(), computeQualifiedIndex(), Config_getBool, DefinitionIntf::definitionType(), name(), SDict_primes, Doxygen::symbolMap, symbolName(), and DefinitionIntf::TypeSymbolList.

Referenced by Definition().

{
bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
QCString symbolName = name;
int index=computeQualifiedIndex(symbolName);
if (!vhdlOpt && index!=-1) symbolName=symbolName.mid(index+2);
if (!symbolName.isEmpty())
{
//printf("******* adding symbol `%s' (%p)\n",symbolName.data(),d);
DefinitionIntf *di=Doxygen::symbolMap->find(symbolName);
//printf(" addToMap(%p): looking for symbol %s: %p\n",d,symbolName.data(),di);
if (di==0) // new Symbol
{
//printf(" new symbol!\n");
Doxygen::symbolMap->insert(symbolName,d);
}
else // existing symbol
{
//printf(" existing symbol: ");
if (di->definitionType()==DefinitionIntf::TypeSymbolList) // already multiple symbols
{
//printf("adding to exiting list\n");
dl->append(d);
}
else // going from one to two symbols
{
Doxygen::symbolMap->take(symbolName);
//printf("replacing symbol by list %p with elements %p and %p\n",dl,di,d);
dl->append((Definition*)di);
dl->append(d);
Doxygen::symbolMap->insert(symbolName,dl);
}
}
// auto resize if needed
static int sizeIndex=9;
if (Doxygen::symbolMap->size()>SDict_primes[sizeIndex])
{
Doxygen::symbolMap->resize(SDict_primes[++sizeIndex]);
}
d->_setSymbolName(symbolName);
}
}
virtual QCString Definition::anchor ( ) const
pure virtual
QCString Definition::briefDescription ( bool  abbreviate = FALSE) const
virtual

Returns the brief description of this definition. This can include commands.

Reimplemented in MemberDef.

Definition at line 1756 of file definition.cpp.

References abbreviate(), DefinitionImpl::brief, displayName(), BriefInfo::doc, and m_impl.

Referenced by DefinitionContext< FileContext::Private >::brief(), NestingNodeContext::Private::brief(), MemberDef::briefDescription(), buildFileList(), createTagLessInstance(), findDocsForMemberOrCompound(), generateBriefDoc(), generateDEFForClass(), generateDEFForFile(), generateDEFForNamespace(), generateDocbookForClass(), generateDocbookForDir(), generateDocbookForFile(), generateDocbookForGroup(), generateDocbookForNamespace(), PerlModGenerator::generatePerlModForClass(), PerlModGenerator::generatePerlModForFile(), PerlModGenerator::generatePerlModForGroup(), PerlModGenerator::generatePerlModForNamespace(), generateXMLForClass(), generateXMLForDir(), generateXMLForFile(), generateXMLForGroup(), generateXMLForNamespace(), hasBriefDescription(), DirDef::hasDetailedDescription(), NamespaceDef::hasDetailedDescription(), GroupDef::hasDetailedDescription(), ClassDef::hasDetailedDescription(), FileDef::hasDetailedDescription(), writeAnnotatedClassList(), DirDef::writeBriefDescription(), NamespaceDef::writeBriefDescription(), GroupDef::writeBriefDescription(), FileDef::writeBriefDescription(), ClassDef::writeBriefDescription(), NamespaceSDict::writeDeclaration(), ClassDef::writeDeclarationLink(), DirDef::writeDetailedDescription(), NamespaceDef::writeDetailedDescription(), GroupDef::writeDetailedDescription(), FileDef::writeDetailedDescription(), ClassDef::writeDetailedDocumentationBody(), GroupDef::writeDirs(), DirDef::writeFileList(), GroupDef::writeFiles(), writeInnerClasses(), writeNamespaceIndex(), GroupDef::writeNestedGroups(), writeSingleFileIndex(), DirDef::writeSubDirList(), and writeVhdlEntityToolTip().

{
//printf("%s::briefDescription(%d)='%s'\n",name().data(),abbr,m_impl->brief?m_impl->brief->doc.data():"<none>");
return m_impl->brief ?
QCString("");
}
QCString Definition::briefDescriptionAsTooltip ( ) const

Returns a plain text version of the brief description suitable for use as a tool tip.

Definition at line 1764 of file definition.cpp.

References DefinitionImpl::brief, DefinitionIntf::definitionType(), BriefInfo::doc, BriefInfo::file, getOuterScope(), BriefInfo::line, m_impl, parseCommentAsText(), BriefInfo::tooltip, and DefinitionIntf::TypeMember.

Referenced by DotClassGraph::addClass(), DotGfxHierarchyTable::addClassList(), DotGfxHierarchyTable::addHierarchy(), DotInclDepGraph::buildGraph(), DotCallGraph::buildGraph(), DotGroupCollaboration::buildGraph(), DotClassGraph::DotClassGraph(), handleLinkedWord(), writeColumn(), writeMapArea(), DocSets::writeToken(), and TooltipManager::writeTooltips().

{
if (m_impl->brief)
{
if (m_impl->brief->tooltip.isEmpty() && !m_impl->brief->doc.isEmpty())
{
static bool reentering=FALSE;
if (!reentering)
{
const Definition *scope = definitionType()==TypeMember ? getOuterScope() : this;
reentering=TRUE; // prevent requests for tooltips while parsing a tooltip
scope,md,
reentering=FALSE;
}
}
return m_impl->brief->tooltip;
}
return QCString("");
}
QCString Definition::briefFile ( ) const

Returns the file in which the brief description was found. This can differ from getDefFileName().

Definition at line 1794 of file definition.cpp.

References DefinitionImpl::brief, BriefInfo::file, m_impl, and m_name.

Referenced by _setBriefDescription(), MemberDef::_writeEnumValues(), ClassDef::addMembersToTemplateInstance(), DefinitionContext< FileContext::Private >::brief(), NestingNodeContext::Private::brief(), combineDeclarationAndDefinition(), createTagLessInstance(), MemberGroup::distributeMemberGroupDocumentation(), findFriends(), findUsingDeclImports(), generateBriefDoc(), generateDocbookForClass(), generateDocbookForDir(), generateDocbookForFile(), generateDocbookForGroup(), generateDocbookForNamespace(), generateXMLForClass(), generateXMLForDir(), generateXMLForFile(), generateXMLForGroup(), generateXMLForMember(), generateXMLForNamespace(), inheritDocumentation(), writeAnnotatedClassList(), DirDef::writeBriefDescription(), NamespaceDef::writeBriefDescription(), GroupDef::writeBriefDescription(), FileDef::writeBriefDescription(), ClassDef::writeBriefDescription(), NamespaceSDict::writeDeclaration(), MemberDef::writeDeclaration(), ClassDef::writeDeclarationLink(), DirDef::writeDetailedDescription(), NamespaceDef::writeDetailedDescription(), GroupDef::writeDetailedDescription(), FileDef::writeDetailedDescription(), ClassDef::writeDetailedDocumentationBody(), GroupDef::writeDirs(), MemberDef::writeDocumentation(), DirDef::writeFileList(), GroupDef::writeFiles(), MemberDef::writeMemberDocSimple(), writeNamespaceIndex(), GroupDef::writeNestedGroups(), MemberList::writePlainDeclarations(), writeSingleFileIndex(), DirDef::writeSubDirList(), and VhdlDocGen::writeVHDLDeclaration().

{
return m_impl->brief ? m_impl->brief->file : QCString("<"+m_name+">");
}
int Definition::briefLine ( ) const

Returns the line number at which the brief description was found.

Definition at line 1789 of file definition.cpp.

References DefinitionImpl::brief, BriefInfo::line, and m_impl.

Referenced by _setBriefDescription(), MemberDef::_writeEnumValues(), ClassDef::addMembersToTemplateInstance(), DefinitionContext< FileContext::Private >::brief(), NestingNodeContext::Private::brief(), combineDeclarationAndDefinition(), createTagLessInstance(), MemberGroup::distributeMemberGroupDocumentation(), findFriends(), findUsingDeclImports(), formatBriefNote(), generateBriefDoc(), generateDocbookForClass(), generateDocbookForDir(), generateDocbookForFile(), generateDocbookForGroup(), generateDocbookForNamespace(), generateXMLForClass(), generateXMLForDir(), generateXMLForFile(), generateXMLForGroup(), generateXMLForMember(), generateXMLForNamespace(), inheritDocumentation(), writeAnnotatedClassList(), DirDef::writeBriefDescription(), NamespaceDef::writeBriefDescription(), GroupDef::writeBriefDescription(), FileDef::writeBriefDescription(), ClassDef::writeBriefDescription(), NamespaceSDict::writeDeclaration(), MemberDef::writeDeclaration(), ClassDef::writeDeclarationLink(), DirDef::writeDetailedDescription(), NamespaceDef::writeDetailedDescription(), GroupDef::writeDetailedDescription(), FileDef::writeDetailedDescription(), ClassDef::writeDetailedDocumentationBody(), GroupDef::writeDirs(), MemberDef::writeDocumentation(), DirDef::writeFileList(), GroupDef::writeFiles(), MemberDef::writeMemberDocSimple(), writeNamespaceIndex(), GroupDef::writeNestedGroups(), MemberList::writePlainDeclarations(), writeSingleFileIndex(), DirDef::writeSubDirList(), and VhdlDocGen::writeVHDLDeclaration().

{
return m_impl->brief ? m_impl->brief->line : 1;
}
Cookie* Definition::cookie ( ) const
inline
virtual QCString Definition::displayName ( bool  includeScope = TRUE) const
pure virtual
QCString Definition::docFile ( ) const

Returns the file in which the detailed documentation block was found. This can differ from getDefFileName().

Definition at line 1700 of file definition.cpp.

References DefinitionImpl::details, DocInfo::file, m_impl, and m_name.

Referenced by _setDocumentation(), MemberDef::_writeEnumValues(), ClassDef::addMembersToTemplateInstance(), checkArgumentName(), checkPageRelations(), combineDeclarationAndDefinition(), createTagLessInstance(), DefinitionContext< FileContext::Private >::details(), MemberGroup::distributeMemberGroupDocumentation(), ArgumentContext::Private::docs(), PageContext::Private::example(), findFriends(), findMainPage(), PageDef::findSectionsInDocumentation(), NamespaceDef::findSectionsInDocumentation(), GroupDef::findSectionsInDocumentation(), FileDef::findSectionsInDocumentation(), ClassDef::findSectionsInDocumentation(), MemberDef::findSectionsInDocumentation(), findUsingDeclImports(), generateDocbookForClass(), generateDocbookForDir(), generateDocbookForFile(), generateDocbookForGroup(), generateDocbookForMember(), generateDocbookForNamespace(), generateDocbookForPage(), generateDocbookSection(), generateExampleDocs(), PerlModGenerator::generatePerlModForPage(), generateXMLForClass(), generateXMLForDir(), generateXMLForFile(), generateXMLForGroup(), generateXMLForMember(), generateXMLForNamespace(), generateXMLForPage(), generateXMLSection(), inheritDocumentation(), MemberContext::Private::paramDocs(), parseCode(), DirDef::writeDetailedDescription(), NamespaceDef::writeDetailedDescription(), GroupDef::writeDetailedDescription(), FileDef::writeDetailedDescription(), ClassDef::writeDetailedDocumentationBody(), PageDef::writeDocumentation(), MemberDef::writeDocumentation(), writeIndex(), MemberDef::writeMemberDocSimple(), PageDef::writePageDocumentation(), GroupDef::writePageDocumentation(), and writeTypeConstraints().

{
return m_impl->details ? m_impl->details->file : QCString("<"+m_name+">");
}
int Definition::docLine ( ) const

Returns the line number at which the detailed documentation was found.

Definition at line 1695 of file definition.cpp.

References DefinitionImpl::details, DocInfo::line, and m_impl.

Referenced by _setDocumentation(), MemberDef::_writeEnumValues(), ClassDef::addMembersToTemplateInstance(), checkArgumentName(), checkPageRelations(), combineDeclarationAndDefinition(), createTagLessInstance(), DefinitionContext< FileContext::Private >::details(), MemberGroup::distributeMemberGroupDocumentation(), ArgumentContext::Private::docs(), PageContext::Private::example(), findFriends(), findMainPage(), findUsingDeclImports(), generateDocbookForClass(), generateDocbookForDir(), generateDocbookForFile(), generateDocbookForGroup(), generateDocbookForMember(), generateDocbookForNamespace(), generateDocbookForPage(), generateDocbookSection(), generateExampleDocs(), PerlModGenerator::generatePerlModForPage(), generateXMLForClass(), generateXMLForDir(), generateXMLForFile(), generateXMLForGroup(), generateXMLForMember(), generateXMLForNamespace(), generateXMLForPage(), generateXMLSection(), inheritDocumentation(), MemberContext::Private::paramDocs(), DirDef::writeDetailedDescription(), NamespaceDef::writeDetailedDescription(), GroupDef::writeDetailedDescription(), FileDef::writeDetailedDescription(), ClassDef::writeDetailedDocumentationBody(), PageDef::writeDocumentation(), MemberDef::writeDocumentation(), writeIndex(), MemberDef::writeMemberDocSimple(), PageDef::writePageDocumentation(), GroupDef::writePageDocumentation(), and writeTypeConstraints().

{
return m_impl->details ? m_impl->details->line : 1;
}
QCString Definition::documentation ( ) const
virtual

Returns the detailed description of this definition

Reimplemented in MemberDef.

Definition at line 1690 of file definition.cpp.

References DefinitionImpl::details, DocInfo::doc, and m_impl.

Referenced by buildFileList(), createTagLessInstance(), DefinitionContext< FileContext::Private >::details(), MemberDef::documentation(), findDocsForMemberOrCompound(), PageDef::findSectionsInDocumentation(), GroupDef::findSectionsInDocumentation(), NamespaceDef::findSectionsInDocumentation(), FileDef::findSectionsInDocumentation(), ClassDef::findSectionsInDocumentation(), generateDEFForClass(), generateDEFForFile(), generateDEFForNamespace(), generateDocbookForClass(), generateDocbookForDir(), generateDocbookForFile(), generateDocbookForGroup(), generateDocbookForNamespace(), generateDocbookForPage(), generateExampleDocs(), PerlModGenerator::generatePerlModForClass(), PerlModGenerator::generatePerlModForFile(), PerlModGenerator::generatePerlModForGroup(), PerlModGenerator::generatePerlModForNamespace(), PerlModGenerator::generatePerlModForPage(), generateXMLForClass(), generateXMLForDir(), generateXMLForFile(), generateXMLForGroup(), generateXMLForNamespace(), generateXMLForPage(), DirDef::hasDetailedDescription(), NamespaceDef::hasDetailedDescription(), GroupDef::hasDetailedDescription(), ClassDef::hasDetailedDescription(), FileDef::hasDetailedDescription(), DirDef::writeBriefDescription(), GroupDef::writeBriefDescription(), FileDef::writeBriefDescription(), DirDef::writeDetailedDescription(), NamespaceDef::writeDetailedDescription(), GroupDef::writeDetailedDescription(), FileDef::writeDetailedDescription(), ClassDef::writeDetailedDocumentationBody(), PageDef::writePageDocumentation(), and GroupDef::writePageDocumentation().

{
return m_impl->details ? m_impl->details->doc : QCString("");
}
QCString Definition::externalReference ( const QCString &  relPath) const

Convenience method to return a resolved external link

Definition at line 1951 of file definition.cpp.

References getReference(), and Doxygen::tagDestinationDict.

Referenced by DefinitionContext< FileContext::Private >::externalReference(), NestingNodeContext::Private::externalReference(), and NavPathElemContext::Private::externalReference().

{
QCString ref = getReference();
if (!ref.isEmpty())
{
QCString *dest = Doxygen::tagDestinationDict[ref];
if (dest)
{
QCString result = *dest;
int l = result.length();
if (!relPath.isEmpty() && l>0 && result.at(0)=='.')
{ // relative path -> prepend relPath.
result.prepend(relPath);
l+=relPath.length();
}
if (l>0 && result.at(l-1)!='/') result+='/';
return result;
}
}
return relPath;
}
Definition * Definition::findInnerCompound ( const char *  name)
virtual

Reimplemented in ClassDef, and NamespaceDef.

Definition at line 1365 of file definition.cpp.

Referenced by findScopeFromQualifiedName(), followPath(), and resolveTypeDef().

{
return 0;
}
FileDef * Definition::getBodyDef ( ) const
int Definition::getDefColumn ( ) const
inline

returns the column number at which the definition was found

Definition at line 191 of file definition.h.

References m_defColumn.

Referenced by ClassDef::addTypeConstraint(), createTagLessInstance(), MemberDef::createTemplateInstanceMember(), findUsedClassesForClass(), generateXMLForClass(), generateXMLForMember(), and generateXMLForNamespace().

{ return m_defColumn; }
QCString Definition::getDefFileExtension ( ) const
QCString Definition::getDefFileName ( ) const
int Definition::getDefLine ( ) const
inline
int Definition::getEndBodyLine ( ) const
SrcLangExt Definition::getLanguage ( ) const

Returns the programming language this definition was written in.

Definition at line 1914 of file definition.cpp.

References DefinitionImpl::lang, and m_impl.

Referenced by MemberDef::_computeIsConstructor(), MemberDef::_computeIsDestructor(), MemberDef::_writeGroupInclude(), ClassDef::addClassAttributes(), ClassListContext::Private::addClasses(), NestingNodeContext::Private::addClasses(), NestingContext::Private::addClasses(), NestingContext::Private::addClassHierarchy(), DotGfxHierarchyTable::addClassList(), NestingContext::Private::addDerivedClasses(), DocSets::addIndexItem(), ClassContext::Private::additionalInheritedMembers(), MemberDef::addListReference(), NamespaceDef::addListReferences(), ClassDef::addListReferences(), addMethodToClass(), NamespaceDef::addNamespaceAttributes(), ClassDef::addTypeConstraint(), addVariableToClass(), addVariableToFile(), buildFunctionList(), DotCallGraph::buildGraph(), buildNamespaceList(), checkArgumentName(), checkUndocumentedParams(), classHasVisibleChildren(), NamespaceDef::compoundTypeString(), ClassDef::compoundTypeString(), ClassDef::countMemberDeclarations(), createTagLessInstance(), NamespaceContext::Private::detailedFunctions(), FileContext::Private::detailedFunctions(), ModuleContext::Private::detailedFunctions(), detectNoDocumentedParams(), MemberDef::displayDefinition(), NamespaceDef::displayName(), ClassDef::displayName(), DocRef::DocRef(), DotCallGraph::DotCallGraph(), findClassWithinClassContext(), findScopeFromQualifiedName(), findUsedClassesForClass(), findUsingDirectives(), NamespaceContext::Private::functions(), FileContext::Private::functions(), ModuleContext::Private::functions(), ClassDef::generatedFromFiles(), generateLink(), generateXMLForClass(), generateXMLForFile(), generateXMLForNamespace(), MemberDef::getLabels(), getResolvedClass(), ClassDef::getTitleForMemberListType(), MemberContext::Private::handleNameWithContextFor(), ClassContext::Private::includeInfo(), FileContext::Private::includeList(), ClassDef::includeStatement(), ClassDef::internalInsertMember(), ClassDef::isCSharp(), NamespaceDef::isLinkableInProject(), ClassDef::isObjectiveC(), DefinitionContext< FileContext::Private >::language(), ClassIndexContext::Private::list(), ClassDef::mergeMembers(), parseCode(), FileDef::parseSource(), ClassContext::Private::publicMethods(), ClassContext::Private::publicStaticMethods(), MemberDef::qualifiedName(), qualifiedName(), ClassDef::qualifiedNameWithTemplateParameters(), resolveClassNestingRelations(), SymbolContext::Private::scope(), SearchIndex::setCurrentDoc(), NamespaceDef::title(), ClassDef::title(), GroupDef::updateLanguage(), validatingParseDoc(), MemberDef::warnIfUndocumented(), ClassDef::writeAdditionalInheritedMembers(), writeAlphabeticalClassList(), writeAnnotatedClassList(), DotNode::writeBox(), writeClassTree(), writeClassTreeForList(), NamespaceSDict::writeDeclaration(), MemberDef::writeDeclaration(), ClassDef::writeDeclarationLink(), writeDefArgumentList(), ClassDef::writeDetailedDocumentationBody(), NamespaceDef::writeDocumentation(), GroupDef::writeDocumentation(), DirDef::writeDocumentation(), FileDef::writeDocumentation(), MemberDef::writeDocumentation(), ClassDef::writeDocumentationContents(), FileDef::writeIncludeFiles(), ClassDef::writeIncludeFiles(), ClassDef::writeInlineDocumentation(), writeJavascriptSearchIndex(), MemberDef::writeLink(), ClassDef::writeMemberDeclarations(), ClassDef::writeMemberList(), writeMemberReference(), writeNamespaceIndex(), writeNamespaceTree(), PageDef::writePageDocumentation(), FileDef::writeSource(), NamespaceDef::writeSummaryLinks(), GroupDef::writeSummaryLinks(), FileDef::writeSummaryLinks(), ClassDef::writeSummaryLinks(), MemberList::writeTagFile(), and FileDef::writeTagFile().

{
return m_impl->lang;
}
Definition * Definition::getOuterScope ( ) const
virtual

Definition at line 1894 of file definition.cpp.

References m_impl, and DefinitionImpl::outerScope.

Referenced by MemberDef::_writeEnumValues(), accessibleViaUsingNamespace(), NestingContext::Private::addClasses(), NestingContext::Private::addDirs(), addEnumValuesToEnums(), MemberDef::addListReference(), addMemberDocs(), addMembersToIndex(), NestingContext::Private::addNamespaces(), NestingContext::Private::addPages(), addSourceReferences(), ClassContext::Private::addTemplateDecls(), addVariableToFile(), briefDescriptionAsTooltip(), DotCallGraph::buildGraph(), checkPageRelations(), combineDeclarationAndDefinition(), computeMemberRelations(), createLinkedText(), createTagLessInstance(), DotCallGraph::DotCallGraph(), dumpSymbol(), DefinitionContext< FileContext::Private >::fillPath(), findFriends(), findGlobalMember(), VhdlDocGen::findMember(), findMember(), findMembersWithSpecificName(), findTagLessClasses(), findUsingDirectives(), generateClassList(), generateDocbookForMember(), PerlModGenerator::generatePerlModForMember(), generateXMLForMember(), getDefs(), ClassDef::getOutputFileBase(), getResolvedSymbol(), ClassDef::getTemplateParameterLists(), DocPara::handleInheritDoc(), PageDef::hasParentPage(), GroupDef::insertMember(), ClassDef::insertTemplateInstance(), isAccessibleFrom(), isAccessibleFromWithExpScope(), ClassDef::isEmbeddedInOuterScope(), MemberContext::Private::labels(), linkifyText(), ClassDef::mergeMembers(), DefinitionContext< FileContext::Private >::navigationPath(), navigationPathAsString(), newResolveTypedef(), DocCopy::parse(), ClassDef::qualifiedNameWithTemplateParameters(), resolveRef(), resolveTypeDef(), SymbolContext::Private::scope(), scopeIsTemplate(), searchTemplateSpecs(), transferFunctionReferences(), transferRelatedFunctionDocumentation(), writeClassTree(), MemberDef::writeDeclaration(), writeDirHierarchy(), NamespaceDef::writeDocumentation(), PageDef::writeDocumentation(), ClassDef::writeDocumentation(), writeIndex(), writeJavascriptSearchIndex(), MemberDef::writeMemberDocSimple(), ClassDef::writeMemberList(), writeNamespaceTree(), writePageIndex(), and VhdlDocGen::writeVHDLDeclaration().

{
return m_impl->outerScope;
}
virtual QCString Definition::getOutputFileBase ( ) const
pure virtual
QCString Definition::getReference ( ) const
virtual
MemberSDict * Definition::getReferencedByMembers ( ) const
MemberSDict * Definition::getReferencesMembers ( ) const
QCString Definition::getSourceAnchor ( ) const
virtual

Returns the anchor of the source listing of this definition.

Definition at line 899 of file definition.cpp.

References DefinitionImpl::body, m_impl, BodyInfo::startLine, and Htags::useHtags.

Referenced by DefinitionContext< T >::Cachable< NamespaceContext::Private >::Cachable(), writeSourceDef(), and TooltipManager::writeTooltips().

{
const int maxAnchorStrLen = 20;
char anchorStr[maxAnchorStrLen];
anchorStr[0]='\0';
if (m_impl->body && m_impl->body->startLine!=-1)
{
{
qsnprintf(anchorStr,maxAnchorStrLen,"L%d",m_impl->body->startLine);
}
else
{
qsnprintf(anchorStr,maxAnchorStrLen,"l%05d",m_impl->body->startLine);
}
}
return anchorStr;
}
QCString Definition::getSourceFileBase ( ) const
virtual

Returns the name of the source listing of this definition.

Reimplemented in ClassDef, and FileDef.

Definition at line 886 of file definition.cpp.

References DefinitionImpl::body, Config_getBool, DefinitionIntf::definitionType(), BodyInfo::fileDef, FileDef::getSourceFileBase(), m_impl, BodyInfo::startLine, and DefinitionIntf::TypeFile.

Referenced by DefinitionContext< T >::Cachable< NamespaceContext::Private >::Cachable(), ClassDef::getSourceFileBase(), DefinitionContext< FileContext::Private >::sourceFileName(), writeSourceDef(), and TooltipManager::writeTooltips().

{
ASSERT(definitionType()!=Definition::TypeFile); // file overloads this method
QCString fn;
static bool sourceBrowser = Config_getBool(SOURCE_BROWSER);
if (sourceBrowser &&
{
}
return fn;
}
int Definition::getStartBodyLine ( ) const
bool Definition::hasBriefDescription ( ) const

returns TRUE if this class has a brief description

Definition at line 1945 of file definition.cpp.

References briefDescription(), and Config_getBool.

Referenced by DefinitionContext< FileContext::Private >::brief(), NestingNodeContext::Private::brief(), MemberDef::isDetailedSectionVisible(), NamespaceDef::writeBriefDescription(), and ClassDef::writeBriefDescription().

{
static bool briefMemberDesc = Config_getBool(BRIEF_MEMBER_DESC);
return !briefDescription().isEmpty() && briefMemberDesc;
}
bool Definition::hasDocumentation ( ) const
virtual

Returns TRUE iff the definition is documented (which could be generated documentation)

See Also
hasUserDocumentation()

Reimplemented in MemberDef, and ClassDef.

Definition at line 1294 of file definition.cpp.

References DefinitionImpl::brief, Config_getBool, DefinitionImpl::details, DocInfo::doc, BriefInfo::doc, DefinitionImpl::inbodyDocs, and m_impl.

Referenced by dirHasVisibleChildren(), ClassDef::hasDocumentation(), MemberDef::hasDocumentation(), NamespaceDef::isLinkableInProject(), FileDef::isLinkableInProject(), NamespaceSDict::writeDeclaration(), GroupDef::writeDirs(), DirDef::writeFileList(), GroupDef::writeFiles(), GroupDef::writeNestedGroups(), and DirDef::writeSubDirList().

{
static bool extractAll = Config_getBool(EXTRACT_ALL);
//static bool sourceBrowser = Config_getBool(SOURCE_BROWSER);
bool hasDocs =
(m_impl->details && !m_impl->details->doc.isEmpty()) || // has detailed docs
(m_impl->brief && !m_impl->brief->doc.isEmpty()) || // has brief description
(m_impl->inbodyDocs && !m_impl->inbodyDocs->doc.isEmpty()) || // has inbody docs
extractAll //|| // extract everything
// (sourceBrowser && m_impl->body &&
// m_impl->body->startLine!=-1 && m_impl->body->fileDef)
; // link to definition
return hasDocs;
}
bool Definition::hasSections ( ) const

Definition at line 447 of file definition.cpp.

References m_impl, SectionInfo::Paragraph, SectionInfo::Section, DefinitionImpl::sectionDict, SectionInfo::Subsection, SectionInfo::Subsubsection, and SectionInfo::type.

Referenced by PageDef::writeDocumentation(), and writePages().

{
//printf("Definition::hasSections(%s) #sections=%d\n",name().data(),
// m_impl->sectionDict ? m_impl->sectionDict->count() : 0);
if (m_impl->sectionDict==0) return FALSE;
for (li.toFirst();(si=li.current());++li)
{
{
return TRUE;
}
}
return FALSE;
}
bool Definition::hasSources ( ) const
bool Definition::hasUserDocumentation ( ) const
virtual

Returns TRUE iff the definition is documented by the user.

Definition at line 1309 of file definition.cpp.

References DefinitionImpl::brief, DefinitionImpl::details, DocInfo::doc, BriefInfo::doc, DefinitionImpl::inbodyDocs, and m_impl.

Referenced by GroupDef::isLinkable(), and MemberDef::warnIfUndocumented().

{
bool hasDocs =
(m_impl->details && !m_impl->details->doc.isEmpty()) ||
(m_impl->brief && !m_impl->brief->doc.isEmpty()) ||
(m_impl->inbodyDocs && !m_impl->inbodyDocs->doc.isEmpty());
return hasDocs;
}
QCString Definition::id ( ) const
QCString Definition::inbodyDocumentation ( ) const
QCString Definition::inbodyFile ( ) const
int Definition::inbodyLine ( ) const
bool Definition::isArtificial ( ) const

returns TRUE if this entity was artificially introduced, for instance because it is used to show a template instantiation relation.

Definition at line 1844 of file definition.cpp.

References DefinitionImpl::isArtificial, and m_impl.

Referenced by generateXMLForClass(), NamespaceDef::isLinkableInProject(), ClassDef::isLinkableInProject(), AllMembersListContext::Private::Private(), and ClassDef::writeMemberList().

{
}
bool Definition::isHidden ( ) const
virtual bool Definition::isLinkable ( ) const
pure virtual
virtual bool Definition::isLinkableInProject ( ) const
pure virtual

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

Implemented in MemberDef, ClassDef, FileDef, NamespaceDef, GroupDef, DirDef, and PageDef.

Referenced by ClassDef::getOutputFileBase(), DefinitionContext< FileContext::Private >::isLinkableInProject(), and isVisibleInProject().

bool Definition::isLinkableViaGroup ( ) const

Definition at line 1879 of file definition.cpp.

References GroupDef::isLinkable(), and partOfGroups().

Referenced by FileDef::isLinkableInProject().

{
if (gl)
{
GroupDef *gd;
for (gli.toFirst();(gd=gli.current());++gli)
{
if (gd->isLinkable()) return TRUE;
}
}
return FALSE;
}
bool Definition::isReference ( ) const
virtual

Returns TRUE if this definition is imported via a tag file.

Reimplemented in MemberDef, and ClassDef.

Definition at line 1854 of file definition.cpp.

References m_impl, and DefinitionImpl::ref.

Referenced by FileListContext::Private::addFiles(), NestingContext::Private::addModules(), ModuleListContext::Private::addModules(), PageListContext::Private::addPages(), countGroups(), PageDef::documentedPage(), RTFGenerator::endIndexSection(), LatexGenerator::endIndexSection(), generateDEFForFile(), generateDEFForNamespace(), FileName::generateDiskNames(), generateDocbookForClass(), generateDocbookForDir(), generateDocbookForFile(), generateDocbookForGroup(), generateDocbookForNamespace(), generateDocbookForPage(), generateFileSources(), generateGroupDocs(), generateLink(), generatePageDocs(), PerlModGenerator::generatePerlModForClass(), PerlModGenerator::generatePerlModForFile(), PerlModGenerator::generatePerlModForGroup(), PerlModGenerator::generatePerlModForNamespace(), PerlModGenerator::generatePerlModForPage(), FileDef::generateSourceFile(), generateXMLForClass(), generateXMLForDir(), generateXMLForFile(), generateXMLForGroup(), generateXMLForNamespace(), generateXMLForPage(), PageDef::isLinkable(), DirDef::isLinkable(), NamespaceDef::isLinkable(), FileDef::isLinkable(), PageDef::isLinkableInProject(), DirDef::isLinkableInProject(), GroupDef::isLinkableInProject(), NamespaceDef::isLinkableInProject(), FileDef::isLinkableInProject(), ClassDef::isReference(), MemberDef::isReference(), DefinitionContext< FileContext::Private >::isReference(), NestingNodeContext::Private::isReference(), NavPathElemContext::Private::isReference(), parseFiles(), ExampleListContext::Private::Private(), NamespaceDef::setFileName(), RTFGenerator::startIndexSection(), LatexGenerator::startIndexSection(), PageDef::visibleInIndex(), writeDirTreeNode(), writeGroupTreeNode(), writeIndex(), GroupDef::writePageDocumentation(), writePageIndex(), writeSingleFileIndex(), and FileDef::writeTagFile().

{
return !m_impl->ref.isEmpty();
}
bool Definition::isVisible ( ) const
virtual

Returns TRUE iff the name may appear in the output

Definition at line 1839 of file definition.cpp.

References DefinitionImpl::hidden, isLinkable(), and m_impl.

Referenced by NestingContext::Private::addModules(), writeGroupTreeNode(), GroupDef::writeNestedGroups(), and GroupDef::writeTagFile().

{
return isLinkable() && !m_impl->hidden;
}
bool Definition::isVisibleInProject ( ) const
virtual

Returns TRUE iff the name is part of this project and may appear in the output

Definition at line 1834 of file definition.cpp.

References DefinitionImpl::hidden, isLinkableInProject(), and m_impl.

{
}
QCString Definition::localName ( ) const
void Definition::makePartOfGroup ( GroupDef gd)
void Definition::mergeRefItems ( Definition d)

Definition at line 1465 of file definition.cpp.

References _getXRefListId(), m_impl, ListItemInfo::type, DefinitionImpl::xrefListItems, and xrefListItems().

Referenced by combineDeclarationAndDefinition().

{
//printf("%s::mergeRefItems()\n",name().data());
QList<ListItemInfo> *xrefList = d->xrefListItems();
if (xrefList!=0)
{
// deep copy the list
{
m_impl->xrefListItems=new QList<ListItemInfo>;
m_impl->xrefListItems->setAutoDelete(TRUE);
}
QListIterator<ListItemInfo> slii(*xrefList);
for (slii.toFirst();(lii=slii.current());++slii)
{
if (_getXRefListId(lii->type)==-1)
{
m_impl->xrefListItems->append(new ListItemInfo(*lii));
}
}
}
}
const QCString& Definition::name ( ) const
inline

Returns the name of the definition

Definition at line 114 of file definition.h.

References m_name.

Referenced by MemberDef::_computeIsConstructor(), MemberDef::_computeIsDestructor(), MemberDef::_computeLinkableInProject(), _setSymbolName(), MemberDef::_writeCategoryRelation(), MemberDef::_writeEnumValues(), _writeSourceRefList(), accessibleViaUsingNamespace(), GroupDef::addClass(), DotClassGraph::addClass(), DotGfxHierarchyTable::addClassList(), addClassMemberNameToIndex(), addClassToContext(), addEnumValuesToEnums(), GroupDef::addExample(), addFileMemberNameToIndex(), addGroupToGroups(), DotGfxHierarchyTable::addHierarchy(), Qhp::addIndexItem(), DocSets::addIndexItem(), HtmlHelp::addIndexItem(), PageDef::addInnerCompound(), addInstance(), PerlModGenerator::addListOfAllMembers(), MemberDef::addListReference(), GroupDef::addListReferences(), addMemberDocs(), addMembersToIndex(), ClassDef::addMembersToTemplateInstance(), addMemberToGroups(), addMemberToSearchIndex(), GroupDef::addNamespace(), addNamespaceMemberNameToIndex(), GroupDef::addPage(), addPageToContext(), addRelatedPage(), addSourceReferencedBy(), addSourceReferences(), addTemplateList(), addToMap(), ClassDef::addUsedByClass(), ClassDef::addUsedClass(), addVariableToFile(), FlowChart::alignFuncProc(), SearchIndexList::append(), assignBinding(), buildDirectories(), buildExampleList(), buildFunctionList(), DotCallGraph::buildGraph(), DotGroupCollaboration::buildGraph(), DefinitionContext< T >::Cachable< NamespaceContext::Private >::Cachable(), checkArgumentName(), checkPageRelations(), ClassDef::ClassDef(), classInheritedProtectionLevel(), MemberName::compareValues(), MemberNameInfo::compareValues(), PageSDict::compareValues(), MemberList::compareValues(), MemberIndexList::compareValues(), MemberSDict::compareValues(), NamespaceList::compareValues(), NamespaceSDict::compareValues(), DefinitionList::compareValues(), BaseClassList::compareValues(), compItems(), computeCommonDirPrefix(), computeTemplateClassRelations(), VhdlDocGen::convertFileNameToClassName(), FlowChart::convertNameToFileName(), MemberList::countDecMembers(), MemberList::countEnumValues(), createJavascriptSearchIndex(), createTagLessInstance(), MemberDef::createTemplateInstanceMember(), ClassSDict::declVisible(), Definition(), MemberDef::displayDefinition(), GroupDef::displayName(), PageDef::displayName(), NamespaceDef::displayName(), MemberDef::displayName(), DotCallGraph::DotCallGraph(), DotGroupCollaboration::DotGroupCollaboration(), dumpSymbol(), PageContext::Private::example(), extractNamespaceName(), VhdlDocGen::findAllPackages(), VhdlDocGen::findArchitecture(), findClassRelation(), findDirDocumentation(), findEnumDocumentation(), findEnums(), VhdlDocGen::findFunction(), findGlobalMember(), findGroupScope(), findMainPage(), VhdlDocGen::findMember(), findMember(), VhdlDocGen::findMemberDef(), findMemFlow(), findScopeFromQualifiedName(), findTemplateInstanceRelation(), findUsedClassesForClass(), findUsedNamespace(), findUsingDeclarations(), VhdlDocGen::findVhdlClass(), generateClassList(), generateDEFForClass(), generateDEFForMember(), generateDEFForNamespace(), generateDocbook(), generateDocbookForClass(), generateDocbookForDir(), generateDocbookForMember(), generateDocbookForNamespace(), generateDocbookForPage(), generateExampleDocs(), generateNamespaceDocs(), RefList::generatePage(), generatePageDocs(), PerlModGenerator::generatePerlModForClass(), PerlModGenerator::generatePerlModForGroup(), PerlModGenerator::generatePerlModForMember(), PerlModGenerator::generatePerlModForNamespace(), PerlModGenerator::generatePerlModForPage(), generateXML(), generateXMLForClass(), generateXMLForDir(), generateXMLForGroup(), generateXMLForMember(), generateXMLForNamespace(), generateXMLForPage(), getCanonicalTypeForIdentifier(), MemberDef::getClassDefOfAnonymousType(), VhdlDocGen::getClassName(), getDefs(), GlobalsIndexContext::Private::getMembersFiltered(), ClassMembersIndexContext::Private::getMembersFiltered(), NamespaceMembersIndexContext::Private::getMembersFiltered(), MemberDef::getOutputFileBase(), getResolvedClassRec(), ClassDef::getVariableInstance(), DocPara::handleInheritDoc(), MemberContext::Private::handleNameWithContextFor(), MemberDefImpl::init(), MemberContext::Private::initializerAsCode(), NamespaceDef::insertClass(), FileDef::insertClass(), NamespaceDef::insertMember(), GroupDef::insertMember(), FileDef::insertMember(), NamespaceDef::insertNamespace(), FileDef::insertNamespace(), ClassDef::insertTemplateInstance(), ClassDef::internalInsertMember(), isAccessibleFromWithExpScope(), MemberContext::Private::isAnonymous(), ClassDef::isBaseClass(), MemberDef::isDocumentedFriendClass(), ClassDef::isExtension(), NamespaceDef::isLinkableInProject(), ClassDef::isLinkableInProject(), isStandardFunc(), VhdlDocGen::isSubClass(), ClassDef::isSubClass(), DiagramItem::label(), linkifyText(), NamespaceDef::localName(), matchArgument(), mergeCategories(), ClassDef::mergeCategory(), ClassDef::mergeMembers(), minClassDistance(), FileDef::name(), navigationPathAsString(), normalizeNonTemplateArgumentsInString(), MemberDef::objCMethodName(), DocCopy::parse(), DocXRefItem::parse(), AllMembersListContext::Private::Private(), processTagLessClasses(), MemberDef::qualifiedName(), qualifiedName(), GroupDef::removeMember(), resolveClassNestingRelations(), resolveLink(), SymbolContext::Private::scope(), MemberDef::setAnchor(), ClassDef::setClassName(), SearchIndex::setCurrentDoc(), DirDef::setDiskName(), PageDef::setFileName(), GroupDef::setGroupTitle(), setLocalName(), setName(), MemberContext::Private::sourceCode(), PageContext::Private::title(), transferFunctionReferences(), transferRelatedFunctionDocumentation(), trimBaseClassScope(), trimTemplateSpecifiers(), validatingParseDoc(), MemberDef::virtualness(), HtmlDocVisitor::visitPre(), MemberDef::warnIfUndocumented(), writeAlphabeticalClassList(), writeBoxMemberList(), writeClassToDot(), writeClassTree(), writeColumn(), ClassSDict::writeDeclaration(), MemberDef::writeDeclaration(), writeDefArgumentList(), ClassDef::writeDetailedDocumentationBody(), writeDirTreeNode(), NamespaceDef::writeDocumentation(), ClassSDict::writeDocumentation(), PageDef::writeDocumentation(), GroupDef::writeDocumentation(), DirDef::writeDocumentation(), MemberList::writeDocumentation(), MemberDef::writeDocumentation(), ClassDef::writeDocumentation(), ClassDef::writeDocumentationForInnerClasses(), MemberList::writeDocumentationPage(), MemberDef::writeEnumDeclaration(), writeExampleIndex(), writeExceptionListImpl(), writeGroupTreeNode(), writeIndex(), ClassDef::writeInlineDocumentation(), writeInnerClasses(), writeInnerNamespaces(), writeInnerPages(), writeJavascriptSearchIndex(), writeLink(), MemberDef::writeLink(), writeListOfAllMembers(), MemberDef::writeMemberDocSimple(), GroupDef::writeMemberDocumentation(), ClassDef::writeMemberList(), writeMemberList(), GroupDef::writeMemberPages(), writeMemberReference(), VhdlDocGen::writeOverview(), PageDef::writePageDocumentation(), GroupDef::writePageDocumentation(), writePages(), MemberList::writePlainDeclarations(), VhdlDocGen::writePlainVHDLDeclarations(), ClassDef::writeQuickMemberLinks(), VhdlDocGen::writeStringLink(), NamespaceDef::writeTagFile(), PageDef::writeTagFile(), GroupDef::writeTagFile(), DirDef::writeTagFile(), VhdlDocGen::writeTagFile(), FileDef::writeTagFile(), MemberDef::writeTagFile(), ClassDef::writeTagFile(), DocSets::writeToken(), writeUCFLink(), VhdlDocGen::writeVHDLDeclaration(), writeVhdlEntityToolTip(), and VhdlDocGen::writeVHDLTypeDocumentation().

{ return m_name; }
QCString Definition::navigationPathAsString ( ) const

Returns the string used in the footer for $navpath when GENERATE_TREEVIEW is enabled

Definition at line 1547 of file definition.cpp.

References anchor(), convertToHtml(), DefinitionIntf::definitionType(), getOuterScope(), getOutputFileBase(), Doxygen::globalScope, Doxygen::htmlFileExtension, isLinkable(), localName(), name(), navigationPathAsString(), DefinitionIntf::TypeClass, DefinitionIntf::TypeFile, DefinitionIntf::TypeGroup, and DefinitionIntf::TypePage.

Referenced by endFileWithNavPath(), navigationPathAsString(), and writeNavigationPath().

{
QCString result;
Definition *outerScope = getOuterScope();
QCString locName = localName();
if (outerScope && outerScope!=Doxygen::globalScope)
{
result+=outerScope->navigationPathAsString();
}
else if (definitionType()==Definition::TypeFile && ((const FileDef*)this)->getDirDef())
{
result+=((const FileDef*)this)->getDirDef()->navigationPathAsString();
}
result+="<li class=\"navelem\">";
if (isLinkable())
{
if (definitionType()==Definition::TypeGroup && ((const GroupDef*)this)->groupTitle())
{
result+="<a class=\"el\" href=\"$relpath^"+getOutputFileBase()+Doxygen::htmlFileExtension+"\">"+
convertToHtml(((const GroupDef*)this)->groupTitle())+"</a>";
}
else if (definitionType()==Definition::TypePage && !((const PageDef*)this)->title().isEmpty())
{
result+="<a class=\"el\" href=\"$relpath^"+getOutputFileBase()+Doxygen::htmlFileExtension+"\">"+
convertToHtml(((const PageDef*)this)->title())+"</a>";
}
{
QCString name = locName;
if (name.right(2)=="-p" /*|| name.right(2)=="-g"*/)
{
name = name.left(name.length()-2);
}
result+="<a class=\"el\" href=\"$relpath^"+getOutputFileBase()+Doxygen::htmlFileExtension;
if (!anchor().isEmpty()) result+="#"+anchor();
result+="\">"+convertToHtml(name)+"</a>";
}
else
{
result+="<a class=\"el\" href=\"$relpath^"+getOutputFileBase()+Doxygen::htmlFileExtension+"\">"+
convertToHtml(locName)+"</a>";
}
}
else
{
result+="<b>"+convertToHtml(locName)+"</b>";
}
result+="</li>";
return result;
}
GroupList * Definition::partOfGroups ( ) const
QCString Definition::pathFragment ( ) const

Definition at line 1511 of file definition.cpp.

References DefinitionIntf::definitionType(), Doxygen::globalScope, isLinkable(), DefinitionImpl::localName, m_impl, DefinitionImpl::outerScope, pathFragment(), DefinitionIntf::TypeGroup, and DefinitionIntf::TypePage.

Referenced by pathFragment(), and DirRelation::writeDocumentation().

{
QCString result;
{
}
if (isLinkable())
{
if (!result.isEmpty()) result+="/";
if (definitionType()==Definition::TypeGroup && ((const GroupDef*)this)->groupTitle())
{
result+=((const GroupDef*)this)->groupTitle();
}
else if (definitionType()==Definition::TypePage && !((const PageDef*)this)->title().isEmpty())
{
result+=((const PageDef*)this)->title();
}
else
{
result+=m_impl->localName;
}
}
else
{
result+=m_impl->localName;
}
return result;
}
QCString Definition::qualifiedName ( ) const
virtual

Returns the fully qualified name of this definition

Reimplemented in MemberDef.

Definition at line 1375 of file definition.cpp.

References getLanguage(), getLanguageSpecificSeparator(), DefinitionImpl::localName, m_impl, name(), DefinitionImpl::outerScope, DefinitionImpl::qualifiedName, and qualifiedName().

Referenced by GroupDef::addClass(), DotGroupCollaboration::addCollaborationMember(), FileDef::addIncludedUsingDirectives(), DocSets::addIndexItem(), NamespaceDef::addListReferences(), ClassDef::addListReferences(), NamespaceDef::addUsingDeclaration(), FileDef::addUsingDeclaration(), NamespaceDef::addUsingDirective(), FileDef::addUsingDirective(), findGlobalMember(), getCanonicalTypeForIdentifier(), getResolvedSymbol(), newResolveTypedef(), MemberDef::qualifiedName(), qualifiedName(), ClassDef::qualifiedNameWithTemplateParameters(), SymbolContext::Private::scope(), searchTemplateSpecs(), validatingParseDoc(), GroupDef::writeGroupGraph(), writeJavascriptSearchIndex(), and TooltipManager::writeTooltips().

{
//static int count=0;
//count++;
if (!m_impl->qualifiedName.isEmpty())
{
//count--;
}
//printf("start %s::qualifiedName() localName=%s\n",name().data(),m_impl->localName.data());
if (m_impl->outerScope==0)
{
if (m_impl->localName=="<globalScope>")
{
//count--;
return "";
}
else
{
//count--;
return m_impl->localName;
}
}
if (m_impl->outerScope->name()=="<globalScope>")
{
}
else
{
}
//printf("end %s::qualifiedName()=%s\n",name().data(),m_impl->qualifiedName.data());
//count--;
}
void Definition::removeFromMap ( Definition d)
staticprivate

Definition at line 254 of file definition.cpp.

References m_symbolName, Doxygen::symbolMap, and symbolName().

Referenced by ~Definition().

{
QCString symbolName = d->m_symbolName;
if (!symbolName.isEmpty())
{
//printf("******* removing symbol `%s' (%p)\n",symbolName.data(),d);
DefinitionIntf *di=Doxygen::symbolMap->find(symbolName);
if (di)
{
if (di!=d) // symbolName not unique
{
//printf(" removing from list: %p!\n",di);
bool b = dl->removeRef(d);
ASSERT(b==TRUE);
if (dl->isEmpty())
{
Doxygen::symbolMap->take(symbolName);
}
}
else // symbolName unique
{
//printf(" removing symbol %p\n",di);
Doxygen::symbolMap->take(symbolName);
}
}
}
}
void Definition::setArtificial ( bool  b)
void Definition::setBodyDef ( FileDef fd)
void Definition::setBodySegment ( int  bls,
int  ble 
)
void Definition::setBriefDescription ( const char *  b,
const char *  briefFile,
int  briefLine 
)
virtual

Sets the brief description of this definition to b. A dot is added to the sentence if not available.

Reimplemented in MemberDef.

Definition at line 687 of file definition.cpp.

References _setBriefDescription().

Referenced by addClassToContext(), addRelatedPage(), addVariableToFile(), buildExampleList(), buildFileList(), buildGroupListFiltered(), buildNamespaceList(), createTagLessInstance(), findDirDocumentation(), findMainPage(), findUsingDirectives(), and MemberDef::setBriefDescription().

{
if (b==0) return;
}
void Definition::setCookie ( Cookie cookie)
inline
void Definition::setDocumentation ( const char *  d,
const char *  docFile,
int  docLine,
bool  stripWhiteSpace = TRUE 
)
virtual

Sets the documentation of this definition to d.

Reimplemented in MemberDef.

Definition at line 612 of file definition.cpp.

References _setDocumentation().

Referenced by addClassToContext(), addRelatedPage(), addVariableToFile(), buildFileList(), buildGroupListFiltered(), buildNamespaceList(), createTagLessInstance(), findDirDocumentation(), findUsingDirectives(), PageDef::PageDef(), and MemberDef::setDocumentation().

{
if (d==0) return;
_setDocumentation(d,docFile,docLine,stripWhiteSpace,FALSE);
}
void Definition::setHidden ( bool  b)
virtual
void Definition::setId ( const char *  name)

Sets a unique id for the symbol. Used for libclang integration.

Definition at line 402 of file definition.cpp.

References Doxygen::clangUsrMap, DefinitionImpl::id, id(), and m_impl.

Referenced by addClassToContext(), addEnumValuesToEnums(), addMethodToClass(), addVariableToClass(), addVariableToFile(), buildFunctionList(), buildNamespaceList(), findEnums(), findMember(), findUsingDeclImports(), and findUsingDirectives().

{
if (id==0) return;
m_impl->id = id;
{
//printf("Definition::setId '%s'->'%s'\n",id,m_name.data());
Doxygen::clangUsrMap->insert(id,this);
}
}
void Definition::setInbodyDocumentation ( const char *  d,
const char *  docFile,
int  docLine 
)
virtual

Set the documentation that was found inside the body of an item. If there was already some documentation set, the new documentation will be appended.

Reimplemented in MemberDef.

Definition at line 711 of file definition.cpp.

References _setInbodyDocumentation().

Referenced by buildGroupListFiltered(), and MemberDef::setInbodyDocumentation().

{
if (d==0) return;
}
void Definition::setLanguage ( SrcLangExt  lang)
void Definition::setLocalName ( const QCString  name)

Definition at line 1929 of file definition.cpp.

References DefinitionImpl::localName, m_impl, and name().

Referenced by DirDef::DirDef().

void Definition::setName ( const char *  name)
virtual

Sets a new name for the definition

Reimplemented in ClassDef.

Definition at line 396 of file definition.cpp.

References m_name, and name().

Referenced by buildNamespaceList(), FileName::generateDiskNames(), ClassDef::setName(), and VhdlDocGen::writeVHDLDeclaration().

{
if (name==0) return;
}
void Definition::setOuterScope ( Definition d)
virtual

Definition at line 1415 of file definition.cpp.

References DefinitionImpl::hidden, isHidden(), m_impl, DefinitionImpl::outerScope, and DefinitionImpl::qualifiedName.

Referenced by addEnumValuesToEnums(), PageDef::addInnerCompound(), DirDef::addSubDir(), buildNamespaceList(), buildScopeFromQualifiedName(), createTagLessInstance(), findClassRelation(), ClassDef::insertTemplateInstance(), MemberDef::moveTo(), resolveClassNestingRelations(), MemberDef::setMemberClass(), and MemberDef::setNamespace().

{
//printf("%s::setOuterScope(%s)\n",name().data(),d?d->name().data():"<none>");
bool found=false;
// make sure that we are not creating a recursive scope relation.
while (p && !found)
{
found = (p==d);
p = p->m_impl->outerScope;
}
if (!found)
{
m_impl->qualifiedName.resize(0); // flush cached scope name
}
}
void Definition::setReference ( const char *  r)

Sets the tag file id via which this definition was imported.

Definition at line 1909 of file definition.cpp.

References m_impl, and DefinitionImpl::ref.

Referenced by addRelatedPage(), buildGroupListFiltered(), buildNamespaceList(), ClassDef::ClassDef(), FileDef::FileDef(), NamespaceDef::NamespaceDef(), and MemberDef::setTagInfo().

{
m_impl->ref=r;
}
void Definition::setRefItems ( const QList< ListItemInfo > *  sli)

Definition at line 1445 of file definition.cpp.

References m_impl, and DefinitionImpl::xrefListItems.

Referenced by addClassToContext(), addEnumValuesToEnums(), addInterfaceOrServiceToServiceOrSingleton(), addMemberDocs(), addMethodToClass(), addRelatedPage(), addVariableToClass(), addVariableToFile(), buildFileList(), buildFunctionList(), buildGroupListFiltered(), buildNamespaceList(), Definition(), findDefineDocumentation(), findDirDocumentation(), findEnumDocumentation(), findEnums(), findMember(), and findUsingDirectives().

{
//printf("%s::setRefItems()\n",name().data());
if (sli)
{
// deep copy the list
{
m_impl->xrefListItems=new QList<ListItemInfo>;
m_impl->xrefListItems->setAutoDelete(TRUE);
}
QListIterator<ListItemInfo> slii(*sli);
for (slii.toFirst();(lii=slii.current());++slii)
{
m_impl->xrefListItems->append(new ListItemInfo(*lii));
}
}
}
QCString Definition::symbolName ( ) const

Returns the name of this definition as it appears in the symbol map.

Definition at line 1683 of file definition.cpp.

References m_symbolName.

Referenced by addToMap(), VhdlDocGen::findMemberDef(), and removeFromMap().

{
return m_symbolName;
}
void Definition::writeDocAnchorsToTagFile ( FTextStream tagFile)

Writes the documentation anchors of the definition to the Doxygen::tagFile stream.

Definition at line 520 of file definition.cpp.

References convertToXML(), DefinitionIntf::definitionType(), endl(), SectionInfo::fileName, SectionInfo::generated, SectionInfo::label, m_impl, SectionInfo::ref, DefinitionImpl::sectionDict, SectionInfo::title, and DefinitionIntf::TypeMember.

Referenced by NamespaceDef::writeTagFile(), PageDef::writeTagFile(), GroupDef::writeTagFile(), DirDef::writeTagFile(), VhdlDocGen::writeTagFile(), FileDef::writeTagFile(), MemberDef::writeTagFile(), and ClassDef::writeTagFile().

{
{
//printf("%s: writeDocAnchorsToTagFile(%d)\n",name().data(),m_impl->sectionDict->count());
for (;(si=sdi.current());++sdi)
{
if (!si->generated && si->ref.isEmpty())
{
//printf("write an entry!\n");
if (definitionType()==TypeMember) tagFile << " ";
tagFile << " <docanchor file=\"" << si->fileName << "\"";
if (!si->title.isEmpty())
{
tagFile << " title=\"" << convertToXML(si->title) << "\"";
}
tagFile << ">" << si->label << "</docanchor>" << endl;
}
}
}
}
void Definition::writeInlineCode ( OutputList ol,
const char *  scopeName 
)

Write code of this definition into the documentation

Definition at line 1098 of file definition.cpp.

References FileDef::absFilePath(), DefinitionImpl::body, Config_getBool, DefinitionImpl::defFileExt, DefinitionIntf::definitionType(), OutputList::endCodeFragment(), BodyInfo::endLine, BodyInfo::fileDef, ParserManager::getParser(), hasSources(), DefinitionImpl::lang, m_impl, ParserInterface::parseCode(), Doxygen::parserManager, OutputList::popGeneratorState(), OutputList::pushGeneratorState(), readCodeFragment(), ParserInterface::resetCodeParserState(), OutputList::startCodeFragment(), BodyInfo::startLine, and DefinitionIntf::TypeMember.

Referenced by MemberDef::writeDocumentation().

{
static bool inlineSources = Config_getBool(INLINE_SOURCES);
//printf("Source Fragment %s: %d-%d bodyDef=%p\n",name().data(),
// m_startBodyLine,m_endBodyLine,m_bodyDef);
if (inlineSources && hasSources())
{
QCString codeFragment;
int actualStart=m_impl->body->startLine,actualEnd=m_impl->body->endLine;
actualStart,actualEnd,codeFragment)
)
{
//printf("Adding code fragement '%s' ext='%s'\n",
// codeFragment.data(),m_impl->defFileExt.data());
//printf("Read:\n`%s'\n\n",codeFragment.data());
MemberDef *thisMd = 0;
if (definitionType()==TypeMember) thisMd = (MemberDef *)this;
pIntf->parseCode(ol, // codeOutIntf
scopeName, // scope
codeFragment, // input
m_impl->lang, // lang
FALSE, // isExample
0, // exampleName
m_impl->body->fileDef, // fileDef
actualStart, // startLine
actualEnd, // endLine
TRUE, // inlineFragment
thisMd, // memberDef
TRUE // show line numbers
);
}
}
}
void Definition::writeNavigationPath ( OutputList ol) const
virtual void Definition::writeQuickMemberLinks ( OutputList ,
MemberDef  
) const
inlinevirtual

Reimplemented in ClassDef, FileDef, GroupDef, and NamespaceDef.

Definition at line 338 of file definition.h.

Referenced by MemberList::writeDocumentationPage().

{}
void Definition::writeSourceDef ( OutputList ol,
const char *  scopeName 
)

Write a reference to the source code defining this definition

Definition at line 919 of file definition.cpp.

References DefinitionImpl::body, Config_getBool, OutputList::disable(), OutputList::disableAllBut(), OutputList::docify(), OutputList::enableAll(), OutputList::endParagraph(), err(), BodyInfo::fileDef, getSourceAnchor(), getSourceFileBase(), OutputGenerator::Html, OutputGenerator::Latex, m_impl, OutputGenerator::Man, FileDef::name(), OutputList::parseText(), OutputList::popGeneratorState(), OutputList::pushGeneratorState(), OutputGenerator::RTF, BodyInfo::startLine, OutputList::startParagraph(), theTranslator, Translator::trDefinedAtLineInSourceFile(), and OutputList::writeObjectLink().

Referenced by ClassDef::writeDetailedDocumentationBody(), and MemberDef::writeDocumentation().

{
static bool latexSourceCode = Config_getBool(LATEX_SOURCE_CODE);
static bool rtfSourceCode = Config_getBool(RTF_SOURCE_CODE);
//printf("Definition::writeSourceRef %d %p\n",bodyLine,bodyDef);
QCString fn = getSourceFileBase();
if (!fn.isEmpty())
{
int lineMarkerPos = refText.find("@0");
int fileMarkerPos = refText.find("@1");
if (lineMarkerPos!=-1 && fileMarkerPos!=-1) // should always pass this.
{
QCString lineStr;
lineStr.sprintf("%d",m_impl->body->startLine);
QCString anchorStr = getSourceAnchor();
if (lineMarkerPos<fileMarkerPos) // line marker before file marker
{
// write text left from linePos marker
ol.parseText(refText.left(lineMarkerPos));
if (!latexSourceCode)
{
}
if (!rtfSourceCode)
{
}
// write line link (HTML, LaTeX optionally, RTF optionally)
ol.writeObjectLink(0,fn,anchorStr,lineStr);
ol.enableAll();
if (latexSourceCode)
{
}
if (rtfSourceCode)
{
}
// write normal text (Man, Latex optionally, RTF optionally)
ol.docify(lineStr);
// write text between markers
ol.parseText(refText.mid(lineMarkerPos+2,
fileMarkerPos-lineMarkerPos-2));
if (!latexSourceCode)
{
}
if (!rtfSourceCode)
{
}
// write file link (HTML, LaTeX optionally, RTF optionally)
ol.enableAll();
if (latexSourceCode)
{
}
if (rtfSourceCode)
{
}
// write normal text (Man, Latex optionally, RTF optionally)
// write text right from file marker
ol.parseText(refText.right(
refText.length()-fileMarkerPos-2));
}
else // file marker before line marker
{
// write text left from file marker
ol.parseText(refText.left(fileMarkerPos));
if (!latexSourceCode)
{
}
if (!rtfSourceCode)
{
}
// write file link (HTML only)
ol.enableAll();
if (latexSourceCode)
{
}
if (rtfSourceCode)
{
}
// write normal text (RTF/Latex/Man only)
// write text between markers
ol.parseText(refText.mid(fileMarkerPos+2,
lineMarkerPos-fileMarkerPos-2));
if (!latexSourceCode)
{
}
if (!rtfSourceCode)
{
}
// write line link (HTML only)
ol.writeObjectLink(0,fn,anchorStr,lineStr);
ol.enableAll();
if (latexSourceCode)
{
}
if (rtfSourceCode)
{
}
// write normal text (Latex/Man only)
ol.docify(lineStr);
// write text right from linePos marker
ol.parseText(refText.right(
refText.length()-lineMarkerPos-2));
}
}
else
{
err("translation error: invalid markers in trDefinedInSourceFile()\n");
}
}
}
void Definition::writeSourceReffedBy ( OutputList ol,
const char *  scopeName 
)
void Definition::writeSourceRefs ( OutputList ol,
const char *  scopeName 
)
virtual void Definition::writeSummaryLinks ( OutputList )
inlinevirtual

Reimplemented in ClassDef, FileDef, GroupDef, and NamespaceDef.

Definition at line 339 of file definition.h.

Referenced by startTitle().

{}
void Definition::writeToc ( OutputList ol)

Definition at line 1616 of file definition.cpp.

References convertToHtml(), OutputList::disableAllBut(), OutputGenerator::Html, SectionInfo::label, m_impl, SectionInfo::Paragraph, OutputList::popGeneratorState(), OutputList::pushGeneratorState(), SectionInfo::Section, DefinitionImpl::sectionDict, SectionInfo::Subsection, SectionInfo::Subsubsection, theTranslator, SectionInfo::title, Translator::trRTFTableOfContents(), SectionInfo::type, and OutputList::writeString().

Referenced by PageDef::writeDocumentation(), and writeIndex().

{
SectionDict *sectionDict = m_impl->sectionDict;
if (sectionDict==0) return;
ol.writeString("<div class=\"toc\">");
ol.writeString("<h3>");
ol.writeString("</h3>\n");
ol.writeString("<ul>");
SDict<SectionInfo>::Iterator li(*sectionDict);
int level=1,l;
char cs[2];
cs[1]='\0';
bool inLi[5]={ FALSE, FALSE, FALSE, FALSE };
for (li.toFirst();(si=li.current());++li)
{
{
//printf(" level=%d title=%s\n",level,si->title.data());
int nextLevel = (int)si->type;
if (nextLevel>level)
{
for (l=level;l<nextLevel;l++)
{
ol.writeString("<ul>");
}
}
else if (nextLevel<level)
{
for (l=level;l>nextLevel;l--)
{
if (inLi[l]) ol.writeString("</li>\n");
inLi[l]=FALSE;
ol.writeString("</ul>\n");
}
}
cs[0]='0'+nextLevel;
if (inLi[nextLevel]) ol.writeString("</li>\n");
QCString titleDoc = convertToHtml(si->title);
ol.writeString("<li class=\"level"+QCString(cs)+"\"><a href=\"#"+si->label+"\">"+(si->title.isEmpty()?si->label:titleDoc)+"</a>");
inLi[nextLevel]=TRUE;
level = nextLevel;
}
}
while (level>1)
{
if (inLi[level]) ol.writeString("</li>\n");
inLi[level]=FALSE;
ol.writeString("</ul>\n");
level--;
}
if (inLi[level]) ol.writeString("</li>\n");
inLi[level]=FALSE;
ol.writeString("</ul>\n");
ol.writeString("</div>\n");
}
QList< ListItemInfo > * Definition::xrefListItems ( ) const

Member Data Documentation

Cookie* Definition::m_cookie
private

Definition at line 377 of file definition.h.

Referenced by cookie(), setCookie(), and ~Definition().

int Definition::m_defColumn
private

Definition at line 376 of file definition.h.

Referenced by Definition(), and getDefColumn().

int Definition::m_defLine
private

Definition at line 375 of file definition.h.

Referenced by Definition(), and getDefLine().

DefinitionImpl* Definition::m_impl
private
bool Definition::m_isSymbol
private

Definition at line 373 of file definition.h.

Referenced by Definition(), and ~Definition().

QCString Definition::m_name
private

Definition at line 372 of file definition.h.

Referenced by briefFile(), Definition(), docFile(), inbodyFile(), name(), and setName().

QCString Definition::m_symbolName
private

Definition at line 374 of file definition.h.

Referenced by _setSymbolName(), removeFromMap(), and symbolName().


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