xref: /trunk/main/autodoc/source/parser_i/inc/s2_luidl/parsenv2.hxx (revision cdf0e10c4e3984b49a9502b011690b615761d4a3)
1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 
28 #ifndef LUIDL_PARSENV2_HXX
29 #define LUIDL_PARSENV2_HXX
30 
31 
32 // USED SERVICES
33     // BASE CLASSES
34 #include <s2_luidl/tokproct.hxx>
35     // COMPONENTS
36 #include <s2_luidl/semnode.hxx>
37     // PARAMETERS
38 #include <ary/idl/i_types4idl.hxx>
39 #include <ary/idl/i_module.hxx>
40 
41 
42 
43 class ParserInfo;
44 
45 namespace ary
46 {
47     class QualifiedName;
48     class Repository;
49 
50 namespace doc
51 {
52     class OldIdlDocu;
53 }
54 
55 namespace idl
56 {
57     class CodeEntity;
58 }
59 }
60 
61 
62 
63 namespace csi
64 {
65 namespace uidl
66 {
67 
68 
69 class Token;
70 class SemanticNode;
71 
72 
73 class UnoIDL_PE : virtual protected TokenProcessing_Types
74 {
75   public:
76     virtual             ~UnoIDL_PE();
77 
78     virtual void        EstablishContacts(
79                             UnoIDL_PE *         io_pParentPE,
80                             ary::Repository &
81                                                 io_rRepository,
82                             TokenProcessing_Result &
83                                                 o_rResult );
84 //  virtual void        EstablishContacts(
85 //                          UnoIDL_PE *         io_pParentPE,
86 //                          ary::idl::Gate &
87 //                                                io_rGate,
88 //                          TokenProcessing_Result &
89 //                                              o_rResult );
90     virtual void        Enter(
91                             E_EnvStackAction    i_eWayOfEntering );
92     virtual void        Leave(
93                             E_EnvStackAction    i_eWayOfLeaving );
94     virtual void        ProcessToken(
95                             const Token &       i_rToken ) = 0;
96 
97     void                SetDocu(
98                             DYN ary::doc::OldIdlDocu *
99                                                 let_dpDocu );
100     void                SetPublished();
101     void                SetOptional();
102     void                PassDocuAt(
103                             ary::idl::CodeEntity &
104                                                 io_rCe );
105 
106     UnoIDL_PE *         Parent() const          { return aMyNode.Parent(); }
107 
108     void                SetResult(
109                             E_TokenDone         i_eDone,
110                             E_EnvStackAction    i_eWhat2DoWithEnvStack,
111                             UnoIDL_PE *         i_pParseEnv2Push = 0 )
112                                                 { aMyNode.SetTokenResult( i_eDone, i_eWhat2DoWithEnvStack, i_pParseEnv2Push ); }
113     virtual const ary::idl::Module &
114                         CurNamespace() const;
115     virtual const ParserInfo &
116                         ParseInfo() const;
117     ary::idl::Gate &    Gate() const            { return aMyNode.AryGate(); }
118     TokenProcessing_Result &
119                         TokenResult() const     { return aMyNode.TokenResult(); }
120     DYN ary::doc::OldIdlDocu *
121                         ReleaseDocu()           { return pDocu.Release(); }
122   protected:
123                         UnoIDL_PE();
124     ary::Repository &   MyRepository()          { csv_assert(pRepository != 0);
125                                                   return *pRepository;  }
126   private:
127     virtual void        InitData();
128     virtual void        TransferData() = 0;
129     virtual void        ReceiveData();
130 
131     SemanticNode        aMyNode;
132     Dyn<ary::doc::OldIdlDocu>
133                         pDocu;
134     ary::Repository *   pRepository;
135 };
136 
137 
138 
139 
140 }   // namespace uidl
141 }   // namespace csi
142 #endif
143