1*1c78a5d6SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*1c78a5d6SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*1c78a5d6SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*1c78a5d6SAndrew Rist  * distributed with this work for additional information
6*1c78a5d6SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*1c78a5d6SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*1c78a5d6SAndrew Rist  * "License"); you may not use this file except in compliance
9*1c78a5d6SAndrew Rist  * with the License.  You may obtain a copy of the License at
10*1c78a5d6SAndrew Rist  *
11*1c78a5d6SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*1c78a5d6SAndrew Rist  *
13*1c78a5d6SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*1c78a5d6SAndrew Rist  * software distributed under the License is distributed on an
15*1c78a5d6SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*1c78a5d6SAndrew Rist  * KIND, either express or implied.  See the License for the
17*1c78a5d6SAndrew Rist  * specific language governing permissions and limitations
18*1c78a5d6SAndrew Rist  * under the License.
19*1c78a5d6SAndrew Rist  *
20*1c78a5d6SAndrew Rist  *************************************************************/
21*1c78a5d6SAndrew Rist 
22*1c78a5d6SAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir #ifndef ADC_DISPLAY_HTML_HD_CHLST_HXX
25cdf0e10cSrcweir #define ADC_DISPLAY_HTML_HD_CHLST_HXX
26cdf0e10cSrcweir 
27cdf0e10cSrcweir // BASE CLASSES
28cdf0e10cSrcweir #include <ary/ary_disp.hxx>
29cdf0e10cSrcweir #include <cosv/tpl/processor.hxx>
30cdf0e10cSrcweir 
31cdf0e10cSrcweir // USED SERVICES
32cdf0e10cSrcweir #include <ary/cpp/c_types4cpp.hxx>
33cdf0e10cSrcweir #include "hdimpl.hxx"
34cdf0e10cSrcweir 
35cdf0e10cSrcweir 
36cdf0e10cSrcweir 
37cdf0e10cSrcweir namespace ary
38cdf0e10cSrcweir {
39cdf0e10cSrcweir     namespace cpp
40cdf0e10cSrcweir     {
41cdf0e10cSrcweir         class Namespace;
42cdf0e10cSrcweir         class Class;
43cdf0e10cSrcweir         class Enum;
44cdf0e10cSrcweir         class Typedef;
45cdf0e10cSrcweir         class Function;
46cdf0e10cSrcweir         class Variable;
47cdf0e10cSrcweir         class EnumValue;
48cdf0e10cSrcweir     }
49cdf0e10cSrcweir     namespace info
50cdf0e10cSrcweir     {
51cdf0e10cSrcweir         class DocuText;
52cdf0e10cSrcweir     }
53cdf0e10cSrcweir }
54cdf0e10cSrcweir 
55cdf0e10cSrcweir class Docu_Display;
56cdf0e10cSrcweir class ProtectionArea;
57cdf0e10cSrcweir 
58cdf0e10cSrcweir class ChildList_Display : public ary::Display,
59cdf0e10cSrcweir                           public csv::ConstProcessor<ary::cpp::Namespace>,
60cdf0e10cSrcweir                           public csv::ConstProcessor<ary::cpp::Class>,
61cdf0e10cSrcweir                           public csv::ConstProcessor<ary::cpp::Enum>,
62cdf0e10cSrcweir                           public csv::ConstProcessor<ary::cpp::Typedef>,
63cdf0e10cSrcweir                           public csv::ConstProcessor<ary::cpp::Function>,
64cdf0e10cSrcweir                           public csv::ConstProcessor<ary::cpp::Variable>,
65cdf0e10cSrcweir                           public csv::ConstProcessor<ary::cpp::EnumValue>,
66cdf0e10cSrcweir                           private HtmlDisplay_Impl
67cdf0e10cSrcweir {
68cdf0e10cSrcweir   public:
69cdf0e10cSrcweir     struct Area_Result
70cdf0e10cSrcweir     {
71cdf0e10cSrcweir         bool &              rChildrenExist;
72cdf0e10cSrcweir         csi::xml::Element & rOut;
73cdf0e10cSrcweir 
Area_ResultChildList_Display::Area_Result74cdf0e10cSrcweir                             Area_Result(
75cdf0e10cSrcweir                                 bool &                  o_rChildrenExist,
76cdf0e10cSrcweir                                 csi::xml::Element &     o_rOut )
77cdf0e10cSrcweir                                 :   rChildrenExist(o_rChildrenExist),
78cdf0e10cSrcweir                                     rOut(o_rOut) {}
79cdf0e10cSrcweir     };
80cdf0e10cSrcweir 
81cdf0e10cSrcweir 
82cdf0e10cSrcweir 						ChildList_Display(
83cdf0e10cSrcweir                             OuputPage_Environment &
84cdf0e10cSrcweir                                                 io_rEnv );
85cdf0e10cSrcweir 						ChildList_Display(
86cdf0e10cSrcweir                             OuputPage_Environment &
87cdf0e10cSrcweir                                                 io_rEnv,
88cdf0e10cSrcweir                             const ary::cpp::Class &
89cdf0e10cSrcweir                                                 i_rClass );
90cdf0e10cSrcweir 						ChildList_Display(
91cdf0e10cSrcweir                             OuputPage_Environment &
92cdf0e10cSrcweir                                                 io_rEnv,
93cdf0e10cSrcweir                             const ary::cpp::Enum &
94cdf0e10cSrcweir                                                 i_rEnum );
95cdf0e10cSrcweir 
96cdf0e10cSrcweir 	virtual				~ChildList_Display();
97cdf0e10cSrcweir 
98cdf0e10cSrcweir     void                Run_Simple(
99cdf0e10cSrcweir                             Area_Result &       o_rResult,
100cdf0e10cSrcweir                             ary::SlotAccessId   i_nSlot,
101cdf0e10cSrcweir                             const char *        i_sListLabel,
102cdf0e10cSrcweir                             const char *        i_sListTitle );
103cdf0e10cSrcweir     void                Run_GlobalClasses(
104cdf0e10cSrcweir                             Area_Result &       o_rResult,
105cdf0e10cSrcweir                             ary::SlotAccessId   i_nSlot,
106cdf0e10cSrcweir                             const char *        i_sListLabel,
107cdf0e10cSrcweir                             const char *        i_sListTitle,
108cdf0e10cSrcweir                             ary::cpp::E_ClassKey
109cdf0e10cSrcweir                                                 i_eFilter );
110cdf0e10cSrcweir     void                Run_Members(
111cdf0e10cSrcweir                             Area_Result &       o_rResult_public,
112cdf0e10cSrcweir                             Area_Result &       o_rResult_protected,
113cdf0e10cSrcweir                             Area_Result &       o_rResult_private,
114cdf0e10cSrcweir                             ary::SlotAccessId   i_nSlot,
115cdf0e10cSrcweir                             const char *        i_sListLabel_public,
116cdf0e10cSrcweir                             const char *        i_sListLabel_protected,
117cdf0e10cSrcweir                             const char *        i_sListLabel_private,
118cdf0e10cSrcweir                             const char *        i_sListTitle );
119cdf0e10cSrcweir     void                Run_MemberClasses(
120cdf0e10cSrcweir                             Area_Result &       o_rResult_public,
121cdf0e10cSrcweir                             Area_Result &       o_rResult_protected,
122cdf0e10cSrcweir                             Area_Result &       o_rResult_private,
123cdf0e10cSrcweir                             ary::SlotAccessId   i_nSlot,
124cdf0e10cSrcweir                             const char *        i_sListLabel_public,
125cdf0e10cSrcweir                             const char *        i_sListLabel_protected,
126cdf0e10cSrcweir                             const char *        i_sListLabel_private,
127cdf0e10cSrcweir                             const char *        i_sListTitle,
128cdf0e10cSrcweir                             ary::cpp::E_ClassKey
129cdf0e10cSrcweir                                                 i_eFilter );
130cdf0e10cSrcweir   private:
131cdf0e10cSrcweir     // Interface csv::ConstProcessor<>:
132cdf0e10cSrcweir 	virtual void	  	do_Process(
133cdf0e10cSrcweir                             const ary::cpp::Namespace &
134cdf0e10cSrcweir                                                 i_rData );
135cdf0e10cSrcweir     /** i_rData is shown only, if it passes two filters:
136cdf0e10cSrcweir         it must have the right protection, checked with pFilter,
137cdf0e10cSrcweir         and the right class key (class,struct,union), checked with
138cdf0e10cSrcweir         pClassFilter. A not exsting filter allows i_rData to be
139cdf0e10cSrcweir         displayed.
140cdf0e10cSrcweir     */
141cdf0e10cSrcweir 	virtual void	  	do_Process(
142cdf0e10cSrcweir 							const ary::cpp::Class &
143cdf0e10cSrcweir 												i_rData );
144cdf0e10cSrcweir 	virtual void	  	do_Process(
145cdf0e10cSrcweir 							const ary::cpp::Enum &
146cdf0e10cSrcweir 												i_rData );
147cdf0e10cSrcweir 	virtual void	  	do_Process(
148cdf0e10cSrcweir 							const ary::cpp::Typedef &
149cdf0e10cSrcweir 												i_rData );
150cdf0e10cSrcweir 	virtual void	  	do_Process(
151cdf0e10cSrcweir 							const ary::cpp::Function &
152cdf0e10cSrcweir 												i_rData );
153cdf0e10cSrcweir 	virtual void	  	do_Process(
154cdf0e10cSrcweir 							const ary::cpp::Variable &
155cdf0e10cSrcweir 												i_rData );
156cdf0e10cSrcweir 	virtual void	  	do_Process(
157cdf0e10cSrcweir                             const ary::cpp::EnumValue &
158cdf0e10cSrcweir                                                 i_rData );
159cdf0e10cSrcweir   private:
160cdf0e10cSrcweir     // Interface ary::Display:
161cdf0e10cSrcweir     virtual void        do_StartSlot();
162cdf0e10cSrcweir     virtual void        do_FinishSlot();
163cdf0e10cSrcweir     virtual const ary::cpp::Gate *
164cdf0e10cSrcweir                         inq_Get_ReFinder() const;
165cdf0e10cSrcweir     // Locals
166cdf0e10cSrcweir     struct S_AreaCo;
167cdf0e10cSrcweir     void                Write_ListItem(
168cdf0e10cSrcweir                             const String &      i_sLeftText,
169cdf0e10cSrcweir                             const char *        i_sLink,
170cdf0e10cSrcweir                             const ary::info::DocuText &
171cdf0e10cSrcweir                                                 i_rRightText,
172cdf0e10cSrcweir                             csi::xml::Element & rOut );
173cdf0e10cSrcweir     const ary::AryGroup &
174cdf0e10cSrcweir                         ActiveParent();
175cdf0e10cSrcweir     ProtectionArea &    GetArea();
176cdf0e10cSrcweir     ProtectionArea &    GetArea(
177cdf0e10cSrcweir                             ary::cpp::E_Protection
178cdf0e10cSrcweir                                                 i_eProtection );
SetClassesFilter(ary::cpp::E_ClassKey i_eFilter)179cdf0e10cSrcweir     void                SetClassesFilter(
180cdf0e10cSrcweir                             ary::cpp::E_ClassKey
181cdf0e10cSrcweir                                                 i_eFilter )
182cdf0e10cSrcweir                                                 { peClassesFilter = new ary::cpp::E_ClassKey(i_eFilter); }
UnsetClassesFilter()183cdf0e10cSrcweir     void                UnsetClassesFilter()    { peClassesFilter = 0; }
184cdf0e10cSrcweir 
185cdf0e10cSrcweir     // DATA
186cdf0e10cSrcweir     Dyn<Docu_Display>   pShortDocu_Display;
187cdf0e10cSrcweir     const ary::cpp::Class *
188cdf0e10cSrcweir                         pActiveParentClass;
189cdf0e10cSrcweir     const ary::cpp::Enum *
190cdf0e10cSrcweir                         pActiveParentEnum;
191cdf0e10cSrcweir 
192cdf0e10cSrcweir     Dyn<S_AreaCo>       pSglArea;
193cdf0e10cSrcweir     Dyn<S_AreaCo>       aMemberAreas[3];
194cdf0e10cSrcweir 
195cdf0e10cSrcweir     Dyn<ary::cpp::E_ClassKey>
196cdf0e10cSrcweir                         peClassesFilter;
197cdf0e10cSrcweir };
198cdf0e10cSrcweir 
199cdf0e10cSrcweir 
200cdf0e10cSrcweir 
201cdf0e10cSrcweir 
202cdf0e10cSrcweir #endif
203