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 "dsply_cl.hxx"
24 
25 
26 // NOT FULLY DEFINED SERVICES
27 #include <ary/cpp/c_class.hxx>
28 #include <ary/cpp/c_gate.hxx>
29 #include "dsply_da.hxx"
30 #include "dsply_op.hxx"
31 #include "hdimpl.hxx"
32 #include "opageenv.hxx"
33 #include "pagemake.hxx"
34 
35 
36 
37 
ClassDisplayer(OuputPage_Environment & io_rEnv)38 ClassDisplayer::ClassDisplayer( OuputPage_Environment & io_rEnv )
39     :   pEnv(&io_rEnv)
40 {
41 }
42 
~ClassDisplayer()43 ClassDisplayer::~ClassDisplayer()
44 {
45 }
46 
47 void
DisplayFiles_InClass(const ary::cpp::Class & i_rData,PageDisplay & io_rPageMaker)48 ClassDisplayer::DisplayFiles_InClass( const ary::cpp::Class & i_rData,
49                                       PageDisplay &           io_rPageMaker )
50 {
51     // Classes
52     ClassDisplayer aClassDisplayer( Env() );
53     DisplaySlot( aClassDisplayer, i_rData, ary::cpp::Class::SLOT_NestedClasses );
54 
55     // Enums
56     DisplaySlot( io_rPageMaker, i_rData, ary::cpp::Class::SLOT_Enums );
57 
58     // Typedefs
59     DisplaySlot( io_rPageMaker, i_rData, ary::cpp::Class::SLOT_Typedefs );
60 
61     // Operations
62     OperationsDisplay aOperationsDisplayer( Env() );
63 
64     aOperationsDisplayer.PrepareForStdMembers();
65     DisplaySlot( aOperationsDisplayer, i_rData, ary::cpp::Class::SLOT_Operations );
66 
67     aOperationsDisplayer.PrepareForStaticMembers();
68     DisplaySlot( aOperationsDisplayer, i_rData, ary::cpp::Class::SLOT_StaticOperations );
69 
70     aOperationsDisplayer.Create_Files();
71 
72     // Data
73     DataDisplay aDataDisplayer( Env() );
74 
75     aDataDisplayer.PrepareForStdMembers();
76     DisplaySlot( aDataDisplayer, i_rData, ary::cpp::Class::SLOT_Data );
77 
78     aDataDisplayer.PrepareForStaticMembers();
79     DisplaySlot( aDataDisplayer, i_rData, ary::cpp::Class::SLOT_StaticData );
80 
81     aDataDisplayer.Create_Files();
82 }
83 
84 void
do_Process(const ary::cpp::Class & i_rData)85 ClassDisplayer::do_Process( const ary::cpp::Class & i_rData )
86 {
87     if ( Ce_IsInternal(i_rData) )
88         return;
89 
90     PageDisplay aPageMaker( Env() );
91     aPageMaker.Process(i_rData);
92 
93     Env().MoveDir_Down2( i_rData );
94     DisplayFiles_InClass( i_rData, aPageMaker );
95 	Env().MoveDir_Up();
96 }
97 
98 const ary::cpp::Gate *
inq_Get_ReFinder() const99 ClassDisplayer::inq_Get_ReFinder() const
100 {
101     return & pEnv->Gate();
102 }
103