1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 #ifndef ADC_DISPLAY_HTML_PAGEMAKE_HXX
25 #define ADC_DISPLAY_HTML_PAGEMAKE_HXX
26 
27 
28 
29 // USED SERVICES
30 	// BASE CLASSES
31 #include <ary/ary_disp.hxx>
32 #include <cosv/tpl/processor.hxx>
33 #include "hdimpl.hxx"
34 	// COMPONENTS
35 	// PARAMETERS
36 #include <ary/cpp/c_namesp.hxx>
37 
38 namespace ary
39 {
40     namespace cpp
41     {
42         class Namespace;
43         class Class;
44         class Enum;
45         class Typedef;
46     }
47     namespace loc
48     {
49         class File;
50     }
51 }
52 
53 
54 class OuputPage_Environment;
55 class HtmlDocuFile;
56 
57 
58 
59 class PageDisplay : public ary::Display,
60                     public csv::ConstProcessor<ary::cpp::Class>,
61                     public csv::ConstProcessor<ary::cpp::Enum>,
62                     public csv::ConstProcessor<ary::cpp::Typedef>,
63                     public HtmlDisplay_Impl
64 {
65   public:
66 						PageDisplay(
67                             OuputPage_Environment &
68                                                 io_rEnv );
69 	virtual				~PageDisplay();
70 
71     void                Create_OverviewFile();
72     void                Create_AllDefsFile();
73     void                Create_IndexFiles();
74     void                Create_HelpFile();
75 
76     void                Create_NamespaceFile();
77 
78     void                Setup_OperationsFile_for(
79                             const ary::loc::File &
80                                                 i_rFile );
81     void                Setup_OperationsFile_for(
82                             const ary::cpp::Class &
83                                                 i_rClass );
84     void                Setup_DataFile_for(
85                             const ary::loc::File &
86                                                 i_rFile );
87     void                Setup_DataFile_for(
88                             const ary::cpp::Class &
89                                                 i_rClass );
90     /// Used with Setup_OperatonsFile_for().
91     void                Create_File();
92 
93 
94     // Interface for Children of SpecializedPageMaker:
95     void                Write_NameChainWithLinks(
96                             const ary::cpp::CodeEntity &
97                                                 i_rCe );
98 
99     // Necessary, to call Process() on this class.
100     using csv::ConstProcessor<ary::cpp::Class>::Process;
101     using csv::ConstProcessor<ary::cpp::Enum>::Process;
102     using csv::ConstProcessor<ary::cpp::Typedef>::Process;
103 
104  private:
105     // Interface csv::ConstProcessor<>:
106 	virtual void	  	do_Process(
107 							const ary::cpp::Class &
108 												i_rData );
109 	virtual void	  	do_Process(
110 							const ary::cpp::Enum &
111 												i_rData );
112 	virtual void	  	do_Process(
113 							const ary::cpp::Typedef &
114 												i_rData );
115     // Interface ary::cpp::Display:
116     virtual const ary::cpp::Gate *
117                         inq_Get_ReFinder() const;
118     // Locals
File()119     HtmlDocuFile &      File()                  { return *pMyFile; }
120     void                RecursiveWrite_NamespaceLink(
121                             const ary::cpp::Namespace *
122                                                 i_pNamespace );
123     void                RecursiveWrite_ClassLink(
124                             const ary::cpp::Class *
125                                                 i_pClass,
126                             uintt               i_nLevelDistance );
127     void                SetupFileOnCurEnv(
128                             const char *        i_sTitle );
129     void                Write_NavBar_Enum(
130                             const ary::cpp::Enum &
131                                                 i_rData );
132     void                Write_TopArea_Enum(
133                             const ary::cpp::Enum &
134                                                 i_rData );
135     void                Write_DocuArea_Enum(
136                             const ary::cpp::Enum &
137                                                 i_rData );
138     void                Write_ChildList_Enum(
139                             const ary::cpp::Enum &
140                                                 i_rData );
141     void                Write_NavBar_Typedef(
142                             const ary::cpp::Typedef &
143                                                 i_rData );
144     void                Write_TopArea_Typedef(
145                             const ary::cpp::Typedef &
146                                                 i_rData );
147     void                Write_DocuArea_Typedef(
148                             const ary::cpp::Typedef &
149                                                 i_rData );
150     void                Create_IndexFile(
151                             int                 i_nLetter );
152 
153 	// DATA
154 	Dyn<HtmlDocuFile>	pMyFile;
155 };
156 
157 
158 
159 
160 #endif
161