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 LUIDL_PE_FILE2_HXX 29 #define LUIDL_PE_FILE2_HXX 30 31 32 33 // USED SERVICES 34 // BASE CLASSES 35 #include <s2_luidl/parsenv2.hxx> 36 #include <s2_luidl/pestate.hxx> 37 // COMPONENTS 38 // PARAMETERS 39 40 41 namespace ary 42 { 43 namespace idl 44 { 45 class Module; 46 } // namespace idl 47 } // namespace ary 48 49 50 namespace csi 51 { 52 namespace uidl 53 { 54 55 class TokenDistributor; 56 class PE_Service; 57 class PE_Singleton; 58 class PE_Interface; 59 class PE_Struct; 60 class PE_Exception; 61 class PE_Constant; 62 class PE_Enum; 63 class PE_Typedef; 64 65 66 class PE_File : public UnoIDL_PE, 67 public ParseEnvState 68 { 69 public: 70 PE_File( 71 TokenDistributor & i_rTokenAdmin, 72 const ParserInfo & i_parseInfo ); 73 virtual void EstablishContacts( 74 UnoIDL_PE * io_pParentPE, 75 ary::Repository & io_rRepository, 76 TokenProcessing_Result & 77 o_rResult ); 78 ~PE_File(); 79 80 virtual void ProcessToken( 81 const Token & i_rToken ); 82 83 virtual void Process_Identifier( 84 const TokIdentifier & 85 i_rToken ); 86 virtual void Process_Punctuation( 87 const TokPunctuation & 88 i_rToken ); 89 virtual void Process_MetaType( 90 const TokMetaType & i_rToken ); 91 virtual void Process_Stereotype( 92 const TokStereotype & 93 i_rToken ); 94 virtual void Process_Default(); 95 96 private: 97 enum E_State 98 { 99 e_none, 100 e_std, 101 wait_for_module, 102 wait_for_module_bracket, 103 wait_for_module_semicolon, 104 in_sub_pe, 105 on_default 106 }; 107 108 virtual void InitData(); 109 virtual void TransferData(); 110 virtual void ReceiveData(); 111 virtual UnoIDL_PE & MyPE(); 112 virtual const ary::idl::Module & 113 CurNamespace() const; 114 virtual const ParserInfo & 115 ParseInfo() const; 116 // DATA 117 TokenDistributor * pTokenAdmin; 118 Dyn<PE_Service> pPE_Service; 119 Dyn<PE_Singleton> pPE_Singleton; 120 Dyn<PE_Interface> pPE_Interface; 121 Dyn<PE_Struct> pPE_Struct; 122 Dyn<PE_Exception> pPE_Exception; 123 Dyn<PE_Constant> pPE_Constant; 124 Dyn<PE_Enum> pPE_Enum; 125 Dyn<PE_Typedef> pPE_Typedef; 126 127 const ary::idl::Module * 128 pCurNamespace; 129 const ParserInfo * pParseInfo; 130 131 E_State eState; 132 uintt nBracketCount_inDefMode; 133 }; 134 135 136 } // namespace uidl 137 } // namespace csi 138 139 #endif 140 141