1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef ARY_IDL_I2S_CALCULATOR_HXX
21 #define ARY_IDL_I2S_CALCULATOR_HXX
26 #include <cosv/tpl/processor.hxx>
28 #include <ary/idl/i_types4idl.hxx>
47 class SglIfcSingleton
;
68 service_2s_IncludingServices
,
69 service_2s_InstantiatingSingletons
72 enum E_2s_of_Interface
74 interface_2s_Derivations
,
75 interface_2s_ExportingServices
,
76 interface_2s_ExportingSingletons
,
77 interface_2s_SynonymTypedefs
,
78 // interface_2s_UsingTypedefs,
79 interface_2s_AsReturns
,
80 // interface_2s_AsIndirectReturns,
81 interface_2s_AsParameters
,
82 // interface_2s_AsIndirectParameters,
83 interface_2s_AsDataTypes
88 struct_2s_Derivations
,
89 struct_2s_SynonymTypedefs
,
90 // struct_2s_UsingTypedefs,
92 // struct_2s_AsIndirectReturns,
93 struct_2s_AsParameters
,
94 // struct_2s_AsIndirectParameters,
100 enum_2s_SynonymTypedefs
,
101 // enum_2s_UsingTypedefs,
103 // enum_2s_AsIndirectReturns,
104 enum_2s_AsParameters
,
105 // enum_2s_AsIndirectParameters,
111 typedef_2s_SynonymTypedefs
,
112 // typedef_2s_UsingTypedefs,
113 typedef_2s_AsReturns
,
114 // typedef_2s_AsIndirectReturns,
115 typedef_2s_AsParameters
,
116 // typedef_2s_AsIndirectParameters,
117 typedef_2s_AsDataTypes
120 enum E_2s_of_Exceptions
122 exception_2s_Derivations
,
123 exception_2s_RaisingFunctions
128 class SPInst_asHost
: public csv::ProcessorIfc
,
129 public csv::ConstProcessor
<Service
>,
130 public csv::ConstProcessor
<Interface
>,
131 public csv::ConstProcessor
<Struct
>,
132 public csv::ConstProcessor
<Exception
>,
133 public csv::ConstProcessor
<Typedef
>,
134 public csv::ConstProcessor
<Singleton
>,
135 public csv::ConstProcessor
<Function
>,
136 public csv::ConstProcessor
<StructElement
>,
137 public csv::ConstProcessor
<Property
>,
138 public csv::ConstProcessor
<SglIfcService
>,
139 public csv::ConstProcessor
<SglIfcSingleton
>
146 /** This class scans the parsed data and produces several
147 secondary data like cross references and alphabetical indices.
149 In this declaration "Secondaries" or "2s" mean those secondary data.
153 class SecondariesCalculator
: public SPInst_asHost
157 SecondariesCalculator(
159 TypeAdmin
& i_types
);
160 virtual ~SecondariesCalculator();
163 void CheckAllInterfaceBases();
164 void Connect_Types2Ces();
165 void Gather_CrossReferences();
166 void Make_Links2DeveloperManual(
167 const String
& i_devman_reffilepath
);
170 // Interface CeHost These are the points to gather cross
172 virtual void do_Process(
173 const Service
& i_rData
);
174 virtual void do_Process(
175 const Interface
& i_rData
);
176 virtual void do_Process(
177 const Struct
& i_rData
);
178 virtual void do_Process(
179 const Exception
& i_rData
);
180 virtual void do_Process(
181 const Typedef
& i_rData
);
182 virtual void do_Process(
183 const Singleton
& i_rData
);
184 virtual void do_Process(
185 const Function
& i_rData
);
186 virtual void do_Process(
187 const StructElement
&
189 virtual void do_Process(
190 const Property
& i_rData
);
191 virtual void do_Process(
192 const SglIfcService
&
194 virtual void do_Process(
195 const SglIfcSingleton
&
199 const Ce_Storage
& my_CeStorage() const;
201 my_TypeStorage() const;
202 Ce_Storage
& my_CeStorage();
203 Type_Storage
& my_TypeStorage();
205 template <class DEST
>
206 DEST
* SearchCe4Type(
208 Ce_id
lhf_Search_CeForType(
211 Ce_id
lhf_Search_CeFromTypeId(
212 Type_id i_nType
) const;
213 Service
* lhf_SearchService(
215 Interface
* lhf_SearchInterface(
217 Struct
* lhf_SearchStruct(
219 Exception
* lhf_SearchException(
223 const String
& i_link
,
224 const String
& i_linkUI
,
225 bool i_isDescr
, /// @descr true: description, false: reference.
227 void gather_Synonyms();
228 void recursive_AssignAsSynonym(
229 Ce_id i_synonymousTypedefsId
,
230 const Typedef
& i_TypedefToCheck
);
231 void recursive_AssignIncludingService(
232 Ce_id i_includingServicesId
,
233 const Service
& i_ServiceToCheckItsIncludes
);
234 void assign_AsDerivedInterface(
235 const Interface
& i_rDerived
);
236 void assign_AsDerivedStruct(
237 const Struct
& i_rDerived
);
238 void assign_AsDerivedException(
239 const Exception
& i_rDerived
);
240 void assignImplementation_toAServicesInterfaces(
243 E_2s_of_Interface i_eList
);
244 void recursive_AssignImplementation_toExportedInterface(
246 Type_id i_nExportedInterface
,
247 E_2s_of_Interface i_eList
);
248 void recursive_AssignFunction_toCeAsReturn(
250 Type_id i_nReturnType
);
251 void recursive_AssignFunction_toCeAsParameter(
253 Type_id i_nParameterType
);
255 /** @param i_nDataElement
256 May be the ID of an struct element as well as an exception element
259 void recursive_AssignStructElement_toCeAsDataType(
260 Ce_id i_nDataElement
,
261 Type_id i_nDataType
);
262 void insert_into2sList(
266 void insert_into2sUnique(
270 /// Sorts secondary production lists alphabetical.
273 void Read_Links2DevManual(
274 csv::bstream
& i_file
);
288 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */