1 # This file is part of NIT ( http://www.nitlanguage.org ).
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
7 # http://www.apache.org/licenses/LICENSE-2.0
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
15 # Create DocPage instances for each documentated Mentity.
20 # ExtractionPhase populates the DocModel with DocPage.
24 # Instanciates documentation pages for the given DocModel.
26 doc
.add_page
new OverviewPage("overview", "Overview")
27 doc
.add_page
new SearchPage("search", "Index")
28 for mgroup
in doc
.mgroups
do
29 doc
.add_page
new MGroupPage(mgroup
)
31 for mmodule
in doc
.mmodules
do
32 doc
.add_page
new MModulePage(mmodule
)
34 for mclass
in doc
.mclasses
do
35 doc
.add_page
new MClassPage(mclass
)
37 for mproperty
in doc
.mproperties
do
38 doc
.add_page
new MPropertyPage(mproperty
)
43 # The Nitdoc overview page.
48 # The Nidoc full index page.
53 # A DocPage documenting a MEntity.
58 # Type of MEntity documented by this page.
61 # MEntity documented by this page.
64 redef var id
is lazy
do return mentity
.nitdoc_id
65 redef var title
is lazy
do return mentity
.nitdoc_name
68 # A documentation page about a MGroup.
72 redef type MENTITY: MGroup
75 # A documentation page about a MModule.
79 redef type MENTITY: MModule
82 # A documentation page about a MClass.
86 redef type MENTITY: MClass
89 # A documentation page about a MProperty.
93 redef type MENTITY: MProperty