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 "i_reposypart.hxx"
24 
25 
26 // NOT FULLY DEFINED SERVICES
27 #include <ary/idl/i_namelookup.hxx>
28 #include <idl_internalgate.hxx>
29 #include "ia_ce.hxx"
30 #include "ia_type.hxx"
31 #include "i2s_calculator.hxx"
32 #include "is_ce.hxx"
33 #include "is_type.hxx"
34 
35 
36 
37 
38 namespace ary
39 {
40 namespace idl
41 {
42 
43 
44 DYN InternalGate &
Create_Partition_(RepositoryCenter & i_center)45 InternalGate::Create_Partition_(RepositoryCenter & i_center)
46 {
47     return *new RepositoryPartition(i_center);
48 }
49 
50 
51 
RepositoryPartition(RepositoryCenter & i_repository)52 RepositoryPartition::RepositoryPartition( RepositoryCenter & i_repository )
53     :   pCenter(&i_repository),
54         pCes(0),
55         pTypes(0),
56         pNamesDictionary(new NameLookup)
57 {
58     pTypes = new TypeAdmin;
59     pCes = new CeAdmin(*pNamesDictionary, *pTypes);
60 }
61 
~RepositoryPartition()62 RepositoryPartition::~RepositoryPartition()
63 {
64 }
65 
66 void
Calculate_AllSecondaryInformation(const String & i_devman_reffilepath)67 RepositoryPartition::Calculate_AllSecondaryInformation(
68                             const String &      i_devman_reffilepath )
69 {
70     // KORR_FUTURE
71     //  Forward the options from here.
72 
73     SecondariesCalculator
74         secalc(*pCes,*pTypes);
75 
76     secalc.CheckAllInterfaceBases();
77     secalc.Connect_Types2Ces();
78     secalc.Gather_CrossReferences();
79 
80     if ( NOT i_devman_reffilepath.empty() )
81     {
82         secalc.Make_Links2DeveloperManual(i_devman_reffilepath);
83     }
84 }
85 
86 const CePilot &
Ces() const87 RepositoryPartition::Ces() const
88 {
89     return *pCes;
90 }
91 
92 const TypePilot &
Types() const93 RepositoryPartition::Types() const
94 {
95     return *pTypes;
96 }
97 
98 CePilot &
Ces()99 RepositoryPartition::Ces()
100 {
101     return *pCes;
102 }
103 
104 TypePilot &
Types()105 RepositoryPartition::Types()
106 {
107     return *pTypes;
108 }
109 
110 
111 
112 }   //  namespace idl
113 }   //  namespace ary
114