1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 #ifndef ADC_UIDL_PE_PROPERTY_HXX
25 #define ADC_UIDL_PE_PROPERTY_HXX
26 
27 
28 
29 // USED SERVICES
30 	// BASE CLASSES
31 
32 #include <s2_luidl/parsenv2.hxx>
33 #include <s2_luidl/pestate.hxx>
34 	// COMPONENTS
35 #include <ary/idl/i_property.hxx>
36 	// PARAMETERS
37 #include <ary/idl/i_gate.hxx>
38 
39 
40 namespace csi
41 {
42 namespace uidl
43 {
44 
45 
46 class PE_Variable;
47 
48 class PE_Property : public UnoIDL_PE,
49 					public ParseEnvState
50 {
51   public:
52 	typedef ary::idl::Ce_id                     Ce_id;
53 	typedef ary::idl::Type_id                   Type_id;
54 	typedef ary::idl::Property::Stereotypes     Stereotypes;
55 
56 
57 						PE_Property(
58 							const Ce_id &       i_rCurOwner );
59 
60 	virtual void	 	EstablishContacts(
61 							UnoIDL_PE *			io_pParentPE,
62 							ary::Repository &
63                                                 io_rRepository,
64 							TokenProcessing_Result &
65 												o_rResult );
66 	virtual				~PE_Property();
67 
68 	virtual void	  	ProcessToken(
69 							const Token &		i_rToken );
70 
71 	virtual void		Process_Stereotype(
72 							const TokStereotype &
73 												i_rToken );
74 	virtual void		Process_MetaType(
75 							const TokMetaType &	i_rToken );
76 	virtual void		Process_Punctuation(
77 							const TokPunctuation &
78 												i_rToken );
79 	virtual void		Process_Default();
80 
PresetOptional()81     void				PresetOptional()		{ bIsOptional = true; }
PresetStereotypes(Stereotypes::E_Flags i_eFlag)82     void				PresetStereotypes(
83                             Stereotypes::E_Flags
84                                                 i_eFlag )
85                                                 { aStereotypes.Set_Flag(i_eFlag); }
86   private:
87 	enum E_State
88 	{
89 		e_none,
90 		e_start,
91         expect_variable,
92 		in_variable
93 	};
94 
95 	virtual void		InitData();
96 	virtual void		ReceiveData();
97 	virtual void		TransferData();
98 	virtual UnoIDL_PE &	MyPE();
99 
100     // DATA
101 	E_State             eState;
102 	const Ce_id *       pCurOwner;
103 
104 	Dyn<PE_Variable>	pPE_Variable;
105 
106         // object-data
107 	Type_id	            nCurParsedType;
108 	String 			    sCurParsedName;
109 	bool				bIsOptional;
110     Stereotypes         aStereotypes;
111 };
112 
113 
114 }   // namespace uidl
115 }   // namespace csi
116 
117 
118 #endif
119 
120