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_CMDLINE_HXX 29 #define X2C_CMDLINE_HXX 30 31 #include "sistr.hxx" 32 #include "list.hxx" 33 34 35 class CommandLine 36 { 37 public: 38 CommandLine( 39 int i_argc, 40 char * i_argv[] ); 41 ~CommandLine(); 42 43 bool IsOk() const { return bIsOk; } 44 const char * ErrorText() const; 45 46 const char * XmlSrcFile() const { return sXmlSourceFile.str(); } 47 const char * FuncFile() const { return sFuncFile.str(); } 48 const char * HtmlFile() const { return sHtmlFile.str(); } 49 const char * TypeInfoFile() const { return sTypeInfoFile.str(); } 50 51 bool IsIndexCommand() const { return sIndexFile.l() > 0; } 52 const char * XmlSrcDirectory() const { return sXmlSourceDirectory.str(); } 53 const char * IndexOutputFile() const { return sIndexFile.str(); } 54 const char * OutputDirectory() const { return sOutputDirectory.str(); } 55 const List<Simstr> & 56 IndexedTags() const { return aTagsInIndex; } 57 58 const char * IdlRootPath() const { return sIdlRootPath.str(); } 59 60 private: 61 void ParseIndexCommand( 62 int argc, 63 char * argv[] ); 64 void ParseSingleFileCommand( 65 int argc, 66 char * argv[] ); 67 Simstr sXmlSourceFile; 68 Simstr sFuncFile; 69 Simstr sHtmlFile; 70 Simstr sTypeInfoFile; 71 72 Simstr sXmlSourceDirectory; 73 Simstr sIndexFile; 74 Simstr sOutputDirectory; 75 List<Simstr> aTagsInIndex; 76 77 Simstr sIdlRootPath; 78 79 bool bIsOk; 80 }; 81 82 83 84 85 #endif 86 87