1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: i2s_calculator.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef ARY_IDL_I2S_CALCULATOR_HXX
32 #define ARY_IDL_I2S_CALCULATOR_HXX
37 #include <cosv/tpl/processor.hxx>
39 #include <ary/idl/i_types4idl.hxx>
59 class SglIfcSingleton
;
80 service_2s_IncludingServices
,
81 service_2s_InstantiatingSingletons
84 enum E_2s_of_Interface
86 interface_2s_Derivations
,
87 interface_2s_ExportingServices
,
88 interface_2s_ExportingSingletons
,
89 interface_2s_SynonymTypedefs
,
90 // interface_2s_UsingTypedefs,
91 interface_2s_AsReturns
,
92 // interface_2s_AsIndirectReturns,
93 interface_2s_AsParameters
,
94 // interface_2s_AsIndirectParameters,
95 interface_2s_AsDataTypes
100 struct_2s_Derivations
,
101 struct_2s_SynonymTypedefs
,
102 // struct_2s_UsingTypedefs,
104 // struct_2s_AsIndirectReturns,
105 struct_2s_AsParameters
,
106 // struct_2s_AsIndirectParameters,
107 struct_2s_AsDataTypes
112 enum_2s_SynonymTypedefs
,
113 // enum_2s_UsingTypedefs,
115 // enum_2s_AsIndirectReturns,
116 enum_2s_AsParameters
,
117 // enum_2s_AsIndirectParameters,
123 typedef_2s_SynonymTypedefs
,
124 // typedef_2s_UsingTypedefs,
125 typedef_2s_AsReturns
,
126 // typedef_2s_AsIndirectReturns,
127 typedef_2s_AsParameters
,
128 // typedef_2s_AsIndirectParameters,
129 typedef_2s_AsDataTypes
132 enum E_2s_of_Exceptions
134 exception_2s_Derivations
,
135 exception_2s_RaisingFunctions
140 class SPInst_asHost
: public csv::ProcessorIfc
,
141 public csv::ConstProcessor
<Service
>,
142 public csv::ConstProcessor
<Interface
>,
143 public csv::ConstProcessor
<Struct
>,
144 public csv::ConstProcessor
<Exception
>,
145 public csv::ConstProcessor
<Typedef
>,
146 public csv::ConstProcessor
<Singleton
>,
147 public csv::ConstProcessor
<Function
>,
148 public csv::ConstProcessor
<StructElement
>,
149 public csv::ConstProcessor
<Property
>,
150 public csv::ConstProcessor
<SglIfcService
>,
151 public csv::ConstProcessor
<SglIfcSingleton
>
158 /** This class scans the parsed data and produces several
159 secondary data like cross references and alphabetical indices.
161 In this declaration "Secondaries" or "2s" mean those secondary data.
165 class SecondariesCalculator
: public SPInst_asHost
169 SecondariesCalculator(
171 TypeAdmin
& i_types
);
172 virtual ~SecondariesCalculator();
175 void CheckAllInterfaceBases();
176 void Connect_Types2Ces();
177 void Gather_CrossReferences();
178 void Make_Links2DeveloperManual(
179 const String
& i_devman_reffilepath
);
182 // Interface CeHost These are the points to gather cross
184 virtual void do_Process(
185 const Service
& i_rData
);
186 virtual void do_Process(
187 const Interface
& i_rData
);
188 virtual void do_Process(
189 const Struct
& i_rData
);
190 virtual void do_Process(
191 const Exception
& i_rData
);
192 virtual void do_Process(
193 const Typedef
& i_rData
);
194 virtual void do_Process(
195 const Singleton
& i_rData
);
196 virtual void do_Process(
197 const Function
& i_rData
);
198 virtual void do_Process(
199 const StructElement
&
201 virtual void do_Process(
202 const Property
& i_rData
);
203 virtual void do_Process(
204 const SglIfcService
&
206 virtual void do_Process(
207 const SglIfcSingleton
&
211 const Ce_Storage
& my_CeStorage() const;
213 my_TypeStorage() const;
214 Ce_Storage
& my_CeStorage();
215 Type_Storage
& my_TypeStorage();
217 template <class DEST
>
218 DEST
* SearchCe4Type(
220 Ce_id
lhf_Search_CeForType(
223 Ce_id
lhf_Search_CeFromTypeId(
224 Type_id i_nType
) const;
225 Service
* lhf_SearchService(
227 Interface
* lhf_SearchInterface(
229 Struct
* lhf_SearchStruct(
231 Exception
* lhf_SearchException(
235 const String
& i_link
,
236 const String
& i_linkUI
,
237 bool i_isDescr
, /// @descr true: description, false: reference.
239 void gather_Synonyms();
240 void recursive_AssignAsSynonym(
241 Ce_id i_synonymousTypedefsId
,
242 const Typedef
& i_TypedefToCheck
);
243 void recursive_AssignIncludingService(
244 Ce_id i_includingServicesId
,
245 const Service
& i_ServiceToCheckItsIncludes
);
246 void assign_AsDerivedInterface(
247 const Interface
& i_rDerived
);
248 void assign_AsDerivedStruct(
249 const Struct
& i_rDerived
);
250 void assign_AsDerivedException(
251 const Exception
& i_rDerived
);
252 void assignImplementation_toAServicesInterfaces(
255 E_2s_of_Interface i_eList
);
256 void recursive_AssignImplementation_toExportedInterface(
258 Type_id i_nExportedInterface
,
259 E_2s_of_Interface i_eList
);
260 void recursive_AssignFunction_toCeAsReturn(
262 Type_id i_nReturnType
);
263 void recursive_AssignFunction_toCeAsParameter(
265 Type_id i_nParameterType
);
267 /** @param i_nDataElement
268 May be the ID of an struct element as well as an exception element
271 void recursive_AssignStructElement_toCeAsDataType(
272 Ce_id i_nDataElement
,
273 Type_id i_nDataType
);
274 void insert_into2sList(
278 void insert_into2sUnique(
282 /// Sorts secondary production lists alphabetical.
285 void Read_Links2DevManual(
286 csv::bstream
& i_file
);