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