Update ooo320-m1
[ooovba.git] / autodoc / source / parser_i / inc / s2_luidl / pe_func2.hxx
blobd6b3b6ec4426118b910940a79664438185be40ea
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: pe_func2.hxx,v $
10 * $Revision: 1.6 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef ADC_UIDL_PE_FUNC2_HXX
32 #define ADC_UIDL_PE_FUNC2_HXX
36 // USED SERVICES
37 // BASE CLASSES
38 // #include <ary/idl/i_gate.hxx>
39 // #include <ary/idl/ip_ce.hxx>
40 #include <s2_luidl/parsenv2.hxx>
41 #include <s2_luidl/pestate.hxx>
42 // COMPONENTS
43 #include <ary/idl/i_param.hxx>
44 // PARAMETERS
46 namespace ary
48 namespace idl
50 class Function;
55 namespace csi
57 namespace uidl
60 class PE_Type;
61 class PE_Variable;
63 class PE_Function : public UnoIDL_PE,
64 public ParseEnvState
66 public:
67 typedef ary::idl::Ce_id RParent;
68 typedef ary::idl::Ce_id RFunction;
70 enum E_Constructor { constructor };
72 /// Constructor for interfaces.
73 PE_Function(
74 const RParent & i_rCurInterface );
76 /// Constructor for single interface based services.
77 PE_Function(
78 const RParent & i_rCurService,
79 E_Constructor i_eCtorMarker );
81 virtual void EstablishContacts(
82 UnoIDL_PE * io_pParentPE,
83 ary::Repository & io_rRepository,
84 TokenProcessing_Result &
85 o_rResult );
86 virtual ~PE_Function();
88 virtual void ProcessToken(
89 const Token & i_rToken );
91 virtual void Process_Stereotype(
92 const TokStereotype &
93 i_rToken );
94 virtual void Process_Identifier(
95 const TokIdentifier &
96 i_rToken );
97 virtual void Process_Punctuation(
98 const TokPunctuation &
99 i_rToken );
100 virtual void Process_BuiltInType(
101 const TokBuiltInType &
102 i_rToken );
103 virtual void Process_ParameterHandling(
104 const TokParameterHandling &
105 i_rToken );
106 virtual void Process_Raises();
107 virtual void Process_Default();
109 private:
110 enum E_State
112 e_none,
113 e_start,
114 in_return_type,
115 expect_name,
116 expect_params_list,
117 expect_parameter,
118 expect_parameter_variable,
119 in_parameter_variable,
120 expect_parameter_separator,
121 params_finished,
122 expect_exceptions_list,
123 expect_exception,
124 in_exception,
125 expect_exception_separator,
126 exceptions_finished
129 void GoIntoReturnType();
130 void GoIntoParameterVariable();
131 void GoIntoException();
132 void OnDefault();
134 virtual void InitData();
135 virtual void ReceiveData();
136 virtual void TransferData();
137 virtual UnoIDL_PE & MyPE();
139 // DATA
140 E_State eState;
142 String sData_Name;
143 ary::idl::Type_id nData_ReturnType;
144 bool bData_Oneway;
145 ary::idl::Function *
146 pCurFunction;
148 const RParent * pCurParent;
150 Dyn<PE_Type> pPE_Type;
151 ary::idl::Type_id nCurParsedType; // ReturnType or Exception
153 String sName;
155 Dyn<PE_Variable> pPE_Variable;
156 ary::idl::E_ParameterDirection
157 eCurParsedParam_Direction;
158 ary::idl::Type_id nCurParsedParam_Type;
159 String sCurParsedParam_Name;
160 bool bIsForConstructors;
165 } // namespace uidl
166 } // namespace csi
169 #endif