xref: /AOO41X/main/autodoc/source/display/html/hd_chlst.cxx (revision cdf0e10c4e3984b49a9502b011690b615761d4a3)
1*cdf0e10cSrcweir /*************************************************************************
2*cdf0e10cSrcweir  *
3*cdf0e10cSrcweir  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4*cdf0e10cSrcweir  *
5*cdf0e10cSrcweir  * Copyright 2000, 2010 Oracle and/or its affiliates.
6*cdf0e10cSrcweir  *
7*cdf0e10cSrcweir  * OpenOffice.org - a multi-platform office productivity suite
8*cdf0e10cSrcweir  *
9*cdf0e10cSrcweir  * This file is part of OpenOffice.org.
10*cdf0e10cSrcweir  *
11*cdf0e10cSrcweir  * OpenOffice.org is free software: you can redistribute it and/or modify
12*cdf0e10cSrcweir  * it under the terms of the GNU Lesser General Public License version 3
13*cdf0e10cSrcweir  * only, as published by the Free Software Foundation.
14*cdf0e10cSrcweir  *
15*cdf0e10cSrcweir  * OpenOffice.org is distributed in the hope that it will be useful,
16*cdf0e10cSrcweir  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17*cdf0e10cSrcweir  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18*cdf0e10cSrcweir  * GNU Lesser General Public License version 3 for more details
19*cdf0e10cSrcweir  * (a copy is included in the LICENSE file that accompanied this code).
20*cdf0e10cSrcweir  *
21*cdf0e10cSrcweir  * You should have received a copy of the GNU Lesser General Public License
22*cdf0e10cSrcweir  * version 3 along with OpenOffice.org.  If not, see
23*cdf0e10cSrcweir  * <http://www.openoffice.org/license.html>
24*cdf0e10cSrcweir  * for a copy of the LGPLv3 License.
25*cdf0e10cSrcweir  *
26*cdf0e10cSrcweir  ************************************************************************/
27*cdf0e10cSrcweir 
28*cdf0e10cSrcweir #include <precomp.h>
29*cdf0e10cSrcweir #include "hd_chlst.hxx"
30*cdf0e10cSrcweir 
31*cdf0e10cSrcweir 
32*cdf0e10cSrcweir // NOT FULLY DEFINED SERVICES
33*cdf0e10cSrcweir #include <ary/ceslot.hxx>
34*cdf0e10cSrcweir #include <ary/cpp/c_gate.hxx>
35*cdf0e10cSrcweir #include <ary/cpp/c_namesp.hxx>
36*cdf0e10cSrcweir #include <ary/cpp/c_class.hxx>
37*cdf0e10cSrcweir #include <ary/cpp/c_enum.hxx>
38*cdf0e10cSrcweir #include <ary/cpp/c_tydef.hxx>
39*cdf0e10cSrcweir #include <ary/cpp/c_funct.hxx>
40*cdf0e10cSrcweir #include <ary/cpp/c_vari.hxx>
41*cdf0e10cSrcweir #include <ary/cpp/c_enuval.hxx>
42*cdf0e10cSrcweir #include <ary/loc/loc_file.hxx>
43*cdf0e10cSrcweir #include <ary/loc/locp_le.hxx>
44*cdf0e10cSrcweir #include <ary/doc/d_oldcppdocu.hxx>
45*cdf0e10cSrcweir #include <ary/info/ci_attag.hxx>
46*cdf0e10cSrcweir #include <ary/info/ci_text.hxx>
47*cdf0e10cSrcweir #include <ary/info/all_dts.hxx>
48*cdf0e10cSrcweir #include "hd_docu.hxx"
49*cdf0e10cSrcweir #include "opageenv.hxx"
50*cdf0e10cSrcweir #include "protarea.hxx"
51*cdf0e10cSrcweir #include "strconst.hxx"
52*cdf0e10cSrcweir 
53*cdf0e10cSrcweir 
54*cdf0e10cSrcweir using namespace csi;
55*cdf0e10cSrcweir using html::Table;
56*cdf0e10cSrcweir using html::TableRow;
57*cdf0e10cSrcweir using html::TableCell;
58*cdf0e10cSrcweir using html::Font;
59*cdf0e10cSrcweir using html::SizeAttr;
60*cdf0e10cSrcweir using html::BgColorAttr;
61*cdf0e10cSrcweir using html::WidthAttr;
62*cdf0e10cSrcweir 
63*cdf0e10cSrcweir 
64*cdf0e10cSrcweir const int   ixPublic = 0;
65*cdf0e10cSrcweir const int   ixProtected = 1;
66*cdf0e10cSrcweir const int   ixPrivate = 2;
67*cdf0e10cSrcweir 
68*cdf0e10cSrcweir struct ChildList_Display::S_AreaCo
69*cdf0e10cSrcweir {
70*cdf0e10cSrcweir   public:
71*cdf0e10cSrcweir     ProtectionArea      aArea;
72*cdf0e10cSrcweir     Area_Result *       pResult;
73*cdf0e10cSrcweir 
74*cdf0e10cSrcweir                         S_AreaCo(
75*cdf0e10cSrcweir                             Area_Result &       o_rResult,
76*cdf0e10cSrcweir                             const char *        i_sLabel,
77*cdf0e10cSrcweir                             const char *        i_sTitle );
78*cdf0e10cSrcweir                         ~S_AreaCo();
79*cdf0e10cSrcweir 
80*cdf0e10cSrcweir     void                PerformResult();
81*cdf0e10cSrcweir 
82*cdf0e10cSrcweir   private:
83*cdf0e10cSrcweir     csi::xml::Element & Out()                   { return pResult->rOut; }
84*cdf0e10cSrcweir };
85*cdf0e10cSrcweir 
86*cdf0e10cSrcweir 
87*cdf0e10cSrcweir const ary::info::DocuText &
88*cdf0e10cSrcweir ShortDocu( const ary::cpp::CodeEntity & i_rCe )
89*cdf0e10cSrcweir {
90*cdf0e10cSrcweir     static const ary::info::DocuText
91*cdf0e10cSrcweir         aNull_;
92*cdf0e10cSrcweir 
93*cdf0e10cSrcweir     const ary::doc::OldCppDocu *
94*cdf0e10cSrcweir             pInfo = dynamic_cast< const ary::doc::OldCppDocu* >( i_rCe.Docu().Data() );
95*cdf0e10cSrcweir     if (pInfo == 0)
96*cdf0e10cSrcweir         return aNull_;
97*cdf0e10cSrcweir 
98*cdf0e10cSrcweir     return pInfo->Short().CText();
99*cdf0e10cSrcweir }
100*cdf0e10cSrcweir 
101*cdf0e10cSrcweir 
102*cdf0e10cSrcweir ChildList_Display::ChildList_Display( OuputPage_Environment & io_rEnv )
103*cdf0e10cSrcweir     :   HtmlDisplay_Impl( io_rEnv ),
104*cdf0e10cSrcweir         pShortDocu_Display( new Docu_Display(io_rEnv) ),
105*cdf0e10cSrcweir         pActiveParentClass(0),
106*cdf0e10cSrcweir         pActiveParentEnum(0),
107*cdf0e10cSrcweir         // pSglArea,
108*cdf0e10cSrcweir         // aMemberAreas,
109*cdf0e10cSrcweir         peClassesFilter(0)
110*cdf0e10cSrcweir {
111*cdf0e10cSrcweir }
112*cdf0e10cSrcweir 
113*cdf0e10cSrcweir ChildList_Display::ChildList_Display( OuputPage_Environment & io_rEnv,
114*cdf0e10cSrcweir                                       const ary::cpp::Class & i_rClass )
115*cdf0e10cSrcweir     :   HtmlDisplay_Impl( io_rEnv ),
116*cdf0e10cSrcweir         pShortDocu_Display( new Docu_Display(io_rEnv) ),
117*cdf0e10cSrcweir         pActiveParentClass(&i_rClass),
118*cdf0e10cSrcweir         pActiveParentEnum(0),
119*cdf0e10cSrcweir         // pSglArea,
120*cdf0e10cSrcweir         // aMemberAreas,
121*cdf0e10cSrcweir         peClassesFilter(0)
122*cdf0e10cSrcweir {
123*cdf0e10cSrcweir }
124*cdf0e10cSrcweir 
125*cdf0e10cSrcweir ChildList_Display::ChildList_Display( OuputPage_Environment & io_rEnv,
126*cdf0e10cSrcweir                                       const ary::cpp::Enum &  i_rEnum )
127*cdf0e10cSrcweir     :   HtmlDisplay_Impl( io_rEnv ),
128*cdf0e10cSrcweir         pShortDocu_Display( new Docu_Display(io_rEnv) ),
129*cdf0e10cSrcweir         pActiveParentClass(0),
130*cdf0e10cSrcweir         pActiveParentEnum(&i_rEnum),
131*cdf0e10cSrcweir         // pSglArea,
132*cdf0e10cSrcweir         // aMemberAreas,
133*cdf0e10cSrcweir         peClassesFilter(0)
134*cdf0e10cSrcweir {
135*cdf0e10cSrcweir }
136*cdf0e10cSrcweir 
137*cdf0e10cSrcweir ChildList_Display::~ChildList_Display()
138*cdf0e10cSrcweir {
139*cdf0e10cSrcweir }
140*cdf0e10cSrcweir 
141*cdf0e10cSrcweir void
142*cdf0e10cSrcweir ChildList_Display::Run_Simple( Area_Result &       o_rResult,
143*cdf0e10cSrcweir                                ary::SlotAccessId   i_nSlot,
144*cdf0e10cSrcweir                                const char *        i_sListLabel,
145*cdf0e10cSrcweir                                const char *        i_sListTitle )
146*cdf0e10cSrcweir {
147*cdf0e10cSrcweir 	ary::Slot_AutoPtr
148*cdf0e10cSrcweir             pSlot( ActiveParent().Create_Slot( i_nSlot ) );
149*cdf0e10cSrcweir     if ( pSlot->Size() == 0 )
150*cdf0e10cSrcweir         return;
151*cdf0e10cSrcweir 
152*cdf0e10cSrcweir     pSglArea = new S_AreaCo( o_rResult,
153*cdf0e10cSrcweir                              i_sListLabel,
154*cdf0e10cSrcweir                              i_sListTitle );
155*cdf0e10cSrcweir 
156*cdf0e10cSrcweir     pSlot->StoreAt(*this);
157*cdf0e10cSrcweir 
158*cdf0e10cSrcweir     pSglArea->PerformResult();
159*cdf0e10cSrcweir     pSglArea = 0;
160*cdf0e10cSrcweir }
161*cdf0e10cSrcweir 
162*cdf0e10cSrcweir void
163*cdf0e10cSrcweir ChildList_Display::Run_GlobalClasses( Area_Result &        o_rResult,
164*cdf0e10cSrcweir                                       ary::SlotAccessId    i_nSlot,
165*cdf0e10cSrcweir                                       const char *         i_sListLabel,
166*cdf0e10cSrcweir                                       const char *         i_sListTitle,
167*cdf0e10cSrcweir                                       ary::cpp::E_ClassKey i_eFilter )
168*cdf0e10cSrcweir {
169*cdf0e10cSrcweir 	ary::Slot_AutoPtr
170*cdf0e10cSrcweir             pSlot( ActiveParent().Create_Slot( i_nSlot ) );
171*cdf0e10cSrcweir     if ( pSlot->Size() == 0 )
172*cdf0e10cSrcweir         return;
173*cdf0e10cSrcweir 
174*cdf0e10cSrcweir     pSglArea = new S_AreaCo( o_rResult,
175*cdf0e10cSrcweir                              i_sListLabel,
176*cdf0e10cSrcweir                              i_sListTitle );
177*cdf0e10cSrcweir 
178*cdf0e10cSrcweir     SetClassesFilter(i_eFilter);
179*cdf0e10cSrcweir     pSlot->StoreAt(*this);
180*cdf0e10cSrcweir     UnsetClassesFilter();
181*cdf0e10cSrcweir 
182*cdf0e10cSrcweir     pSglArea->PerformResult();
183*cdf0e10cSrcweir     pSglArea = 0;
184*cdf0e10cSrcweir }
185*cdf0e10cSrcweir 
186*cdf0e10cSrcweir void
187*cdf0e10cSrcweir ChildList_Display::Run_Members( Area_Result &           o_rResult_public,
188*cdf0e10cSrcweir                                 Area_Result &           o_rResult_protected,
189*cdf0e10cSrcweir                                 Area_Result &           o_rResult_private,
190*cdf0e10cSrcweir                                 ary::SlotAccessId       i_nSlot,
191*cdf0e10cSrcweir                                 const char *            i_sListLabel_public,
192*cdf0e10cSrcweir                                 const char *            i_sListLabel_protected,
193*cdf0e10cSrcweir                                 const char *            i_sListLabel_private,
194*cdf0e10cSrcweir                                 const char *            i_sListTitle )
195*cdf0e10cSrcweir {
196*cdf0e10cSrcweir 	ary::Slot_AutoPtr
197*cdf0e10cSrcweir             pSlot( ActiveParent().Create_Slot(i_nSlot) );
198*cdf0e10cSrcweir     if ( pSlot->Size() == 0 )
199*cdf0e10cSrcweir         return;
200*cdf0e10cSrcweir 
201*cdf0e10cSrcweir     aMemberAreas[ixPublic] = new S_AreaCo( o_rResult_public,
202*cdf0e10cSrcweir                                          i_sListLabel_public,
203*cdf0e10cSrcweir                                          i_sListTitle );
204*cdf0e10cSrcweir     aMemberAreas[ixProtected] = new S_AreaCo( o_rResult_protected,
205*cdf0e10cSrcweir                                             i_sListLabel_protected,
206*cdf0e10cSrcweir                                             i_sListTitle );
207*cdf0e10cSrcweir     aMemberAreas[ixPrivate] = new S_AreaCo( o_rResult_private,
208*cdf0e10cSrcweir                                           i_sListLabel_private,
209*cdf0e10cSrcweir                                           i_sListTitle );
210*cdf0e10cSrcweir 
211*cdf0e10cSrcweir     pSlot->StoreAt(*this);
212*cdf0e10cSrcweir 
213*cdf0e10cSrcweir     aMemberAreas[ixPublic]->PerformResult();
214*cdf0e10cSrcweir     aMemberAreas[ixProtected]->PerformResult();
215*cdf0e10cSrcweir     aMemberAreas[ixPrivate]->PerformResult();
216*cdf0e10cSrcweir 
217*cdf0e10cSrcweir     aMemberAreas[ixPublic] = 0;
218*cdf0e10cSrcweir     aMemberAreas[ixProtected] = 0;
219*cdf0e10cSrcweir     aMemberAreas[ixPrivate] = 0;
220*cdf0e10cSrcweir }
221*cdf0e10cSrcweir 
222*cdf0e10cSrcweir void
223*cdf0e10cSrcweir ChildList_Display::Run_MemberClasses( Area_Result &         o_rResult_public,
224*cdf0e10cSrcweir                                       Area_Result &         o_rResult_protected,
225*cdf0e10cSrcweir                                       Area_Result &         o_rResult_private,
226*cdf0e10cSrcweir                                       ary::SlotAccessId     i_nSlot,
227*cdf0e10cSrcweir                                       const char *          i_sListLabel_public,
228*cdf0e10cSrcweir                                       const char *          i_sListLabel_protected,
229*cdf0e10cSrcweir                                       const char *          i_sListLabel_private,
230*cdf0e10cSrcweir                                       const char *          i_sListTitle,
231*cdf0e10cSrcweir                                       ary::cpp::E_ClassKey  i_eFilter )
232*cdf0e10cSrcweir {
233*cdf0e10cSrcweir 	ary::Slot_AutoPtr
234*cdf0e10cSrcweir             pSlot( ActiveParent().Create_Slot(i_nSlot) );
235*cdf0e10cSrcweir     if ( pSlot->Size() == 0 )
236*cdf0e10cSrcweir         return;
237*cdf0e10cSrcweir 
238*cdf0e10cSrcweir     aMemberAreas[ixPublic] = new S_AreaCo( o_rResult_public,
239*cdf0e10cSrcweir                                            i_sListLabel_public,
240*cdf0e10cSrcweir                                            i_sListTitle );
241*cdf0e10cSrcweir     aMemberAreas[ixProtected] = new S_AreaCo( o_rResult_protected,
242*cdf0e10cSrcweir                                               i_sListLabel_protected,
243*cdf0e10cSrcweir                                               i_sListTitle );
244*cdf0e10cSrcweir     aMemberAreas[ixPrivate] = new S_AreaCo( o_rResult_private,
245*cdf0e10cSrcweir                                             i_sListLabel_private,
246*cdf0e10cSrcweir                                             i_sListTitle );
247*cdf0e10cSrcweir 
248*cdf0e10cSrcweir     SetClassesFilter(i_eFilter);
249*cdf0e10cSrcweir     pSlot->StoreAt(*this);
250*cdf0e10cSrcweir     UnsetClassesFilter();
251*cdf0e10cSrcweir 
252*cdf0e10cSrcweir     aMemberAreas[ixPublic]->PerformResult();
253*cdf0e10cSrcweir     aMemberAreas[ixProtected]->PerformResult();
254*cdf0e10cSrcweir     aMemberAreas[ixPrivate]->PerformResult();
255*cdf0e10cSrcweir 
256*cdf0e10cSrcweir     aMemberAreas[ixPublic] = 0;
257*cdf0e10cSrcweir     aMemberAreas[ixProtected] = 0;
258*cdf0e10cSrcweir     aMemberAreas[ixPrivate] = 0;
259*cdf0e10cSrcweir }
260*cdf0e10cSrcweir 
261*cdf0e10cSrcweir void
262*cdf0e10cSrcweir ChildList_Display::do_Process( const ary::cpp::Namespace & i_rData )
263*cdf0e10cSrcweir {
264*cdf0e10cSrcweir     Write_ListItem( i_rData.LocalName(),
265*cdf0e10cSrcweir                     Path2ChildNamespace(i_rData.LocalName()),
266*cdf0e10cSrcweir                     ShortDocu( i_rData ),
267*cdf0e10cSrcweir                     GetArea().GetTable() );
268*cdf0e10cSrcweir }
269*cdf0e10cSrcweir 
270*cdf0e10cSrcweir void
271*cdf0e10cSrcweir ChildList_Display::do_Process( const ary::cpp::Class & i_rData )
272*cdf0e10cSrcweir {
273*cdf0e10cSrcweir     if ( Ce_IsInternal(i_rData) )
274*cdf0e10cSrcweir         return;
275*cdf0e10cSrcweir 
276*cdf0e10cSrcweir     if (peClassesFilter)
277*cdf0e10cSrcweir     {
278*cdf0e10cSrcweir      	if (*peClassesFilter != i_rData.ClassKey() )
279*cdf0e10cSrcweir             return;
280*cdf0e10cSrcweir     }
281*cdf0e10cSrcweir 
282*cdf0e10cSrcweir     String  sLink;
283*cdf0e10cSrcweir     if ( i_rData.Protection() == ary::cpp::PROTECT_global )
284*cdf0e10cSrcweir     {
285*cdf0e10cSrcweir         sLink = ClassFileName(i_rData.LocalName());
286*cdf0e10cSrcweir 
287*cdf0e10cSrcweir     }
288*cdf0e10cSrcweir     else
289*cdf0e10cSrcweir     {
290*cdf0e10cSrcweir         csv_assert( pActiveParentClass != 0 );
291*cdf0e10cSrcweir         sLink = Path2Child( ClassFileName(i_rData.LocalName()), pActiveParentClass->LocalName() );
292*cdf0e10cSrcweir     }
293*cdf0e10cSrcweir 
294*cdf0e10cSrcweir     if (peClassesFilter)
295*cdf0e10cSrcweir     {
296*cdf0e10cSrcweir         Write_ListItem( i_rData.LocalName(),
297*cdf0e10cSrcweir                         sLink,
298*cdf0e10cSrcweir                         ShortDocu( i_rData ),
299*cdf0e10cSrcweir                         GetArea(i_rData.Protection())
300*cdf0e10cSrcweir                             .GetTable() );
301*cdf0e10cSrcweir     }
302*cdf0e10cSrcweir     else
303*cdf0e10cSrcweir     {
304*cdf0e10cSrcweir         Write_ListItem( i_rData.LocalName(),
305*cdf0e10cSrcweir                         sLink,
306*cdf0e10cSrcweir                         ShortDocu( i_rData ),
307*cdf0e10cSrcweir                         GetArea(i_rData.Protection())
308*cdf0e10cSrcweir                             .GetTable(i_rData.ClassKey()) );
309*cdf0e10cSrcweir     }
310*cdf0e10cSrcweir }
311*cdf0e10cSrcweir 
312*cdf0e10cSrcweir void
313*cdf0e10cSrcweir ChildList_Display::do_Process( const ary::cpp::Enum & i_rData )
314*cdf0e10cSrcweir {
315*cdf0e10cSrcweir     if ( Ce_IsInternal(i_rData) )
316*cdf0e10cSrcweir         return;
317*cdf0e10cSrcweir 
318*cdf0e10cSrcweir     String  sLink;
319*cdf0e10cSrcweir     if ( i_rData.Protection() == ary::cpp::PROTECT_global )
320*cdf0e10cSrcweir     {
321*cdf0e10cSrcweir         sLink = EnumFileName(i_rData.LocalName());
322*cdf0e10cSrcweir     }
323*cdf0e10cSrcweir     else
324*cdf0e10cSrcweir     {
325*cdf0e10cSrcweir         csv_assert( pActiveParentClass != 0 );
326*cdf0e10cSrcweir         sLink = Path2Child( EnumFileName(i_rData.LocalName()),
327*cdf0e10cSrcweir                             pActiveParentClass->LocalName() );
328*cdf0e10cSrcweir     }
329*cdf0e10cSrcweir 
330*cdf0e10cSrcweir     Write_ListItem( i_rData.LocalName(),
331*cdf0e10cSrcweir                     sLink,
332*cdf0e10cSrcweir                     ShortDocu( i_rData ),
333*cdf0e10cSrcweir                     GetArea(i_rData.Protection()).GetTable() );
334*cdf0e10cSrcweir }
335*cdf0e10cSrcweir 
336*cdf0e10cSrcweir void
337*cdf0e10cSrcweir ChildList_Display::do_Process( const ary::cpp::Typedef & i_rData )
338*cdf0e10cSrcweir {
339*cdf0e10cSrcweir     if ( Ce_IsInternal(i_rData) )
340*cdf0e10cSrcweir         return;
341*cdf0e10cSrcweir 
342*cdf0e10cSrcweir     String  sLink;
343*cdf0e10cSrcweir     if ( i_rData.Protection() == ary::cpp::PROTECT_global )
344*cdf0e10cSrcweir     {
345*cdf0e10cSrcweir         sLink = TypedefFileName(i_rData.LocalName());
346*cdf0e10cSrcweir     }
347*cdf0e10cSrcweir     else
348*cdf0e10cSrcweir     {
349*cdf0e10cSrcweir         csv_assert( pActiveParentClass != 0 );
350*cdf0e10cSrcweir         sLink = Path2Child( TypedefFileName(i_rData.LocalName()),
351*cdf0e10cSrcweir                             pActiveParentClass->LocalName() );
352*cdf0e10cSrcweir     }
353*cdf0e10cSrcweir 
354*cdf0e10cSrcweir     Write_ListItem( i_rData.LocalName(),
355*cdf0e10cSrcweir                     sLink,
356*cdf0e10cSrcweir                     ShortDocu( i_rData ),
357*cdf0e10cSrcweir                     GetArea(i_rData.Protection()).GetTable() );
358*cdf0e10cSrcweir }
359*cdf0e10cSrcweir 
360*cdf0e10cSrcweir void
361*cdf0e10cSrcweir ChildList_Display::do_Process( const ary::cpp::Function & i_rData )
362*cdf0e10cSrcweir {
363*cdf0e10cSrcweir     if ( Ce_IsInternal(i_rData) )
364*cdf0e10cSrcweir         return;
365*cdf0e10cSrcweir 
366*cdf0e10cSrcweir     String  sLinkPrePath;
367*cdf0e10cSrcweir     if ( i_rData.Protection() == ary::cpp::PROTECT_global )
368*cdf0e10cSrcweir     {
369*cdf0e10cSrcweir         const ary::loc::File &
370*cdf0e10cSrcweir                 rFile = Env().Gate().Locations().Find_File( i_rData.Location() );
371*cdf0e10cSrcweir         sLinkPrePath = HtmlFileName( "o-", rFile.LocalName() );
372*cdf0e10cSrcweir     }
373*cdf0e10cSrcweir     else
374*cdf0e10cSrcweir     {
375*cdf0e10cSrcweir         csv_assert( pActiveParentClass != 0 );
376*cdf0e10cSrcweir         sLinkPrePath = Path2Child( HtmlFileName( "o", "" ),
377*cdf0e10cSrcweir                                    pActiveParentClass->LocalName() );
378*cdf0e10cSrcweir     }
379*cdf0e10cSrcweir 
380*cdf0e10cSrcweir     // Out
381*cdf0e10cSrcweir     Table & rOut = GetArea(i_rData.Protection()).GetTable();
382*cdf0e10cSrcweir     TableRow * dpRow = new TableRow;
383*cdf0e10cSrcweir     rOut << dpRow;
384*cdf0e10cSrcweir     TableCell & rCell1 = dpRow->AddCell();
385*cdf0e10cSrcweir 
386*cdf0e10cSrcweir     rCell1
387*cdf0e10cSrcweir         << SyntaxText_PreName( i_rData, Env().Gate() )
388*cdf0e10cSrcweir         << new html::LineBreak;
389*cdf0e10cSrcweir     rCell1
390*cdf0e10cSrcweir         >> *new html::Link( OperationLink(
391*cdf0e10cSrcweir                                 Env().Gate(),
392*cdf0e10cSrcweir                                 i_rData.LocalName(),
393*cdf0e10cSrcweir                                 i_rData.CeId(),
394*cdf0e10cSrcweir                                 sLinkPrePath) )
395*cdf0e10cSrcweir             << i_rData.LocalName();
396*cdf0e10cSrcweir     rCell1
397*cdf0e10cSrcweir         << SyntaxText_PostName( i_rData, Env().Gate() );
398*cdf0e10cSrcweir     TableCell &
399*cdf0e10cSrcweir         rCell2 = dpRow->AddCell();
400*cdf0e10cSrcweir     rCell2
401*cdf0e10cSrcweir         << new WidthAttr("50%")
402*cdf0e10cSrcweir         << " ";
403*cdf0e10cSrcweir 
404*cdf0e10cSrcweir     pShortDocu_Display->Assign_Out( rCell2 );
405*cdf0e10cSrcweir     ShortDocu( i_rData ).StoreAt( *pShortDocu_Display );
406*cdf0e10cSrcweir     pShortDocu_Display->Unassign_Out();
407*cdf0e10cSrcweir }
408*cdf0e10cSrcweir 
409*cdf0e10cSrcweir void
410*cdf0e10cSrcweir ChildList_Display::do_Process( const ary::cpp::Variable & i_rData )
411*cdf0e10cSrcweir {
412*cdf0e10cSrcweir     if ( Ce_IsInternal(i_rData) )
413*cdf0e10cSrcweir         return;
414*cdf0e10cSrcweir 
415*cdf0e10cSrcweir     String  sLinkPrePath;
416*cdf0e10cSrcweir     if ( i_rData.Protection() == ary::cpp::PROTECT_global )
417*cdf0e10cSrcweir     {
418*cdf0e10cSrcweir         const ary::loc::File &
419*cdf0e10cSrcweir             rFile = Env().Gate().Locations().Find_File( i_rData.Location() );
420*cdf0e10cSrcweir         sLinkPrePath = HtmlFileName( "d-", rFile.LocalName() );
421*cdf0e10cSrcweir     }
422*cdf0e10cSrcweir     else
423*cdf0e10cSrcweir     {
424*cdf0e10cSrcweir         csv_assert( pActiveParentClass != 0 );
425*cdf0e10cSrcweir         sLinkPrePath = Path2Child( HtmlFileName( "d", "" ),
426*cdf0e10cSrcweir                                    pActiveParentClass->LocalName() );
427*cdf0e10cSrcweir     }
428*cdf0e10cSrcweir 
429*cdf0e10cSrcweir     TableRow * dpRow = new TableRow;
430*cdf0e10cSrcweir     GetArea(i_rData.Protection()).GetTable() << dpRow;
431*cdf0e10cSrcweir 
432*cdf0e10cSrcweir     *dpRow << new html::BgColorAttr("white");
433*cdf0e10cSrcweir     csi::xml::Element &
434*cdf0e10cSrcweir         rCell1 = dpRow->AddCell();
435*cdf0e10cSrcweir 
436*cdf0e10cSrcweir     dshelp::Get_LinkedTypeText( rCell1, Env(), i_rData.Type() );
437*cdf0e10cSrcweir     rCell1
438*cdf0e10cSrcweir         << " "
439*cdf0e10cSrcweir         >> *new html::Link( DataLink(i_rData.LocalName(), sLinkPrePath.c_str()) )
440*cdf0e10cSrcweir             >> *new html::Strong
441*cdf0e10cSrcweir                 << i_rData.LocalName()
442*cdf0e10cSrcweir                 << ";";
443*cdf0e10cSrcweir 
444*cdf0e10cSrcweir     TableCell & rShortDocu = dpRow->AddCell();
445*cdf0e10cSrcweir     pShortDocu_Display->Assign_Out( rShortDocu );
446*cdf0e10cSrcweir     ShortDocu( i_rData ).StoreAt( *pShortDocu_Display );
447*cdf0e10cSrcweir     pShortDocu_Display->Unassign_Out();
448*cdf0e10cSrcweir }
449*cdf0e10cSrcweir 
450*cdf0e10cSrcweir void
451*cdf0e10cSrcweir ChildList_Display::do_Process( const ary::cpp::EnumValue & i_rData )
452*cdf0e10cSrcweir {
453*cdf0e10cSrcweir     if ( Ce_IsInternal(i_rData) )
454*cdf0e10cSrcweir         return;
455*cdf0e10cSrcweir 
456*cdf0e10cSrcweir     Table & rOut = GetArea().GetTable();
457*cdf0e10cSrcweir 
458*cdf0e10cSrcweir     TableRow * dpRow = new TableRow;
459*cdf0e10cSrcweir     rOut << dpRow;
460*cdf0e10cSrcweir 
461*cdf0e10cSrcweir     *dpRow << new html::BgColorAttr("white");
462*cdf0e10cSrcweir     dpRow->AddCell()
463*cdf0e10cSrcweir         << new WidthAttr("20%")
464*cdf0e10cSrcweir         << new xml::AnAttribute("valign", "top")
465*cdf0e10cSrcweir         >> *new html::Label(i_rData.LocalName())
466*cdf0e10cSrcweir             >> *new html::Bold
467*cdf0e10cSrcweir                 << i_rData.LocalName();
468*cdf0e10cSrcweir 
469*cdf0e10cSrcweir     TableCell & rValueDocu = dpRow->AddCell();
470*cdf0e10cSrcweir     pShortDocu_Display->Assign_Out( rValueDocu );
471*cdf0e10cSrcweir     i_rData.Docu().Accept( *pShortDocu_Display );
472*cdf0e10cSrcweir     pShortDocu_Display->Unassign_Out();
473*cdf0e10cSrcweir }
474*cdf0e10cSrcweir 
475*cdf0e10cSrcweir void
476*cdf0e10cSrcweir ChildList_Display::do_StartSlot()
477*cdf0e10cSrcweir {
478*cdf0e10cSrcweir }
479*cdf0e10cSrcweir 
480*cdf0e10cSrcweir void
481*cdf0e10cSrcweir ChildList_Display::do_FinishSlot()
482*cdf0e10cSrcweir {
483*cdf0e10cSrcweir }
484*cdf0e10cSrcweir 
485*cdf0e10cSrcweir const ary::cpp::Gate *
486*cdf0e10cSrcweir ChildList_Display::inq_Get_ReFinder() const
487*cdf0e10cSrcweir {
488*cdf0e10cSrcweir     return & Env().Gate();
489*cdf0e10cSrcweir }
490*cdf0e10cSrcweir 
491*cdf0e10cSrcweir void
492*cdf0e10cSrcweir ChildList_Display::Write_ListItem( const String &               i_sLeftText,
493*cdf0e10cSrcweir                                    const char *                 i_sLink,
494*cdf0e10cSrcweir                                    const ary::info::DocuText &  i_rRightText,
495*cdf0e10cSrcweir                                    csi::xml::Element &          o_rOut )
496*cdf0e10cSrcweir {
497*cdf0e10cSrcweir     TableRow * dpRow = new TableRow;
498*cdf0e10cSrcweir     o_rOut << dpRow;
499*cdf0e10cSrcweir 
500*cdf0e10cSrcweir     *dpRow << new html::BgColorAttr("white");
501*cdf0e10cSrcweir     dpRow->AddCell()
502*cdf0e10cSrcweir         << new WidthAttr("20%")
503*cdf0e10cSrcweir         >> *new html::Link( i_sLink )
504*cdf0e10cSrcweir                 >> *new html::Bold
505*cdf0e10cSrcweir                         << i_sLeftText;
506*cdf0e10cSrcweir 
507*cdf0e10cSrcweir     TableCell & rShortDocu = dpRow->AddCell();
508*cdf0e10cSrcweir     pShortDocu_Display->Assign_Out( rShortDocu );
509*cdf0e10cSrcweir     i_rRightText.StoreAt( *pShortDocu_Display );
510*cdf0e10cSrcweir     pShortDocu_Display->Unassign_Out();
511*cdf0e10cSrcweir }
512*cdf0e10cSrcweir 
513*cdf0e10cSrcweir const ary::AryGroup &
514*cdf0e10cSrcweir ChildList_Display::ActiveParent()
515*cdf0e10cSrcweir {
516*cdf0e10cSrcweir     return pActiveParentClass != 0
517*cdf0e10cSrcweir                 ?   static_cast< const ary::AryGroup& >(*pActiveParentClass)
518*cdf0e10cSrcweir                 :   pActiveParentEnum != 0
519*cdf0e10cSrcweir                         ?   static_cast< const ary::AryGroup& >(*pActiveParentEnum)
520*cdf0e10cSrcweir                         :   static_cast< const ary::AryGroup& >(*Env().CurNamespace());
521*cdf0e10cSrcweir }
522*cdf0e10cSrcweir 
523*cdf0e10cSrcweir ProtectionArea &
524*cdf0e10cSrcweir ChildList_Display::GetArea()
525*cdf0e10cSrcweir {
526*cdf0e10cSrcweir     return pSglArea->aArea;
527*cdf0e10cSrcweir }
528*cdf0e10cSrcweir 
529*cdf0e10cSrcweir ProtectionArea &
530*cdf0e10cSrcweir ChildList_Display::GetArea( ary::cpp::E_Protection i_eProtection )
531*cdf0e10cSrcweir {
532*cdf0e10cSrcweir     switch ( i_eProtection )
533*cdf0e10cSrcweir     {
534*cdf0e10cSrcweir      	case ary::cpp::PROTECT_public:
535*cdf0e10cSrcweir                         return aMemberAreas[ixPublic]->aArea;
536*cdf0e10cSrcweir      	case ary::cpp::PROTECT_protected:
537*cdf0e10cSrcweir                         return aMemberAreas[ixProtected]->aArea;
538*cdf0e10cSrcweir      	case ary::cpp::PROTECT_private:
539*cdf0e10cSrcweir                         return aMemberAreas[ixPrivate]->aArea;
540*cdf0e10cSrcweir         default:
541*cdf0e10cSrcweir                         return pSglArea->aArea;
542*cdf0e10cSrcweir     }
543*cdf0e10cSrcweir }
544*cdf0e10cSrcweir 
545*cdf0e10cSrcweir 
546*cdf0e10cSrcweir //*******************               ********************//
547*cdf0e10cSrcweir 
548*cdf0e10cSrcweir ChildList_Display::
549*cdf0e10cSrcweir S_AreaCo::S_AreaCo( Area_Result &       o_rResult,
550*cdf0e10cSrcweir                     const char *        i_sLabel,
551*cdf0e10cSrcweir                     const char *        i_sTitle )
552*cdf0e10cSrcweir     :   aArea(i_sLabel, i_sTitle),
553*cdf0e10cSrcweir         pResult(&o_rResult)
554*cdf0e10cSrcweir {
555*cdf0e10cSrcweir }
556*cdf0e10cSrcweir 
557*cdf0e10cSrcweir ChildList_Display::
558*cdf0e10cSrcweir S_AreaCo::~S_AreaCo()
559*cdf0e10cSrcweir {
560*cdf0e10cSrcweir }
561*cdf0e10cSrcweir 
562*cdf0e10cSrcweir void
563*cdf0e10cSrcweir ChildList_Display::
564*cdf0e10cSrcweir S_AreaCo::PerformResult()
565*cdf0e10cSrcweir {
566*cdf0e10cSrcweir     bool bUsed = aArea.WasUsed_Area();
567*cdf0e10cSrcweir     pResult->rChildrenExist = bUsed;
568*cdf0e10cSrcweir     if ( bUsed )
569*cdf0e10cSrcweir     {
570*cdf0e10cSrcweir         Create_ChildListLabel( Out(), aArea.Label() );
571*cdf0e10cSrcweir 
572*cdf0e10cSrcweir         if ( aArea.Size() == 1 )
573*cdf0e10cSrcweir         {
574*cdf0e10cSrcweir             Out() << aArea.ReleaseTable();
575*cdf0e10cSrcweir         }
576*cdf0e10cSrcweir         else
577*cdf0e10cSrcweir         {
578*cdf0e10cSrcweir          	Table * pTable = aArea.ReleaseTable( ary::cpp::CK_class );
579*cdf0e10cSrcweir             if (pTable != 0)
580*cdf0e10cSrcweir                 Out() << pTable;
581*cdf0e10cSrcweir          	pTable = aArea.ReleaseTable( ary::cpp::CK_struct );
582*cdf0e10cSrcweir             if (pTable != 0)
583*cdf0e10cSrcweir                 Out() << pTable;
584*cdf0e10cSrcweir          	pTable = aArea.ReleaseTable( ary::cpp::CK_union );
585*cdf0e10cSrcweir             if (pTable != 0)
586*cdf0e10cSrcweir                 Out() << pTable;
587*cdf0e10cSrcweir         }
588*cdf0e10cSrcweir     }
589*cdf0e10cSrcweir }
590