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_ATTRI_HXX 29 #define ADC_UIDL_PE_ATTRI_HXX 30 31 32 33 // USED SERVICES 34 // BASE CLASSES 35 36 #include <s2_luidl/parsenv2.hxx> 37 #include <s2_luidl/pestate.hxx> 38 // COMPONENTS 39 #include <ary/idl/i_property.hxx> 40 // PARAMETERS 41 #include <ary/idl/i_gate.hxx> 42 43 44 namespace ary 45 { 46 namespace idl 47 { 48 class Attribute; 49 } 50 } 51 52 namespace csi 53 { 54 namespace uidl 55 { 56 57 58 class PE_Variable; 59 class PE_Type; 60 61 class PE_Attribute : public UnoIDL_PE, 62 public ParseEnvState 63 { 64 public: 65 typedef ary::idl::Ce_id Ce_id; 66 typedef ary::idl::Type_id Type_id; 67 68 PE_Attribute( 69 const Ce_id & i_rCurOwner ); 70 71 virtual void EstablishContacts( 72 UnoIDL_PE * io_pParentPE, 73 ary::Repository & 74 io_rRepository, 75 TokenProcessing_Result & 76 o_rResult ); 77 virtual ~PE_Attribute(); 78 79 virtual void ProcessToken( 80 const Token & i_rToken ); 81 82 virtual void Process_Identifier( 83 const TokIdentifier & 84 i_rToken ); 85 virtual void Process_Stereotype( 86 const TokStereotype & 87 i_rToken ); 88 virtual void Process_MetaType( 89 const TokMetaType & i_rToken ); 90 virtual void Process_Punctuation( 91 const TokPunctuation & 92 i_rToken ); 93 virtual void Process_Raises(); 94 virtual void Process_Default(); 95 96 private: 97 enum E_State 98 { 99 e_none, 100 e_start, 101 in_variable, 102 expect_end, 103 in_raise_std, /// before 'get', 'set', ';' or '}' 104 in_get, 105 in_set 106 }; 107 108 virtual void InitData(); 109 virtual void ReceiveData(); 110 virtual void TransferData(); 111 virtual UnoIDL_PE & MyPE(); 112 113 // DATA 114 E_State eState; 115 const Ce_id * pCurOwner; 116 117 Dyn<PE_Variable> pPE_Variable; 118 Dyn<PE_Type> pPE_Exception; 119 120 // object-data 121 ary::idl::Attribute * 122 pCurAttribute; 123 Type_id nCurParsedType; 124 String sCurParsedName; 125 bool bReadOnly; 126 bool bBound; 127 }; 128 129 130 } // namespace uidl 131 } // namespace csi 132 133 134 #endif 135 136