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_PROPERTY_HXX 29 #define ADC_UIDL_PE_PROPERTY_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 csi 45 { 46 namespace uidl 47 { 48 49 50 class PE_Variable; 51 52 class PE_Property : public UnoIDL_PE, 53 public ParseEnvState 54 { 55 public: 56 typedef ary::idl::Ce_id Ce_id; 57 typedef ary::idl::Type_id Type_id; 58 typedef ary::idl::Property::Stereotypes Stereotypes; 59 60 61 PE_Property( 62 const Ce_id & i_rCurOwner ); 63 64 virtual void EstablishContacts( 65 UnoIDL_PE * io_pParentPE, 66 ary::Repository & 67 io_rRepository, 68 TokenProcessing_Result & 69 o_rResult ); 70 virtual ~PE_Property(); 71 72 virtual void ProcessToken( 73 const Token & i_rToken ); 74 75 virtual void Process_Stereotype( 76 const TokStereotype & 77 i_rToken ); 78 virtual void Process_MetaType( 79 const TokMetaType & i_rToken ); 80 virtual void Process_Punctuation( 81 const TokPunctuation & 82 i_rToken ); 83 virtual void Process_Default(); 84 85 void PresetOptional() { bIsOptional = true; } 86 void PresetStereotypes( 87 Stereotypes::E_Flags 88 i_eFlag ) 89 { aStereotypes.Set_Flag(i_eFlag); } 90 private: 91 enum E_State 92 { 93 e_none, 94 e_start, 95 expect_variable, 96 in_variable 97 }; 98 99 virtual void InitData(); 100 virtual void ReceiveData(); 101 virtual void TransferData(); 102 virtual UnoIDL_PE & MyPE(); 103 104 // DATA 105 E_State eState; 106 const Ce_id * pCurOwner; 107 108 Dyn<PE_Variable> pPE_Variable; 109 110 // object-data 111 Type_id nCurParsedType; 112 String sCurParsedName; 113 bool bIsOptional; 114 Stereotypes aStereotypes; 115 }; 116 117 118 } // namespace uidl 119 } // namespace csi 120 121 122 #endif 123 124