|
Packit Service |
50c9f2 |
/******************************************************************************
|
|
Packit Service |
50c9f2 |
*
|
|
Packit Service |
50c9f2 |
*
|
|
Packit Service |
50c9f2 |
*
|
|
Packit Service |
50c9f2 |
* Copyright (C) 1997-2015 by Dimitri van Heesch.
|
|
Packit Service |
50c9f2 |
*
|
|
Packit Service |
50c9f2 |
* Permission to use, copy, modify, and distribute this software and its
|
|
Packit Service |
50c9f2 |
* documentation under the terms of the GNU General Public License is hereby
|
|
Packit Service |
50c9f2 |
* granted. No representations are made about the suitability of this software
|
|
Packit Service |
50c9f2 |
* for any purpose. It is provided "as is" without express or implied warranty.
|
|
Packit Service |
50c9f2 |
* See the GNU General Public License for more details.
|
|
Packit Service |
50c9f2 |
*
|
|
Packit Service |
50c9f2 |
* Documents produced by Doxygen are derivative works derived from the
|
|
Packit Service |
50c9f2 |
* input used in their production; they are not affected by this license.
|
|
Packit Service |
50c9f2 |
*
|
|
Packit Service |
50c9f2 |
*/
|
|
Packit Service |
50c9f2 |
|
|
Packit Service |
50c9f2 |
#ifndef PAGEDEF_H
|
|
Packit Service |
50c9f2 |
#define PAGEDEF_H
|
|
Packit Service |
50c9f2 |
|
|
Packit Service |
50c9f2 |
#include "definition.h"
|
|
Packit Service |
50c9f2 |
#include "sortdict.h"
|
|
Packit Service |
50c9f2 |
|
|
Packit Service |
50c9f2 |
class PageSDict;
|
|
Packit Service |
50c9f2 |
class OutputList;
|
|
Packit Service |
50c9f2 |
class FTextStream;
|
|
Packit Service |
50c9f2 |
|
|
Packit Service |
50c9f2 |
/** @brief A model of a page symbol. */
|
|
Packit Service |
50c9f2 |
class PageDef : public Definition
|
|
Packit Service |
50c9f2 |
{
|
|
Packit Service |
50c9f2 |
public:
|
|
Packit Service |
50c9f2 |
PageDef(const char *f,int l,const char *n,const char *d,const char *t);
|
|
Packit Service |
50c9f2 |
~PageDef();
|
|
Packit Service |
50c9f2 |
|
|
Packit Service |
50c9f2 |
// setters
|
|
Packit Service |
50c9f2 |
void setFileName(const char *name);
|
|
Packit Service |
50c9f2 |
void setShowToc(bool b);
|
|
Packit Service |
50c9f2 |
|
|
Packit Service |
50c9f2 |
// getters
|
|
Packit Service |
50c9f2 |
DefType definitionType() const { return TypePage; }
|
|
Packit Service |
50c9f2 |
bool isLinkableInProject() const
|
|
Packit Service |
50c9f2 |
{
|
|
Packit Service |
50c9f2 |
return /*hasDocumentation() &&*/ !isReference();
|
|
Packit Service |
50c9f2 |
}
|
|
Packit Service |
50c9f2 |
bool isLinkable() const
|
|
Packit Service |
50c9f2 |
{
|
|
Packit Service |
50c9f2 |
return isLinkableInProject() || isReference();
|
|
Packit Service |
50c9f2 |
}
|
|
Packit Service |
50c9f2 |
|
|
Packit Service |
50c9f2 |
// functions to get a uniform interface with Definitions
|
|
Packit Service |
50c9f2 |
QCString getOutputFileBase() const;
|
|
Packit Service |
50c9f2 |
QCString anchor() const { return QCString(); }
|
|
Packit Service |
50c9f2 |
void findSectionsInDocumentation();
|
|
Packit Service |
50c9f2 |
QCString title() const { return m_title; }
|
|
Packit Service |
50c9f2 |
GroupDef * getGroupDef() const;
|
|
Packit Service |
50c9f2 |
PageSDict * getSubPages() const { return m_subPageDict; }
|
|
Packit Service |
50c9f2 |
void addInnerCompound(Definition *d);
|
|
Packit Service |
50c9f2 |
bool visibleInIndex() const;
|
|
Packit Service |
50c9f2 |
bool documentedPage() const;
|
|
Packit Service |
50c9f2 |
bool hasSubPages() const;
|
|
Packit Service |
50c9f2 |
bool hasParentPage() const;
|
|
Packit Service |
50c9f2 |
bool showToc() const { return m_showToc; }
|
|
Packit Service |
50c9f2 |
void setPageScope(Definition *d){ m_pageScope = d; }
|
|
Packit Service |
50c9f2 |
Definition *getPageScope() const { return m_pageScope; }
|
|
Packit Service |
50c9f2 |
QCString displayName(bool=TRUE) const { return !m_title.isEmpty() ? m_title : Definition::name(); }
|
|
Packit Service |
50c9f2 |
|
|
Packit Service |
50c9f2 |
void writeDocumentation(OutputList &ol);
|
|
Packit Service |
50c9f2 |
void writeTagFile(FTextStream &);
|
|
Packit Service |
50c9f2 |
|
|
Packit Service |
50c9f2 |
private:
|
|
Packit Service |
50c9f2 |
void setNestingLevel(int l);
|
|
Packit Service |
50c9f2 |
void writePageDocumentation(OutputList &ol);
|
|
Packit Service |
50c9f2 |
QCString m_fileName;
|
|
Packit Service |
50c9f2 |
QCString m_title;
|
|
Packit Service |
50c9f2 |
PageSDict *m_subPageDict; // list of pages in the group
|
|
Packit Service |
50c9f2 |
Definition *m_pageScope;
|
|
Packit Service |
50c9f2 |
int m_nestingLevel;
|
|
Packit Service |
50c9f2 |
bool m_showToc;
|
|
Packit Service |
50c9f2 |
};
|
|
Packit Service |
50c9f2 |
|
|
Packit Service |
50c9f2 |
class PageSDict : public SDict<PageDef>
|
|
Packit Service |
50c9f2 |
{
|
|
Packit Service |
50c9f2 |
public:
|
|
Packit Service |
50c9f2 |
PageSDict(int size) : SDict<PageDef>(size) {}
|
|
Packit Service |
50c9f2 |
virtual ~PageSDict() {}
|
|
Packit Service |
50c9f2 |
private:
|
|
Packit Service |
50c9f2 |
int compareValues(const PageDef *i1,const PageDef *i2) const
|
|
Packit Service |
50c9f2 |
{
|
|
Packit Service |
50c9f2 |
return qstricmp(i1->name(),i2->name());
|
|
Packit Service |
50c9f2 |
}
|
|
Packit Service |
50c9f2 |
};
|
|
Packit Service |
50c9f2 |
|
|
Packit Service |
50c9f2 |
#endif
|
|
Packit Service |
50c9f2 |
|