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

A model of a page symbol. More...

#include <pagedef.h>

Inheritance diagram for PageDef:
Definition DefinitionIntf

Public Member Functions

 PageDef (const char *f, int l, const char *n, const char *d, const char *t)
 
 ~PageDef ()
 
void setFileName (const char *name)
 
void setShowToc (bool b)
 
DefType definitionType () const
 
bool isLinkableInProject () const
 
bool isLinkable () const
 
QCString getOutputFileBase () const
 
QCString anchor () const
 
void findSectionsInDocumentation ()
 
QCString title () const
 
GroupDefgetGroupDef () const
 
PageSDictgetSubPages () const
 
void addInnerCompound (Definition *d)
 
bool visibleInIndex () const
 
bool documentedPage () const
 
bool hasSubPages () const
 
bool hasParentPage () const
 
bool showToc () const
 
void setPageScope (Definition *d)
 
DefinitiongetPageScope () const
 
QCString displayName (bool=TRUE) const
 
void writeDocumentation (OutputList &ol)
 
void writeTagFile (FTextStream &)
 
- Public Member Functions inherited from Definition
 Definition (const char *defFileName, int defLine, int defColumn, const char *name, const char *b=0, const char *d=0, bool isSymbol=TRUE)
 
virtual ~Definition ()
 
const QCString & name () const
 
QCString localName () const
 
virtual QCString qualifiedName () const
 
QCString symbolName () const
 
virtual QCString 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 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 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 ()
 

Private Member Functions

void setNestingLevel (int l)
 
void writePageDocumentation (OutputList &ol)
 

Private Attributes

QCString m_fileName
 
QCString m_title
 
PageSDictm_subPageDict
 
Definitionm_pageScope
 
int m_nestingLevel
 
bool m_showToc
 

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
}
 
- Protected Member Functions inherited from Definition
 Definition (const Definition &d)
 

Detailed Description

A model of a page symbol.

Definition at line 29 of file pagedef.h.

Constructor & Destructor Documentation

PageDef::PageDef ( const char *  f,
int  l,
const char *  n,
const char *  d,
const char *  t 
)
PageDef::~PageDef ( )

Definition at line 41 of file pagedef.cpp.

References m_subPageDict.

{
delete m_subPageDict;
}

Member Function Documentation

void PageDef::addInnerCompound ( Definition d)
virtual
QCString PageDef::anchor ( ) const
inlinevirtual

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

Implements Definition.

Definition at line 52 of file pagedef.h.

{ return QCString(); }
DefType PageDef::definitionType ( ) const
inlinevirtual

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

Implements DefinitionIntf.

Definition at line 40 of file pagedef.h.

References DefinitionIntf::TypePage.

{ return TypePage; }
QCString PageDef::displayName ( bool  includeScope = TRUE) const
inlinevirtual

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

Implements Definition.

Definition at line 65 of file pagedef.h.

References m_title, and Definition::name().

{ return !m_title.isEmpty() ? m_title : Definition::name(); }
bool PageDef::documentedPage ( ) const

Definition at line 291 of file pagedef.cpp.

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

Referenced by countRelatedPages().

{
return // not part of a group
!getGroupDef() &&
// not an externally defined page
}
void PageDef::findSectionsInDocumentation ( )
GroupDef * PageDef::getGroupDef ( ) const
QCString PageDef::getOutputFileBase ( ) const
virtual
Definition* PageDef::getPageScope ( ) const
inline

Definition at line 64 of file pagedef.h.

References m_pageScope.

{ return m_pageScope; }
PageSDict* PageDef::getSubPages ( ) const
inline
bool PageDef::hasParentPage ( ) const
bool PageDef::hasSubPages ( ) const

Definition at line 299 of file pagedef.cpp.

References SDict< T >::count(), and m_subPageDict.

Referenced by writePageDocumentation(), and writePages().

{
return m_subPageDict->count()>0;
}
bool PageDef::isLinkable ( ) const
inlinevirtual

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 45 of file pagedef.h.

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

Referenced by createJavascriptSearchIndex().

{
}
bool PageDef::isLinkableInProject ( ) const
inlinevirtual

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

Implements Definition.

Definition at line 41 of file pagedef.h.

References Definition::isReference().

Referenced by isLinkable(), GroupDef::writeTagFile(), and writeTagFile().

{
return /*hasDocumentation() &&*/ !isReference();
}
void PageDef::setFileName ( const char *  name)
void PageDef::setNestingLevel ( int  l)
private

Definition at line 304 of file pagedef.cpp.

References m_nestingLevel.

Referenced by addInnerCompound().

{
}
void PageDef::setPageScope ( Definition d)
inline

Definition at line 63 of file pagedef.h.

References m_pageScope.

Referenced by addPageToContext().

{ m_pageScope = d; }
void PageDef::setShowToc ( bool  b)

Definition at line 309 of file pagedef.cpp.

References m_showToc.

Referenced by addRelatedPage(), and findMainPage().

{
m_showToc |= b;
}
bool PageDef::showToc ( ) const
inline

Definition at line 62 of file pagedef.h.

References m_showToc.

{ return m_showToc; }
QCString PageDef::title ( ) const
inline
bool PageDef::visibleInIndex ( ) const

Definition at line 281 of file pagedef.cpp.

References Config_getBool, getGroupDef(), and Definition::isReference().

Referenced by countRelatedPages(), and writePages().

{
static bool externalPages = Config_getBool(EXTERNAL_PAGES);
return // not part of a group
!getGroupDef() &&
// not an externally defined page
(!isReference() || externalPages)
;
}
void PageDef::writeDocumentation ( OutputList ol)

Definition at line 118 of file pagedef.cpp.

References IndexList::addIndexItem(), Config_getBool, OutputList::disable(), OutputList::disableAll(), OutputList::disableAllBut(), Definition::docFile(), Definition::docLine(), OutputList::enable(), OutputList::enableAll(), OutputList::endContents(), endFile(), endFileWithNavPath(), OutputList::endQuickIndices(), OutputList::endSection(), endTitle(), OutputList::endTitleHead(), escapeCharsInString(), filterTitle(), SDict< T >::find(), OutputList::generateDoc(), Definition::getOuterScope(), getOutputFileBase(), Doxygen::globalScope, Definition::hasSections(), HLI_Pages, OutputGenerator::Html, Doxygen::indexList, SectionInfo::label, OutputGenerator::Latex, m_nestingLevel, m_showToc, OutputGenerator::Man, Definition::name(), OutputList::popGeneratorState(), OutputList::pushGeneratorState(), OutputGenerator::RTF, Doxygen::sectionDict, OutputList::startContents(), startFile(), startTitle(), OutputList::startTitleHead(), title(), SectionInfo::title, SectionInfo::type, Definition::writeNavigationPath(), writePageDocumentation(), and Definition::writeToc().

Referenced by generatePageDocs().

{
static bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
//outputList->disable(OutputGenerator::Man);
QCString pageName,manPageName;
pageName = escapeCharsInString(name(),FALSE,TRUE);
manPageName = escapeCharsInString(name(),TRUE,TRUE);
//printf("PageDef::writeDocumentation: %s\n",getOutputFileBase().data());
//1.{
//&& // a sub page
//(Doxygen::mainPage==0 || getOuterScope()!=Doxygen::mainPage) // and not a subpage of the mainpage
)
{
// do not generate sub page output for RTF and LaTeX, as these are
// part of their parent page
ol.disableAll();
}
//2.{
startFile(ol,getOutputFileBase(),manPageName,title(),HLI_Pages,!generateTreeView);
ol.enableAll();
startFile(ol,getOutputFileBase(),pageName,title(),HLI_Pages,!generateTreeView);
//2.}
if (!generateTreeView)
{
{
}
}
// save old generator state and write title only to Man generator
//2.{
ol.startTitleHead(manPageName);
ol.endTitleHead(manPageName, manPageName);
if (si)
{
ol.generateDoc(docFile(),docLine(),this,0,si->title,TRUE,FALSE,0,TRUE,FALSE);
ol.endSection(si->label,si->type);
}
//2.}
// for Latex the section is already generated as a chapter in the index!
//2.{
if (!title().isEmpty() && !name().isEmpty() && si!=0)
{
//ol.startSection(si->label,si->title,si->type);
ol.generateDoc(docFile(),docLine(),this,0,si->title,TRUE,FALSE,0,TRUE,FALSE);
//stringToSearchIndex(getOutputFileBase(),
// theTranslator->trPage(TRUE,TRUE)+" "+si->title,
// si->title);
//ol.endSection(si->label,si->type);
}
//2.}
{
writeToc(ol);
}
if (generateTreeView && getOuterScope()!=Doxygen::globalScope && !Config_getBool(DISABLE_INDEX))
{
}
else
{
endFile(ol);
}
//1.}
}
void PageDef::writePageDocumentation ( OutputList ol)
private

Definition at line 222 of file pagedef.cpp.

References OutputList::disableAll(), Definition::docFile(), Definition::docLine(), Definition::documentation(), OutputList::enable(), OutputList::endSection(), OutputList::endTextBlock(), OutputList::generateDoc(), Definition::getLanguage(), hasSubPages(), Definition::inbodyDocumentation(), SDict< PageDef >::Iterator, OutputGenerator::Latex, m_nestingLevel, m_subPageDict, Doxygen::markdownSupport, Definition::name(), SectionInfo::Page, SectionInfo::Paragraph, OutputList::parseText(), OutputList::popGeneratorState(), OutputList::pushGeneratorState(), OutputGenerator::RTF, SectionInfo::Section, SrcLangExt_Markdown, OutputList::startSection(), OutputList::startTextBlock(), Doxygen::subpageNestingLevel, SectionInfo::Subsection, SectionInfo::Subsubsection, title(), and writePageDocumentation().

Referenced by writeDocumentation(), and writePageDocumentation().

{
bool markdownEnabled = Doxygen::markdownSupport;
{
}
docFile(), // fileName
docLine(), // startLine
this, // context
0, // memberdef
TRUE, // index words
FALSE // not an example
);
Doxygen::markdownSupport = markdownEnabled;
if (hasSubPages())
{
// for printed documentation we write subpages as section's of the
// parent page.
ol.disableAll();
PageDef *subPage=pdi.toFirst();
for (pdi.toFirst();(subPage=pdi.current());++pdi)
{
switch (m_nestingLevel)
{
case 0: sectionType = SectionInfo::Page; break;
case 1: sectionType = SectionInfo::Section; break;
case 2: sectionType = SectionInfo::Subsection; break;
case 3: sectionType = SectionInfo::Subsubsection; break;
default: sectionType = SectionInfo::Paragraph; break;
}
QCString title = subPage->title();
if (title.isEmpty()) title = subPage->name();
ol.startSection(subPage->name(),title,sectionType);
ol.parseText(title);
ol.endSection(subPage->name(),sectionType);
subPage->writePageDocumentation(ol);
}
}
}
void PageDef::writeTagFile ( FTextStream tagFile)

Definition at line 94 of file pagedef.cpp.

References convertToXML(), endl(), getOutputFileBase(), RefList::listName(), Definition::name(), title(), Definition::writeDocAnchorsToTagFile(), and Doxygen::xrefLists.

Referenced by writeTagFile().

{
bool found = name()=="citelist";
QDictIterator<RefList> rli(*Doxygen::xrefLists);
RefList *rl;
for (rli.toFirst();(rl=rli.current()) && !found;++rli)
{
if (rl->listName()==name())
{
found=TRUE;
break;
}
}
if (!found) // not one of the generated related pages
{
tagFile << " <compound kind=\"page\">" << endl;
tagFile << " <name>" << name() << "</name>" << endl;
tagFile << " <title>" << convertToXML(title()) << "</title>" << endl;
tagFile << " <filename>" << convertToXML(getOutputFileBase()) << "</filename>" << endl;
tagFile << " </compound>" << endl;
}
}

Member Data Documentation

QCString PageDef::m_fileName
private

Definition at line 73 of file pagedef.h.

Referenced by getOutputFileBase(), PageDef(), and setFileName().

int PageDef::m_nestingLevel
private
Definition* PageDef::m_pageScope
private

Definition at line 76 of file pagedef.h.

Referenced by getPageScope(), PageDef(), and setPageScope().

bool PageDef::m_showToc
private

Definition at line 78 of file pagedef.h.

Referenced by PageDef(), setShowToc(), showToc(), and writeDocumentation().

PageSDict* PageDef::m_subPageDict
private
QCString PageDef::m_title
private

Definition at line 74 of file pagedef.h.

Referenced by displayName(), and title().


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