xref: /trunk/main/autodoc/source/parser_i/inc/s2_luidl/parsenv2.hxx (revision 914d351e5f5b84e4342a86d6ab8d4aca7308b9bd)
1*1c78a5d6SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*1c78a5d6SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*1c78a5d6SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*1c78a5d6SAndrew Rist  * distributed with this work for additional information
6*1c78a5d6SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*1c78a5d6SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*1c78a5d6SAndrew Rist  * "License"); you may not use this file except in compliance
9*1c78a5d6SAndrew Rist  * with the License.  You may obtain a copy of the License at
10cdf0e10cSrcweir  *
11*1c78a5d6SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12cdf0e10cSrcweir  *
13*1c78a5d6SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*1c78a5d6SAndrew Rist  * software distributed under the License is distributed on an
15*1c78a5d6SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*1c78a5d6SAndrew Rist  * KIND, either express or implied.  See the License for the
17*1c78a5d6SAndrew Rist  * specific language governing permissions and limitations
18*1c78a5d6SAndrew Rist  * under the License.
19cdf0e10cSrcweir  *
20*1c78a5d6SAndrew Rist  *************************************************************/
21*1c78a5d6SAndrew Rist 
22*1c78a5d6SAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir #ifndef LUIDL_PARSENV2_HXX
25cdf0e10cSrcweir #define LUIDL_PARSENV2_HXX
26cdf0e10cSrcweir 
27cdf0e10cSrcweir 
28cdf0e10cSrcweir // USED SERVICES
29cdf0e10cSrcweir     // BASE CLASSES
30cdf0e10cSrcweir #include <s2_luidl/tokproct.hxx>
31cdf0e10cSrcweir     // COMPONENTS
32cdf0e10cSrcweir #include <s2_luidl/semnode.hxx>
33cdf0e10cSrcweir     // PARAMETERS
34cdf0e10cSrcweir #include <ary/idl/i_types4idl.hxx>
35cdf0e10cSrcweir #include <ary/idl/i_module.hxx>
36cdf0e10cSrcweir 
37cdf0e10cSrcweir 
38cdf0e10cSrcweir 
39cdf0e10cSrcweir class ParserInfo;
40cdf0e10cSrcweir 
41cdf0e10cSrcweir namespace ary
42cdf0e10cSrcweir {
43cdf0e10cSrcweir     class QualifiedName;
44cdf0e10cSrcweir     class Repository;
45cdf0e10cSrcweir 
46cdf0e10cSrcweir namespace doc
47cdf0e10cSrcweir {
48cdf0e10cSrcweir     class OldIdlDocu;
49cdf0e10cSrcweir }
50cdf0e10cSrcweir 
51cdf0e10cSrcweir namespace idl
52cdf0e10cSrcweir {
53cdf0e10cSrcweir     class CodeEntity;
54cdf0e10cSrcweir }
55cdf0e10cSrcweir }
56cdf0e10cSrcweir 
57cdf0e10cSrcweir 
58cdf0e10cSrcweir 
59cdf0e10cSrcweir namespace csi
60cdf0e10cSrcweir {
61cdf0e10cSrcweir namespace uidl
62cdf0e10cSrcweir {
63cdf0e10cSrcweir 
64cdf0e10cSrcweir 
65cdf0e10cSrcweir class Token;
66cdf0e10cSrcweir class SemanticNode;
67cdf0e10cSrcweir 
68cdf0e10cSrcweir 
69cdf0e10cSrcweir class UnoIDL_PE : virtual protected TokenProcessing_Types
70cdf0e10cSrcweir {
71cdf0e10cSrcweir   public:
72cdf0e10cSrcweir     virtual             ~UnoIDL_PE();
73cdf0e10cSrcweir 
74cdf0e10cSrcweir     virtual void        EstablishContacts(
75cdf0e10cSrcweir                             UnoIDL_PE *         io_pParentPE,
76cdf0e10cSrcweir                             ary::Repository &
77cdf0e10cSrcweir                                                 io_rRepository,
78cdf0e10cSrcweir                             TokenProcessing_Result &
79cdf0e10cSrcweir                                                 o_rResult );
80cdf0e10cSrcweir //  virtual void        EstablishContacts(
81cdf0e10cSrcweir //                          UnoIDL_PE *         io_pParentPE,
82cdf0e10cSrcweir //                          ary::idl::Gate &
83cdf0e10cSrcweir //                                                io_rGate,
84cdf0e10cSrcweir //                          TokenProcessing_Result &
85cdf0e10cSrcweir //                                              o_rResult );
86cdf0e10cSrcweir     virtual void        Enter(
87cdf0e10cSrcweir                             E_EnvStackAction    i_eWayOfEntering );
88cdf0e10cSrcweir     virtual void        Leave(
89cdf0e10cSrcweir                             E_EnvStackAction    i_eWayOfLeaving );
90cdf0e10cSrcweir     virtual void        ProcessToken(
91cdf0e10cSrcweir                             const Token &       i_rToken ) = 0;
92cdf0e10cSrcweir 
93cdf0e10cSrcweir     void                SetDocu(
94cdf0e10cSrcweir                             DYN ary::doc::OldIdlDocu *
95cdf0e10cSrcweir                                                 let_dpDocu );
96cdf0e10cSrcweir     void                SetPublished();
97cdf0e10cSrcweir     void                SetOptional();
98cdf0e10cSrcweir     void                PassDocuAt(
99cdf0e10cSrcweir                             ary::idl::CodeEntity &
100cdf0e10cSrcweir                                                 io_rCe );
101cdf0e10cSrcweir 
Parent() const102cdf0e10cSrcweir     UnoIDL_PE *         Parent() const          { return aMyNode.Parent(); }
103cdf0e10cSrcweir 
SetResult(E_TokenDone i_eDone,E_EnvStackAction i_eWhat2DoWithEnvStack,UnoIDL_PE * i_pParseEnv2Push=0)104cdf0e10cSrcweir     void                SetResult(
105cdf0e10cSrcweir                             E_TokenDone         i_eDone,
106cdf0e10cSrcweir                             E_EnvStackAction    i_eWhat2DoWithEnvStack,
107cdf0e10cSrcweir                             UnoIDL_PE *         i_pParseEnv2Push = 0 )
108cdf0e10cSrcweir                                                 { aMyNode.SetTokenResult( i_eDone, i_eWhat2DoWithEnvStack, i_pParseEnv2Push ); }
109cdf0e10cSrcweir     virtual const ary::idl::Module &
110cdf0e10cSrcweir                         CurNamespace() const;
111cdf0e10cSrcweir     virtual const ParserInfo &
112cdf0e10cSrcweir                         ParseInfo() const;
Gate() const113cdf0e10cSrcweir     ary::idl::Gate &    Gate() const            { return aMyNode.AryGate(); }
114cdf0e10cSrcweir     TokenProcessing_Result &
TokenResult() const115cdf0e10cSrcweir                         TokenResult() const     { return aMyNode.TokenResult(); }
116cdf0e10cSrcweir     DYN ary::doc::OldIdlDocu *
ReleaseDocu()117cdf0e10cSrcweir                         ReleaseDocu()           { return pDocu.Release(); }
118cdf0e10cSrcweir   protected:
119cdf0e10cSrcweir                         UnoIDL_PE();
MyRepository()120cdf0e10cSrcweir     ary::Repository &   MyRepository()          { csv_assert(pRepository != 0);
121cdf0e10cSrcweir                                                   return *pRepository;  }
122cdf0e10cSrcweir   private:
123cdf0e10cSrcweir     virtual void        InitData();
124cdf0e10cSrcweir     virtual void        TransferData() = 0;
125cdf0e10cSrcweir     virtual void        ReceiveData();
126cdf0e10cSrcweir 
127cdf0e10cSrcweir     SemanticNode        aMyNode;
128cdf0e10cSrcweir     Dyn<ary::doc::OldIdlDocu>
129cdf0e10cSrcweir                         pDocu;
130cdf0e10cSrcweir     ary::Repository *   pRepository;
131cdf0e10cSrcweir };
132cdf0e10cSrcweir 
133cdf0e10cSrcweir 
134cdf0e10cSrcweir 
135cdf0e10cSrcweir 
136cdf0e10cSrcweir }   // namespace uidl
137cdf0e10cSrcweir }   // namespace csi
138cdf0e10cSrcweir #endif
139