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_HD_DOCU_HXX
25 #define ADC_DISPLAY_HTML_HD_DOCU_HXX
26 
27 // BASE CLASSES
28 #include <ary/ary_disp.hxx>
29 #include <ary/info/infodisp.hxx>
30 #include <cosv/tpl/processor.hxx>
31 #include "hdimpl.hxx"
32 
33 namespace ary
34 {
35     namespace cpp
36     {
37         class Namespace;
38         class Class;
39         class Enum;
40         class Typedef;
41         class Function;
42         class Variable;
43     }
44 
45     namespace doc
46     {
47      	class Documentation;
48     }
49     namespace info
50     {
51         class DocuText;
52     }
53 
54     class QualifiedName;
55 }
56 
57 class OuputPage_Environment;
58 
59 
60 class Docu_Display : public ary::Display,
61                      public csv::ConstProcessor<ary::cpp::Namespace>,
62                      public csv::ConstProcessor<ary::cpp::Class>,
63                      public csv::ConstProcessor<ary::cpp::Enum>,
64                      public csv::ConstProcessor<ary::cpp::Typedef>,
65                      public csv::ConstProcessor<ary::cpp::Function>,
66                      public csv::ConstProcessor<ary::cpp::Variable>,
67                      public csv::ConstProcessor<ary::doc::Documentation>,
68                      public ary::info::DocuDisplay,
69                      private HtmlDisplay_Impl
70 {
71   public:
72 						Docu_Display(
73 							OuputPage_Environment &
74                                                 io_rEnv );
75 	virtual				~Docu_Display();
76 
77     void                Assign_Out(
78                             csi::xml::Element & o_rOut );
79     void                Unassign_Out();
80 
81     virtual void        Display_StdTag(
82                             const ary::info::StdTag &
83                                                 i_rData );
84     virtual void        Display_BaseTag(
85                             const ary::info::BaseTag &
86                                                 i_rData );
87     virtual void        Display_ExceptionTag(
88                             const ary::info::ExceptionTag &
89                                                 i_rData );
90     virtual void        Display_ImplementsTag(
91                             const ary::info::ImplementsTag &
92                                                 i_rData );
93     virtual void        Display_KeywordTag(
94                             const ary::info::KeywordTag &
95                                                 i_rData );
96     virtual void        Display_ParameterTag(
97                             const ary::info::ParameterTag &
98                                                 i_rData );
99     virtual void        Display_SeeTag(
100                             const ary::info::SeeTag &
101                                                 i_rData );
102     virtual void        Display_TemplateTag(
103                             const ary::info::TemplateTag &
104                                                 i_rData );
105     virtual void        Display_LabelTag(
106                             const ary::info::LabelTag &
107                                                 i_rData );
108     virtual void        Display_SinceTag(
109                             const ary::info::SinceTag &
110                                                 i_rData );
111 
112     virtual void        Display_DT_Text(
113                             const ary::info::DT_Text &
114                                                 i_rData );
115     virtual void        Display_DT_MaybeLink(
116                             const ary::info::DT_MaybeLink &
117                                                 i_rData );
118     virtual void        Display_DT_Whitespace(
119                             const ary::info::DT_Whitespace &
120                                                 i_rData );
121     virtual void        Display_DT_Eol(
122                             const ary::info::DT_Eol &
123                                                 i_rData );
124     virtual void        Display_DT_Xml(
125                             const ary::info::DT_Xml &
126                                                 i_rData );
127 
128     using csv::ConstProcessor<ary::doc::Documentation>::Process;
129 
130   private:
131     // Interface csv::ConstProcessor<>:
132 	virtual void	  	do_Process(
133 							const ary::cpp::Namespace &
134 												i_rData );
135 	virtual void	  	do_Process(
136 							const ary::cpp::Class &
137 												i_rData );
138 	virtual void	  	do_Process(
139 							const ary::cpp::Enum &
140 												i_rData );
141 	virtual void	  	do_Process(
142 							const ary::cpp::Typedef &
143 												i_rData );
144 	virtual void	  	do_Process(
145 							const ary::cpp::Function &
146 												i_rData );
147 	virtual void	  	do_Process(
148 							const ary::cpp::Variable &
149 												i_rData );
150 	virtual void	  	do_Process(
151                             const ary::doc::Documentation &
152                                                 i_rData );
153     // Interface ary::Display:
154     virtual const ary::cpp::Gate *
155                         inq_Get_ReFinder() const;
156     // Locals
157     void                Start_DocuBlock();
158     void                Finish_DocuBlock();
159 
160     void                Write_TagTitle(
161                             const char *        i_sText,
162                             const char *        i_nFontSize = "+0" );
163     void                Write_TagContents(
164                             const ary::info::DocuText &
165                                                 i_rDocuText );
166     void                Write_Text(
167                             const ary::info::DocuText &
168                                                 i_rDocuText );
169     void                Write_TextToken(
170                             const String  &     i_sText );
171     void                Write_LinkableText(
172                             const ary::QualifiedName &
173                                                 i_sQuName );
174     void                Write_QualifiedName(
175                             const ary::QualifiedName &
176                                                 i_sQuName );
177 
178     // DATA
179     bool                bUseHtmlInDocuTokens;
180 
181     /** This is used, if a class documentation is displayed,
182         because for links to members then the "current class"
183         is not the parent, but this class itself.
184     */
185     const ary::cpp::Class *
186                         pCurClassOverwrite;
187 };
188 
189 
190 
191 
192 #endif
193