1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 28 #ifndef X2C_CR_INDEX_HXX 29 #define X2C_CR_INDEX_HXX 30 31 #include "../support/sistr.hxx" 32 #include "../support/heap.hxx" 33 #include "../support/list.hxx" 34 #include "../support/syshelp.hxx" 35 36 37 class ModuleDescription; 38 39 40 class Index 41 { 42 public: 43 Index( 44 const char * i_sOutputDirectory, 45 const char * i_sIdlRootPath, 46 const List<Simstr> & 47 i_rTagList ); 48 ~Index(); 49 50 void GatherData( 51 const List<Simstr> & 52 i_rInputFileList ); 53 void WriteOutput( 54 const char * i_sOuputFile ); 55 56 void InsertSupportedService( 57 const Simstr & i_sService ); 58 private: 59 void ReadFile( 60 const char * i_sFilename ); 61 void CreateHtmlFileName( 62 char * o_sOutputHtml, 63 const ModuleDescription & 64 i_rModule ); 65 void WriteTableFromHeap( 66 std::ostream & o_rOut, 67 Heap & i_rHeap, 68 const char * i_sIndexKey, 69 const char * i_sIndexReference, 70 E_LinkType i_eLinkType ); 71 void WriteHeap( 72 std::ostream & o_rOut, 73 Heap & i_rHeap, 74 E_LinkType i_eLinkType ); 75 76 // DATA 77 Heap aService2Module; 78 Heap aModule2Service; 79 80 Simstr sOutputDirectory; 81 Simstr sIdlRootPath; 82 83 // Temporary Data 84 Simstr sCurModule; 85 }; 86 87 88 89 90 #endif 91 92 93