pagedef.h

Go to the documentation of this file.
00001 /******************************************************************************
00002  *
00003  * $Id:$
00004  *
00005  * Copyright (C) 1997-2008 by Dimitri van Heesch.
00006  *
00007  * Permission to use, copy, modify, and distribute this software and its
00008  * documentation under the terms of the GNU General Public License is hereby 
00009  * granted. No representations are made about the suitability of this software 
00010  * for any purpose. It is provided "as is" without express or implied warranty.
00011  * See the GNU General Public License for more details.
00012  *
00013  * Documents produced by Doxygen are derivative works derived from the
00014  * input used in their production; they are not affected by this license.
00015  *
00016  */
00017 
00018 #include "definition.h"
00019 #include "sortdict.h"
00020 
00021 class PageSDict;
00022 class OutputList;
00023 
00024 class PageDef : public Definition
00025 {
00026   public:
00027     PageDef(const char *f,int l,const char *n,const char *d,const char *t);
00028    ~PageDef();
00029     DefType definitionType() const { return TypePage; }
00030     bool isLinkableInProject() const 
00031     { 
00032       return hasDocumentation() && !isReference();
00033     }
00034     bool isLinkable() const 
00035     {
00036       return isLinkableInProject() || isReference();
00037     } 
00038     void addSubPage(PageDef *def);
00039     void writeDocumentation(OutputList &ol);
00040 
00041     // functions to get a uniform interface with Definitions
00042     QCString getOutputFileBase() const;
00043     void findSectionsInDocumentation();
00044     QCString title() const { return m_title; }
00045     GroupDef *  getGroupDef() const;
00046     PageSDict * getSubPages() const { return subPageDict; }
00047     void setFileName(const char *name) { m_fileName = name; }
00048     void addInnerCompound(Definition *d);
00049     bool visibleInIndex() const;
00050     bool documentedPage() const;
00051     bool hasSubPages() const;
00052     void setPageScope(Definition *d){ pageScope = d; }
00053     Definition *getPageScope() const { return pageScope; }
00054 
00055   private:
00056     QCString m_fileName;
00057     QCString m_title;
00058     GroupDef *m_inGroup;
00059     PageSDict *subPageDict;                 // list of pages in the group
00060     Definition *pageScope;
00061 };
00062 
00063 class PageSDict : public SDict<PageDef>
00064 {
00065   public:
00066     PageSDict(int size) : SDict<PageDef>(size) {}
00067     virtual ~PageSDict() {}
00068     int compareItems(GCI i1,GCI i2)
00069     {
00070       return stricmp(((PageDef *)i1)->name(),((PageDef *)i2)->name());
00071     }
00072 };
00073 



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