xref: /aoo41x/main/xml2cmp/source/xcd/cr_index.hxx (revision dd7bc091)
1*dd7bc091SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*dd7bc091SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*dd7bc091SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*dd7bc091SAndrew Rist  * distributed with this work for additional information
6*dd7bc091SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*dd7bc091SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*dd7bc091SAndrew Rist  * "License"); you may not use this file except in compliance
9*dd7bc091SAndrew Rist  * with the License.  You may obtain a copy of the License at
10*dd7bc091SAndrew Rist  *
11*dd7bc091SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*dd7bc091SAndrew Rist  *
13*dd7bc091SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*dd7bc091SAndrew Rist  * software distributed under the License is distributed on an
15*dd7bc091SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*dd7bc091SAndrew Rist  * KIND, either express or implied.  See the License for the
17*dd7bc091SAndrew Rist  * specific language governing permissions and limitations
18*dd7bc091SAndrew Rist  * under the License.
19*dd7bc091SAndrew Rist  *
20*dd7bc091SAndrew Rist  *************************************************************/
21*dd7bc091SAndrew Rist 
22*dd7bc091SAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir #ifndef X2C_CR_INDEX_HXX
25cdf0e10cSrcweir #define X2C_CR_INDEX_HXX
26cdf0e10cSrcweir 
27cdf0e10cSrcweir #include "../support/sistr.hxx"
28cdf0e10cSrcweir #include "../support/heap.hxx"
29cdf0e10cSrcweir #include "../support/list.hxx"
30cdf0e10cSrcweir #include "../support/syshelp.hxx"
31cdf0e10cSrcweir 
32cdf0e10cSrcweir 
33cdf0e10cSrcweir class ModuleDescription;
34cdf0e10cSrcweir 
35cdf0e10cSrcweir 
36cdf0e10cSrcweir class Index
37cdf0e10cSrcweir {
38cdf0e10cSrcweir   public:
39cdf0e10cSrcweir 						Index(
40cdf0e10cSrcweir 							const char	*		i_sOutputDirectory,
41cdf0e10cSrcweir 							const char *		i_sIdlRootPath,
42cdf0e10cSrcweir 							const List<Simstr> &
43cdf0e10cSrcweir 												i_rTagList );
44cdf0e10cSrcweir 						~Index();
45cdf0e10cSrcweir 
46cdf0e10cSrcweir 	void				GatherData(
47cdf0e10cSrcweir 							const List<Simstr> &
48cdf0e10cSrcweir 												i_rInputFileList );
49cdf0e10cSrcweir 	void				WriteOutput(
50cdf0e10cSrcweir 							const char *      	i_sOuputFile );
51cdf0e10cSrcweir 
52cdf0e10cSrcweir 	void				InsertSupportedService(
53cdf0e10cSrcweir 							const Simstr &		i_sService );
54cdf0e10cSrcweir   private:
55cdf0e10cSrcweir 	void				ReadFile(
56cdf0e10cSrcweir 							const char *      	i_sFilename );
57cdf0e10cSrcweir 	void                CreateHtmlFileName(
58cdf0e10cSrcweir 							char *				o_sOutputHtml,
59cdf0e10cSrcweir 							const ModuleDescription	&
60cdf0e10cSrcweir 												i_rModule );
61cdf0e10cSrcweir 	void				WriteTableFromHeap(
62cdf0e10cSrcweir 							std::ostream &		o_rOut,
63cdf0e10cSrcweir 							Heap &		        i_rHeap,
64cdf0e10cSrcweir 							const char *        i_sIndexKey,
65cdf0e10cSrcweir 							const char *        i_sIndexReference,
66cdf0e10cSrcweir 							E_LinkType			i_eLinkType );
67cdf0e10cSrcweir 	void				WriteHeap(
68cdf0e10cSrcweir 							std::ostream &  	o_rOut,
69cdf0e10cSrcweir 							Heap &		        i_rHeap,
70cdf0e10cSrcweir 							E_LinkType			i_eLinkType );
71cdf0e10cSrcweir 
72cdf0e10cSrcweir 	// DATA
73cdf0e10cSrcweir 	Heap				aService2Module;
74cdf0e10cSrcweir 	Heap				aModule2Service;
75cdf0e10cSrcweir 
76cdf0e10cSrcweir 	Simstr				sOutputDirectory;
77cdf0e10cSrcweir 	Simstr			    sIdlRootPath;
78cdf0e10cSrcweir 
79cdf0e10cSrcweir 	// Temporary Data
80cdf0e10cSrcweir 	Simstr				sCurModule;
81cdf0e10cSrcweir };
82cdf0e10cSrcweir 
83cdf0e10cSrcweir 
84cdf0e10cSrcweir 
85cdf0e10cSrcweir 
86cdf0e10cSrcweir #endif
87cdf0e10cSrcweir 
88cdf0e10cSrcweir 
89