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 LUIDL_PE_SELEM_HXX
25 #define LUIDL_PE_SELEM_HXX
26 
27 
28 
29 // USED SERVICES
30 	// BASE CLASSES
31 #include <s2_luidl/parsenv2.hxx>
32 #include <s2_luidl/pestate.hxx>
33 	// COMPONENTS
34 	// PARAMETERS
35 #include <ary/idl/i_gate.hxx>
36 
37 
38 namespace udm {
39 class Agent_Struct;
40 }   // namespace udm
41 
42 
43 namespace csi
44 {
45 namespace uidl
46 {
47 
48 class PE_Type;
49 class StructElement;
50 class Struct;
51 
52 class PE_StructElement : public UnoIDL_PE,
53 						 public ParseEnvState
54 {
55   public:
56 	typedef ary::idl::Ce_id       RStructElement;
57 	typedef ary::idl::Ce_id       RStruct;
58 
59 						PE_StructElement(       /// Use for Struct-elements
60 							RStructElement &	o_rResult,
61 							const RStruct &		i_rCurStruct,
62 							const String &      i_rCurStructTemplateParam );
63 						PE_StructElement(       /// Use for Exception-elements
64 							RStructElement &	o_rResult,
65 							const RStruct &		i_rCurExc );
66 	virtual void	 	EstablishContacts(
67 							UnoIDL_PE *			io_pParentPE,
68 							ary::Repository &	io_rRepository,
69 							TokenProcessing_Result &
70 												o_rResult );
71 						~PE_StructElement();
72 
73 	virtual void	  	ProcessToken(
74 							const Token &		i_rToken );
75 
76 	virtual void		Process_Default();
77 	virtual void		Process_Identifier(
78 							const TokIdentifier &
79 												i_rToken );
80 	virtual void		Process_Punctuation(
81 							const TokPunctuation &
82 												i_rToken );
83 
84   private:
85 	enum E_State
86 	{
87 		e_none,
88 		expect_type,
89 		expect_name,
90 		expect_finish
91 	};
92 
93 	virtual void		InitData();
94 	virtual void		TransferData();
95 	virtual UnoIDL_PE &	MyPE();
96 
97 	ary::idl::Type_id	lhf_FindTemplateParamType() const;
98 
99     // DATA
100 	E_State             eState;
101 	RStructElement *	pResult;
102 	const RStruct *		pCurStruct;
103 	bool                bIsExceptionElement;
104 
105 	Dyn<PE_Type>		pPE_Type;
106 	ary::idl::Type_id	nType;
107 	String              sName;
108 	const String *      pCurStructTemplateParam;
109 };
110 
111 
112 
113 }   // namespace uidl
114 }   // namespace csi
115 
116 
117 #endif
118