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