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 #include <precomp.h>
23 #include "hi_main.hxx"
24 
25 
26 // NOT FULLY DEFINED SERVICES
27 #include <algorithm>
28 #include <cosv/ploc.hxx>
29 #include <cosv/file.hxx>
30 #include <ary/idl/i_ce.hxx>
31 #include <ary/idl/ik_ce.hxx>
32 #include <ary/idl/ik_enum.hxx>
33 #include <ary/idl/ik_typedef.hxx>
34 #include <ary/idl/ik_interface.hxx>
35 #include <ary/idl/ik_struct.hxx>
36 #include <ary/idl/ik_exception.hxx>
37 #include <ary/idl/i_constant.hxx>
38 #include <ary/idl/i_constgroup.hxx>
39 #include <ary/idl/i_enum.hxx>
40 #include <ary/idl/i_singleton.hxx>
41 #include <ary/idl/i_sisingleton.hxx>
42 #include <ary/idl/i_exception.hxx>
43 #include <ary/idl/i_interface.hxx>
44 #include <ary/idl/i_service.hxx>
45 #include <ary/idl/i_siservice.hxx>
46 #include <ary/idl/i_struct.hxx>
47 #include <ary/idl/i_typedef.hxx>
48 #include <ary/idl/i_module.hxx>
49 #include <cfrstd.hxx>
50 #include <toolkit/htmlfile.hxx>
51 #include <toolkit/out_position.hxx>
52 #include <toolkit/out_tree.hxx>
53 #include "hfi_constgroup.hxx"
54 #include "hfi_enum.hxx"
55 #include "hfi_globalindex.hxx"
56 #include "hfi_interface.hxx"
57 #include "hfi_module.hxx"
58 #include "hfi_struct.hxx"
59 #include "hfi_service.hxx"
60 #include "hfi_singleton.hxx"
61 #include "hfi_siservice.hxx"
62 #include "hfi_typedef.hxx"
63 #include "hfi_xrefpage.hxx"
64 #include "hi_env.hxx"
65 #include "hi_linkhelper.hxx"
66 
67 
68 using       ::ary::idl::Ce_id;
69 using       ::ary::idl::Type_id;
70 using       ::ary::idl::ifc_ce::Dyn_CeIterator;
71 
72 
73 
74 extern const String C_sCssFilename_Idl("idl.css");
75 
76 /*
77 typedef     ::ary::Dyn_StdConstIterator< ::ary::idl::CommentedRelation>
78             Dyn_ComRefIterator;
79 namespace   read_module     = ::ary::idl::ifc_module;
80 namespace   read_interface  = ::ary::idl::ifc_interface;
81 namespace   read_service    = ::ary::idl::ifc_service;
82 namespace   read_struct     = ::ary::idl::ifc_struct;
83 namespace   read_exception  = ::ary::idl::ifc_exception;
84 namespace   read_enum       = ::ary::idl::ifc_enum;
85 namespace   read_typedef    = ::ary::idl::ifc_typedef;
86 namespace   read_constgroup = ::ary::idl::ifc_constantsgroup;
87 */
88 
89 namespace
90 {
91 
92 /** @resp
93     Inits (constructor) and creates (destructor) the current
94     html documentation file ( MainDisplay_Idl.pMyFile ).
95 */
96 class Guard_CurFile
97 {
98   public:
99                         Guard_CurFile(          /// For CodeEntities
100                             DocuFile_Html &     io_client,
101                             HtmlEnvironment_Idl &
102                                                 io_env,
103                             const ary::idl::CodeEntity &
104                                                 i_ce,
105                             const String &      i_titlePrefix );
106                         Guard_CurFile(          /// For Use pages
107                             DocuFile_Html &     io_client,
108                             HtmlEnvironment_Idl &
109                                                 io_env,
110                             const String &      i_fileName,
111                             const String &      i_titlePrefix );
112                         Guard_CurFile(          /// For Modules
113                             DocuFile_Html &     io_client,
114                             HtmlEnvironment_Idl &
115                                                 io_env,
116                             const ary::idl::CodeEntity &
117                                                 i_ce );
118                         Guard_CurFile(          /// For Indices
119                             DocuFile_Html &     io_client,
120                             HtmlEnvironment_Idl &
121                                                 io_env,
122                             char                i_letter );
123                         ~Guard_CurFile();
124   private:
125     DocuFile_Html &     rClient;
126     HtmlEnvironment_Idl &
127                         rEnv;
128 
129 };
130 
131 /** @resp
132     Sets and releases the current factory pointer
133     ( MainDisplay_Idl.pCurFactory ).
134 */
135 class Guard_CurFactoryPtr
136 {
137   public:
Guard_CurFactoryPtr(HtmlFactory_Idl * & io_client,HtmlFactory_Idl & i_factory)138                         Guard_CurFactoryPtr(
139                             HtmlFactory_Idl *&  io_client,
140                             HtmlFactory_Idl &   i_factory )
141                             :   rpClient(io_client)
142                         { rpClient = &i_factory; }
143 
~Guard_CurFactoryPtr()144                         ~Guard_CurFactoryPtr()
145                         { rpClient = 0; }
146 
147   private:
148     HtmlFactory_Idl *&  rpClient;
149 
150 };
151 
152 
Guard_CurFile(DocuFile_Html & io_client,HtmlEnvironment_Idl & io_env,const ary::idl::CodeEntity & i_ce,const String & i_titlePrefix)153 Guard_CurFile::Guard_CurFile( DocuFile_Html &               io_client,
154                               HtmlEnvironment_Idl &         io_env,
155                               const ary::idl::CodeEntity &  i_ce,
156                               const String &                i_titlePrefix )
157     :   rClient(io_client),
158         rEnv(io_env)
159 {   // For Ces
160     StreamLock sl(300);
161     io_env.Set_CurFile( sl()    << i_ce.LocalName()
162                                 << ".html"
163                                 << c_str );
164     StreamLock aCurFilePath(700);
165     io_env.Get_CurFilePath(aCurFilePath());
166 
167     rClient.EmptyBody();
168     csv::ploc::Path
169         aLocation(aCurFilePath().c_str());
170     rClient.SetLocation(aLocation);
171     sl().reset();
172     rClient.SetTitle( sl()  << i_titlePrefix
173                             << " "
174                             << i_ce.LocalName()
175                             << c_str );
176     sl().reset();
177     rClient.SetRelativeCssPath(
178                       sl()  << io_env.CurPosition().LinkToRoot()
179                             << C_sCssFilename_Idl
180                             << c_str );
181 
182     io_env.Set_CurPageCe(&i_ce);
183 }
184 
Guard_CurFile(DocuFile_Html & io_client,HtmlEnvironment_Idl & io_env,const String & i_fileName,const String & i_titlePrefix)185 Guard_CurFile::Guard_CurFile( DocuFile_Html &       io_client,
186                               HtmlEnvironment_Idl & io_env,
187                               const String &        i_fileName,
188                               const String &        i_titlePrefix )
189     :   rClient(io_client),
190         rEnv(io_env)
191 {   // For Use pages
192     StreamLock sl(300);
193     io_env.Set_CurFile( sl()    << i_fileName
194                                 << ".html"
195                                 << c_str );
196     StreamLock aCurFilePath(700);
197     io_env.Get_CurFilePath(aCurFilePath());
198     csv::ploc::Path
199         aLocation(aCurFilePath().c_str());
200 
201     rClient.EmptyBody();
202     rClient.SetLocation(aLocation);
203     sl().reset();
204     rClient.SetTitle( sl() << i_titlePrefix << " " << i_fileName << c_str );
205     sl().reset();
206     rClient.SetRelativeCssPath(
207                       sl()  << io_env.CurPosition().LinkToRoot()
208                             << C_sCssFilename_Idl
209                             << c_str );
210 
211     io_env.Set_CurPageCe(0);
212 }
213 
Guard_CurFile(DocuFile_Html & io_client,HtmlEnvironment_Idl & io_env,const ary::idl::CodeEntity & i_ce)214 Guard_CurFile::Guard_CurFile( DocuFile_Html &               io_client,
215                               HtmlEnvironment_Idl &         io_env,
216                               const ary::idl::CodeEntity &  i_ce )
217     :   rClient(io_client),
218         rEnv(io_env)
219 {   // For Modules
220     io_env.Set_CurFile( output::ModuleFileName() );
221     StreamLock aCurFilePath(700);
222     io_env.Get_CurFilePath(aCurFilePath());
223     csv::ploc::Path
224         aLocation(aCurFilePath().c_str());
225 
226     rClient.EmptyBody();
227     rClient.SetLocation(aLocation);
228     StreamLock sl(300);
229     rClient.SetTitle( sl() << "Module " << io_env.CurPosition().Name() << c_str );
230     sl().reset();
231     rClient.SetRelativeCssPath(
232                       sl()  << io_env.CurPosition().LinkToRoot()
233                             << C_sCssFilename_Idl
234                             << c_str );
235 
236     io_env.Set_CurPageCe(&i_ce);
237 }
238 
Guard_CurFile(DocuFile_Html & io_client,HtmlEnvironment_Idl & io_env,char i_letter)239 Guard_CurFile::Guard_CurFile( DocuFile_Html &       io_client,
240                               HtmlEnvironment_Idl & io_env,
241                               char                  i_letter )
242     :   rClient(io_client),
243         rEnv(io_env)
244 {   // For Index pages
245     StreamLock sl(300);
246     io_env.Set_CurFile( sl()    << "index-"
247                                 << ( i_letter != '_'
248                                         ?   int(i_letter)-'a'+1
249                                         :   27 )
250                                 << ".html"
251                                 << c_str );
252     StreamLock aCurFilePath(700);
253     io_env.Get_CurFilePath(aCurFilePath());
254     csv::ploc::Path
255         aLocation(aCurFilePath().c_str());
256 
257     rClient.EmptyBody();
258     rClient.SetLocation(aLocation);
259     sl().reset();
260     rClient.SetTitle( sl() << "Global Index "
261                            << ( i_letter != '_'
262                                     ?   char(i_letter-'a'+'A')
263                                     :   '_' )
264                            << c_str );
265     sl().reset();
266     rClient.SetRelativeCssPath(
267                       sl()  << "../"
268                             << C_sCssFilename_Idl
269                             << c_str );
270 }
271 
~Guard_CurFile()272 Guard_CurFile::~Guard_CurFile()
273 {
274     rClient.CreateFile();
275     rEnv.Set_CurPageCe(0);
276 }
277 
278 
279 }   // anonymous namespace
280 
281 
282 
283 
MainDisplay_Idl(HtmlEnvironment_Idl & io_rEnv)284 MainDisplay_Idl::MainDisplay_Idl( HtmlEnvironment_Idl & io_rEnv )
285     :   pEnv(&io_rEnv),
286         pMyFile(new DocuFile_Html),
287         pCurFactory(0)
288 {
289 //  pMyFile->SetStyle( Env().Layout().CssStyle() );
290     pMyFile->SetCopyright( Env().Layout().CopyrightText() );
291 }
292 
~MainDisplay_Idl()293 MainDisplay_Idl::~MainDisplay_Idl()
294 {
295 }
296 
297 
298 void
WriteGlobalIndices()299 MainDisplay_Idl::WriteGlobalIndices()
300 {
301     for ( const char * pLetter = "abcdefghijklmnopqrstuvwxyz_X"; *pLetter != 'X'; ++pLetter )
302     {
303         Guard_CurFile       gFile( *pMyFile, Env(), *pLetter );
304 
305         HF_IdlGlobalIndex   aFactory( *pEnv, pMyFile->Body() );
306         Guard_CurFactoryPtr gFactory(pCurFactory,aFactory);
307 
308         aFactory.Produce_Page( ary::idl::alphabetical_index::E_Letter(*pLetter) );
309     }	// end for
310 }
311 
312 
313 void
do_Process(const ary::idl::Module & i_ce)314 MainDisplay_Idl::do_Process( const ary::idl::Module & i_ce )
315 {
316     Guard_CurFile    gFile( *pMyFile,
317                             Env(),
318                             i_ce );
319     HF_IdlModule     aFactory( *pEnv, pMyFile->Body() );
320     Guard_CurFactoryPtr gFactory(pCurFactory,aFactory);
321 
322     aFactory.Produce_byData(i_ce);
323 }
324 
325 void
do_Process(const ary::idl::Interface & i_ce)326 MainDisplay_Idl::do_Process( const ary::idl::Interface & i_ce )
327 {
328     do_InterfaceDescr(i_ce);
329     do_Interface2s(i_ce);
330 }
331 
332 void
do_Process(const ary::idl::Service & i_ce)333 MainDisplay_Idl::do_Process( const ary::idl::Service & i_ce )
334 {
335     do_ServiceDescr(i_ce);
336     do_Service2s(i_ce);
337 }
338 
339 void
do_Process(const ary::idl::SglIfcService & i_ce)340 MainDisplay_Idl::do_Process( const ary::idl::SglIfcService & i_ce )
341 {
342     do_SglIfcServiceDescr(i_ce);
343 }
344 
345 void
do_Process(const ary::idl::Struct & i_ce)346 MainDisplay_Idl::do_Process( const ary::idl::Struct & i_ce )
347 {
348     do_StructDescr(i_ce);
349     do_Struct2s(i_ce);
350 }
351 
352 void
do_Process(const ary::idl::Exception & i_ce)353 MainDisplay_Idl::do_Process( const ary::idl::Exception & i_ce )
354 {
355     do_ExceptionDescr(i_ce);
356     do_Exception2s(i_ce);
357 }
358 
359 void
do_Process(const ary::idl::Enum & i_ce)360 MainDisplay_Idl::do_Process( const ary::idl::Enum & i_ce )
361 {
362     do_EnumDescr(i_ce);
363     do_Enum2s(i_ce);
364 }
365 
366 void
do_Process(const ary::idl::Typedef & i_ce)367 MainDisplay_Idl::do_Process( const ary::idl::Typedef & i_ce )
368 {
369     do_TypedefDescr(i_ce);
370     do_Typedef2s(i_ce);
371 }
372 
373 void
do_Process(const ary::idl::ConstantsGroup & i_ce)374 MainDisplay_Idl::do_Process( const ary::idl::ConstantsGroup & i_ce )
375 {
376     Guard_CurFile       gFile( *pMyFile,
377                                Env(),
378                                i_ce,
379                                "Constants' Group" );
380     HF_IdlConstGroup    aFactory( *pEnv, pMyFile->Body() );
381     Guard_CurFactoryPtr gFactory(pCurFactory,aFactory);
382 
383     aFactory.Produce_byData(i_ce);
384 }
385 
386 void
do_Process(const ary::idl::Singleton & i_ce)387 MainDisplay_Idl::do_Process( const ary::idl::Singleton & i_ce )
388 {
389     Guard_CurFile       gFile( *pMyFile,
390                                Env(),
391                                i_ce,
392                                "Singleton" );
393     HF_IdlSingleton     aFactory( *pEnv, pMyFile->Body() );
394     Guard_CurFactoryPtr gFactory(pCurFactory,aFactory);
395 
396     aFactory.Produce_byData_ServiceBased(i_ce);
397 }
398 
399 void
do_Process(const ary::idl::SglIfcSingleton & i_ce)400 MainDisplay_Idl::do_Process( const ary::idl::SglIfcSingleton & i_ce )
401 {
402     Guard_CurFile       gFile( *pMyFile,
403                                Env(),
404                                i_ce,
405                                "Singleton" );
406     HF_IdlSingleton     aFactory( *pEnv, pMyFile->Body() );
407     Guard_CurFactoryPtr gFactory(pCurFactory,aFactory);
408 
409     aFactory.Produce_byData_InterfaceBased(i_ce);
410 }
411 
412 void
do_InterfaceDescr(const ary::idl::CodeEntity & i_ce)413 MainDisplay_Idl::do_InterfaceDescr( const ary::idl::CodeEntity & i_ce )
414 {
415     Guard_CurFile       gFile( *pMyFile,
416                                Env(),
417                                i_ce,
418                                "Interface" );
419     HF_IdlInterface     aInterface( *pEnv, pMyFile->Body() );
420     Guard_CurFactoryPtr gFactory(pCurFactory,aInterface);
421 
422     aInterface.Produce_byData(i_ce);
423 }
424 
425 void
do_ServiceDescr(const ary::idl::CodeEntity & i_ce)426 MainDisplay_Idl::do_ServiceDescr( const ary::idl::CodeEntity & i_ce )
427 {
428     Guard_CurFile       gFile( *pMyFile,
429                                Env(),
430                                i_ce,
431                                "Service" );
432     HF_IdlService       aFactory( *pEnv, pMyFile->Body() );
433     Guard_CurFactoryPtr gFactory(pCurFactory,aFactory);
434 
435     aFactory.Produce_byData(i_ce);
436 }
437 
438 void
do_SglIfcServiceDescr(const ary::idl::CodeEntity & i_ce)439 MainDisplay_Idl::do_SglIfcServiceDescr( const ary::idl::CodeEntity & i_ce )
440 {
441     Guard_CurFile       gFile( *pMyFile,
442                                Env(),
443                                i_ce,
444                                "Service" );
445     HF_IdlSglIfcService aFactory( *pEnv, pMyFile->Body() );
446     Guard_CurFactoryPtr gFactory(pCurFactory,aFactory);
447 
448     aFactory.Produce_byData(i_ce);
449 }
450 
451 void
do_StructDescr(const ary::idl::CodeEntity & i_ce)452 MainDisplay_Idl::do_StructDescr( const ary::idl::CodeEntity & i_ce )
453 {
454     Guard_CurFile       gFile( *pMyFile,
455                                Env(),
456                                i_ce,
457                                "Struct" );
458     HF_IdlStruct        aFactory( *pEnv, pMyFile->Body(), false );
459     Guard_CurFactoryPtr gFactory(pCurFactory,aFactory);
460 
461     aFactory.Produce_byData(i_ce);
462 }
463 
464 void
do_ExceptionDescr(const ary::idl::CodeEntity & i_ce)465 MainDisplay_Idl::do_ExceptionDescr( const ary::idl::CodeEntity & i_ce )
466 {
467     Guard_CurFile       gFile( *pMyFile,
468                                Env(),
469                                i_ce,
470                                "Exception" );
471     HF_IdlStruct        aFactory( *pEnv, pMyFile->Body(), true );
472     Guard_CurFactoryPtr gFactory(pCurFactory,aFactory);
473 
474     aFactory.Produce_byData(i_ce);
475 }
476 
477 void
do_EnumDescr(const ary::idl::CodeEntity & i_ce)478 MainDisplay_Idl::do_EnumDescr( const ary::idl::CodeEntity & i_ce )
479 {
480     Guard_CurFile       gFile( *pMyFile,
481                                Env(),
482                                i_ce,
483                                "Enum" );
484     HF_IdlEnum        aFactory( *pEnv, pMyFile->Body() );
485     Guard_CurFactoryPtr gFactory(pCurFactory,aFactory);
486 
487     aFactory.Produce_byData(i_ce);
488 }
489 
490 void
do_TypedefDescr(const ary::idl::CodeEntity & i_ce)491 MainDisplay_Idl::do_TypedefDescr( const ary::idl::CodeEntity & i_ce )
492 {
493     Guard_CurFile       gFile( *pMyFile,
494                                Env(),
495                                i_ce,
496                                "Typedef" );
497     HF_IdlTypedef       aFactory( *pEnv, pMyFile->Body() );
498     Guard_CurFactoryPtr gFactory(pCurFactory,aFactory);
499 
500     aFactory.Produce_byData(i_ce);
501 }
502 
503 void
do_Interface2s(const ary::idl::CodeEntity & i_ce)504 MainDisplay_Idl::do_Interface2s( const ary::idl::CodeEntity & i_ce )
505 {
506     StreamLock sl(100);
507     String sUsesFileName(
508                 sl()
509                     << i_ce.LocalName()
510                     << Env().Linker().XrefsSuffix()
511                     << c_str );
512     Guard_CurFile       gFile( *pMyFile,
513                                Env(),
514                                sUsesFileName,
515                                "Uses of Interface" );
516     HF_IdlXrefs         aUses( *pEnv,
517                                pMyFile->Body(),
518                                C_sCePrefix_Interface,
519                                i_ce );
520 
521 
522     aUses.Produce_Tree(
523         "Derived Interfaces",
524         "#Deriveds",
525         i_ce,
526         &ary::idl::ifc_interface::xref::Get_Derivations );
527 
528     Dyn_CeIterator  pXrefList;
529 
530     ary::idl::ifc_interface::xref::Get_SynonymTypedefs(pXrefList,i_ce);
531     aUses.Produce_List(
532         "Synonym Typedefs",
533         "#Synonyms",
534         *pXrefList );
535     ary::idl::ifc_interface::xref::Get_ExportingServices(pXrefList,i_ce);
536     aUses.Produce_List(
537         "Services which Support this Interface",
538         "#SupportingServices",
539         *pXrefList );
540     ary::idl::ifc_interface::xref::Get_ExportingSingletons(pXrefList,i_ce);
541     aUses.Produce_List(
542         "Singletons which Support this Interface",
543         "#SupportingSingletons",
544         *pXrefList );
545     ary::idl::ifc_interface::xref::Get_AsReturns(pXrefList,i_ce);
546     aUses.Produce_List(
547         "Uses as Return Type",
548         "#Returns",
549         *pXrefList );
550     ary::idl::ifc_interface::xref::Get_AsParameters(pXrefList,i_ce);
551     aUses.Produce_List(
552         "Uses as Parameter",
553         "#Parameters",
554         *pXrefList );
555     ary::idl::ifc_interface::xref::Get_AsDataTypes(pXrefList,i_ce);
556     aUses.Produce_List(
557         "Uses as Data Type",
558         "#DataTypes",
559         *pXrefList );
560     aUses.Write_ManualLinks(i_ce);
561 }
562 
563 void
do_Service2s(const ary::idl::CodeEntity & i_ce)564 MainDisplay_Idl::do_Service2s( const ary::idl::CodeEntity & i_ce )
565 {
566     StreamLock sl(100);
567     String sUsesFileName(
568                 sl()
569                     << i_ce.LocalName()
570                     << Env().Linker().XrefsSuffix()
571                     << c_str );
572     Guard_CurFile   gFile(  *pMyFile,
573                             Env(),
574                             sUsesFileName,
575                             "Uses of Service" );
576     HF_IdlXrefs     aUses(  *pEnv,
577                             pMyFile->Body(),
578                             C_sCePrefix_Service,
579                             i_ce );
580     Dyn_CeIterator  pXrefList;
581     ary::idl::ifc_service::xref::Get_IncludingServices(pXrefList,i_ce);
582     aUses.Produce_List(
583         "Services which Include this Service",
584         "#IncludingServices",
585         *pXrefList );
586 
587     ary::idl::ifc_service::xref::Get_InstantiatingSingletons(pXrefList,i_ce);
588     aUses.Produce_List(
589         "Singletons which Instantiate this Service",
590         "#Singletons",
591         *pXrefList );
592     aUses.Write_ManualLinks(i_ce);
593 }
594 
595 void
do_Struct2s(const ary::idl::CodeEntity & i_ce)596 MainDisplay_Idl::do_Struct2s( const ary::idl::CodeEntity & i_ce )
597 {
598     StreamLock sl(100);
599     String sUsesFileName(
600                 sl()
601                     << i_ce.LocalName()
602                     << Env().Linker().XrefsSuffix()
603                     << c_str );
604     Guard_CurFile   gFile(  *pMyFile,
605                             Env(),
606                             sUsesFileName,
607                             "Uses of Struct" );
608     HF_IdlXrefs     aUses(  *pEnv,
609                             pMyFile->Body(),
610                             C_sCePrefix_Struct,
611                             i_ce );
612 
613     aUses.Produce_Tree(
614         "Derived Structs",
615         "#Deriveds",
616         i_ce,
617         &ary::idl::ifc_struct::xref::Get_Derivations );
618 
619     Dyn_CeIterator  pXrefList;
620 
621     ary::idl::ifc_struct::xref::Get_SynonymTypedefs(pXrefList,i_ce);
622     aUses.Produce_List(
623         "Synonym Typedefs",
624         "#Synonyms",
625         *pXrefList );
626     ary::idl::ifc_struct::xref::Get_AsReturns(pXrefList,i_ce);
627     aUses.Produce_List(
628         "Uses as Return Type",
629         "#Returns",
630         *pXrefList );
631     ary::idl::ifc_struct::xref::Get_AsParameters(pXrefList,i_ce);
632     aUses.Produce_List(
633         "Uses as Parameter",
634         "#Parameters",
635         *pXrefList );
636     ary::idl::ifc_struct::xref::Get_AsDataTypes(pXrefList,i_ce);
637     aUses.Produce_List(
638         "Uses as Data Type",
639         "#DataTypes",
640         *pXrefList );
641     aUses.Write_ManualLinks(i_ce);
642 }
643 
644 void
do_Exception2s(const ary::idl::CodeEntity & i_ce)645 MainDisplay_Idl::do_Exception2s( const ary::idl::CodeEntity & i_ce )
646 {
647     StreamLock sl(100);
648     String sUsesFileName(
649                 sl()
650                     << i_ce.LocalName()
651                     << Env().Linker().XrefsSuffix()
652                     << c_str );
653     Guard_CurFile   gFile(  *pMyFile,
654                             Env(),
655                             sUsesFileName,
656                             "Uses of Exception" );
657     HF_IdlXrefs     aUses(  *pEnv,
658                             pMyFile->Body(),
659                             C_sCePrefix_Exception,
660                             i_ce );
661 
662     aUses.Produce_Tree(
663         "Derived Exceptions",
664         "#Deriveds",
665         i_ce,
666         &ary::idl::ifc_exception::xref::Get_Derivations );
667 
668     Dyn_CeIterator  pXrefList;
669 
670     ary::idl::ifc_exception::xref::Get_RaisingFunctions(pXrefList,i_ce);
671     aUses.Produce_List(
672         "Raising Functions",
673         "#Raisers",
674         *pXrefList );
675     aUses.Write_ManualLinks(i_ce);
676 }
677 
678 void
do_Enum2s(const ary::idl::CodeEntity & i_ce)679 MainDisplay_Idl::do_Enum2s( const ary::idl::CodeEntity & i_ce )
680 {
681     StreamLock sl(100);
682     String sUsesFileName(
683                 sl()
684                     << i_ce.LocalName()
685                     << Env().Linker().XrefsSuffix()
686                     << c_str );
687     Guard_CurFile   gFile(  *pMyFile,
688                             Env(),
689                             sUsesFileName,
690                             "Uses of Enum" );
691     HF_IdlXrefs     aUses(  *pEnv,
692                             pMyFile->Body(),
693                             C_sCePrefix_Enum,
694                             i_ce );
695     Dyn_CeIterator  pXrefList;
696     ary::idl::ifc_enum::xref::Get_SynonymTypedefs(pXrefList,i_ce);
697     aUses.Produce_List(
698         "Synonym Typedefs",
699         "#Synonyms",
700         *pXrefList );
701     ary::idl::ifc_enum::xref::Get_AsReturns(pXrefList,i_ce);
702     aUses.Produce_List(
703         "Uses as Return Type",
704         "#Returns",
705         *pXrefList );
706     ary::idl::ifc_enum::xref::Get_AsParameters(pXrefList,i_ce);
707     aUses.Produce_List(
708         "Uses as Parameter",
709         "#Parameters",
710         *pXrefList );
711     ary::idl::ifc_enum::xref::Get_AsDataTypes(pXrefList,i_ce);
712     aUses.Produce_List(
713         "Uses as Data Type",
714         "#DataTypes",
715         *pXrefList );
716     aUses.Write_ManualLinks(i_ce);
717 }
718 
719 void
do_Typedef2s(const ary::idl::CodeEntity & i_ce)720 MainDisplay_Idl::do_Typedef2s( const ary::idl::CodeEntity & i_ce )
721 {
722     StreamLock sl(100);
723     String sUsesFileName(
724                sl() << i_ce.LocalName()
725                     << Env().Linker().XrefsSuffix()
726                     << c_str );
727     Guard_CurFile   gFile(  *pMyFile,
728                             Env(),
729                             sUsesFileName,
730                             "Uses of Typedef" );
731     HF_IdlXrefs     aUses(  *pEnv,
732                             pMyFile->Body(),
733                             C_sCePrefix_Typedef,
734                             i_ce );
735     Dyn_CeIterator  pXrefList;
736     ary::idl::ifc_typedef::xref::Get_SynonymTypedefs(pXrefList,i_ce);
737     aUses.Produce_List(
738         "Synonym Typedefs",
739         "#Synonyms",
740         *pXrefList );
741     ary::idl::ifc_typedef::xref::Get_AsReturns(pXrefList,i_ce);
742     aUses.Produce_List(
743         "Uses as Return Type",
744         "#Returns",
745         *pXrefList );
746     ary::idl::ifc_typedef::xref::Get_AsParameters(pXrefList,i_ce);
747     aUses.Produce_List(
748         "Uses as Parameter",
749         "#Parameters",
750         *pXrefList );
751     ary::idl::ifc_typedef::xref::Get_AsDataTypes(pXrefList,i_ce);
752     aUses.Produce_List(
753         "Uses as Data Type",
754         "#DataTypes",
755         *pXrefList );
756     aUses.Write_ManualLinks(i_ce);
757 }
758 
759