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_PARSENV2_HXX
25 #define LUIDL_PARSENV2_HXX
26 
27 
28 // USED SERVICES
29 	// BASE CLASSES
30 #include <s2_luidl/tokproct.hxx>
31 	// COMPONENTS
32 #include <s2_luidl/semnode.hxx>
33 	// PARAMETERS
34 #include <ary/idl/i_types4idl.hxx>
35 #include <ary/idl/i_module.hxx>
36 
37 
38 
39 class ParserInfo;
40 
41 namespace ary
42 {
43     class QualifiedName;
44     class Repository;
45 
46 namespace doc
47 {
48     class OldIdlDocu;
49 }
50 
51 namespace idl
52 {
53     class CodeEntity;
54 }
55 }
56 
57 
58 
59 namespace csi
60 {
61 namespace uidl
62 {
63 
64 
65 class Token;
66 class SemanticNode;
67 
68 
69 class UnoIDL_PE : virtual protected TokenProcessing_Types
70 {
71   public:
72 	virtual             ~UnoIDL_PE();
73 
74 	virtual void	 	EstablishContacts(
75 							UnoIDL_PE *			io_pParentPE,
76 							ary::Repository &
77                                                 io_rRepository,
78 							TokenProcessing_Result &
79 												o_rResult );
80 //	virtual void	 	EstablishContacts(
81 //							UnoIDL_PE *			io_pParentPE,
82 //							ary::idl::Gate &
83 //                                                io_rGate,
84 //							TokenProcessing_Result &
85 //												o_rResult );
86 	virtual void		Enter(
87 							E_EnvStackAction	i_eWayOfEntering );
88 	virtual void		Leave(
89 							E_EnvStackAction	i_eWayOfLeaving );
90 	virtual void	  	ProcessToken(
91 							const Token &		i_rToken ) = 0;
92 
93 	void				SetDocu(
94 							DYN ary::doc::OldIdlDocu *
95 												let_dpDocu );
96 	void				SetPublished();
97 	void				SetOptional();
98 	void				PassDocuAt(
99 							ary::idl::CodeEntity &
100                                                 io_rCe );
101 
Parent() const102 	UnoIDL_PE *			Parent() const			{ return aMyNode.Parent(); }
103 
SetResult(E_TokenDone i_eDone,E_EnvStackAction i_eWhat2DoWithEnvStack,UnoIDL_PE * i_pParseEnv2Push=0)104 	void				SetResult(
105 							E_TokenDone			i_eDone,
106 							E_EnvStackAction	i_eWhat2DoWithEnvStack,
107 							UnoIDL_PE *			i_pParseEnv2Push = 0 )
108 												{ aMyNode.SetTokenResult( i_eDone, i_eWhat2DoWithEnvStack, i_pParseEnv2Push ); }
109 	virtual const ary::idl::Module &
110 						CurNamespace() const;
111 	virtual const ParserInfo &
112 						ParseInfo() const;
Gate() const113 	ary::idl::Gate &	Gate() const			{ return aMyNode.AryGate(); }
114     TokenProcessing_Result &
TokenResult() const115 	                    TokenResult() const     { return aMyNode.TokenResult(); }
116 	DYN ary::doc::OldIdlDocu *
ReleaseDocu()117 						ReleaseDocu()			{ return pDocu.Release(); }
118   protected:
119                         UnoIDL_PE();
MyRepository()120     ary::Repository &   MyRepository()          { csv_assert(pRepository != 0);
121                                                   return *pRepository;  }
122   private:
123 	virtual void		InitData();
124 	virtual void		TransferData() = 0;
125 	virtual void		ReceiveData();
126 
127 	SemanticNode		aMyNode;
128 	Dyn<ary::doc::OldIdlDocu>
129 						pDocu;
130     ary::Repository *   pRepository;
131 };
132 
133 
134 
135 
136 }   // namespace uidl
137 }   // namespace csi
138 #endif
139