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 ADC_UIDL_PE_SERVI_HXX 29 #define ADC_UIDL_PE_SERVI_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 namespace ary 41 { 42 namespace idl 43 { 44 class Service; 45 class SglIfcService; 46 } 47 } 48 49 namespace csi 50 { 51 namespace uidl 52 { 53 54 class PE_Property; 55 class PE_Type; 56 class PE_Function; 57 58 59 class PE_Service : public UnoIDL_PE, 60 public ParseEnvState 61 { 62 public: 63 PE_Service(); 64 virtual ~PE_Service(); 65 66 virtual void EstablishContacts( 67 UnoIDL_PE * io_pParentPE, 68 ary::Repository & io_rRepository, 69 TokenProcessing_Result & 70 o_rResult ); 71 virtual void ProcessToken( 72 const Token & i_rToken ); 73 74 virtual void Process_MetaType( 75 const TokMetaType & i_rToken ); 76 virtual void Process_Identifier( 77 const TokIdentifier & 78 i_rToken ); 79 virtual void Process_Punctuation( 80 const TokPunctuation & 81 i_rToken ); 82 virtual void Process_Stereotype( 83 const TokStereotype & 84 i_rToken ); 85 virtual void Process_Needs(); 86 virtual void Process_Observes(); 87 virtual void Process_Default(); 88 89 private: 90 void On_Default(); 91 92 enum E_State 93 { 94 e_none = 0, 95 need_name, 96 need_curlbr_open, 97 e_std, 98 in_property, 99 in_ifc_type, 100 in_service_type, 101 expect_ifc_separator, 102 expect_service_separator, 103 at_ignore, 104 need_finish, 105 need_base_interface, /// After ":". 106 need_curlbr_open_sib, /// After base interface in single interface based service. 107 e_std_sib, /// Standard in single interface based service. 108 e_STATES_MAX 109 }; 110 111 virtual void InitData(); 112 virtual void TransferData(); 113 virtual void ReceiveData(); 114 virtual UnoIDL_PE & MyPE(); 115 116 void StartProperty(); 117 118 119 // DATA 120 E_State eState; 121 String sData_Name; 122 bool bIsPreDeclaration; 123 ary::idl::Service * pCurService; 124 ary::idl::SglIfcService * 125 pCurSiService; 126 ary::idl::Ce_id nCurService; // Needed for PE_Attribute. 127 128 Dyn<PE_Property> pPE_Property; 129 ary::idl::Ce_id nCurParsed_Property; 130 131 Dyn<PE_Type> pPE_Type; 132 ary::idl::Type_id nCurParsed_Type; 133 134 Dyn<PE_Function> pPE_Constructor; 135 136 bool bOptionalMember; 137 }; 138 139 140 141 // IMPLEMENTATION 142 143 144 } // namespace uidl 145 } // namespace csi 146 147 148 #endif 149 150