Root/
Source at commit 1322 created 12 years 7 months ago. By meklort, Add doxygen to utils folder | |
---|---|
1 | /******************************************************************************␊ |
2 | *␊ |
3 | * $Id:$␊ |
4 | *␊ |
5 | * Copyright (C) 1997-2011 by Dimitri van Heesch.␊ |
6 | *␊ |
7 | * Permission to use, copy, modify, and distribute this software and its␊ |
8 | * documentation under the terms of the GNU General Public License is hereby ␊ |
9 | * granted. No representations are made about the suitability of this software ␊ |
10 | * for any purpose. It is provided "as is" without express or implied warranty.␊ |
11 | * See the GNU General Public License for more details.␊ |
12 | *␊ |
13 | * Documents produced by Doxygen are derivative works derived from the␊ |
14 | * input used in their production; they are not affected by this license.␊ |
15 | *␊ |
16 | */␊ |
17 | ␊ |
18 | #include "definition.h"␊ |
19 | #include "sortdict.h"␊ |
20 | ␊ |
21 | class PageSDict;␊ |
22 | class OutputList;␊ |
23 | ␊ |
24 | class PageDef : public Definition␊ |
25 | {␊ |
26 | public:␊ |
27 | PageDef(const char *f,int l,const char *n,const char *d,const char *t);␊ |
28 | ~PageDef();␊ |
29 | DefType definitionType() const { return TypePage; }␊ |
30 | bool isLinkableInProject() const ␊ |
31 | { ␊ |
32 | return /*hasDocumentation() &&*/ !isReference();␊ |
33 | }␊ |
34 | bool isLinkable() const ␊ |
35 | {␊ |
36 | return isLinkableInProject() || isReference();␊ |
37 | } ␊ |
38 | void writeDocumentation(OutputList &ol);␊ |
39 | ␊ |
40 | // functions to get a uniform interface with Definitions␊ |
41 | QCString getOutputFileBase() const;␊ |
42 | void findSectionsInDocumentation();␊ |
43 | QCString title() const { return m_title; }␊ |
44 | GroupDef * getGroupDef() const;␊ |
45 | PageSDict * getSubPages() const { return m_subPageDict; }␊ |
46 | void setFileName(const char *name) { m_fileName = name; }␊ |
47 | void addInnerCompound(Definition *d);␊ |
48 | bool visibleInIndex() const;␊ |
49 | bool documentedPage() const;␊ |
50 | bool hasSubPages() const;␊ |
51 | bool hasParentPage() const;␊ |
52 | void setPageScope(Definition *d){ m_pageScope = d; }␊ |
53 | Definition *getPageScope() const { return m_pageScope; }␊ |
54 | ␊ |
55 | private:␊ |
56 | void setNestingLevel(int l);␊ |
57 | void writePageDocumentation(OutputList &ol);␊ |
58 | QCString m_fileName;␊ |
59 | QCString m_title;␊ |
60 | GroupDef *m_inGroup;␊ |
61 | PageSDict *m_subPageDict; // list of pages in the group␊ |
62 | Definition *m_pageScope;␊ |
63 | int m_nestingLevel;␊ |
64 | };␊ |
65 | ␊ |
66 | class PageSDict : public SDict<PageDef>␊ |
67 | {␊ |
68 | public:␊ |
69 | PageSDict(int size) : SDict<PageDef>(size) {}␊ |
70 | virtual ~PageSDict() {}␊ |
71 | int compareItems(GCI i1,GCI i2)␊ |
72 | {␊ |
73 | return stricmp(((PageDef *)i1)->name(),((PageDef *)i2)->name());␊ |
74 | }␊ |
75 | };␊ |
76 | ␊ |
77 |