merge the formfield patch from ooo-build
[ooovba.git] / autodoc / source / parser / cpp / pe_param.hxx
blobb6073f81a4d5da23506460dbc8fb35758f3da4d3
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_param.hxx,v $
10 * $Revision: 1.4 $
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 ************************************************************************/
32 #ifndef ADC_CPP_PE_PARAM_HXX
33 #define ADC_CPP_PE_PARAM_HXX
35 // BASE CLASSES
36 #include "cpp_pe.hxx"
37 // USED SERVICES
38 #include <semantic/callf.hxx>
39 #include <semantic/sub_peu.hxx>
40 #include <ary/cpp/c_vfflag.hxx>
45 namespace cpp
47 class PE_Type;
48 class PE_Variable;
53 class PE_Parameter : public Cpp_PE
55 public:
56 enum E_State
58 start,
59 expectName,
60 afterName,
61 finished,
62 size_of_states
64 typedef ary::cpp::S_Parameter S_ParamInfo;
66 explicit PE_Parameter(
67 Cpp_PE * i_pParent );
68 ~PE_Parameter();
70 virtual void Call_Handler(
71 const cpp::Token & i_rTok );
73 ary::cpp::Type_id Result_FrontType() const;
74 const S_ParamInfo & Result_ParamInfo() const;
76 private:
77 typedef SubPe< PE_Parameter, PE_Type > SP_Type;
78 typedef SubPeUse< PE_Parameter, PE_Type > SPU_Type;
79 typedef SubPe< PE_Parameter, PE_Variable > SP_Variable;
80 typedef SubPeUse< PE_Parameter, PE_Variable > SPU_Variable;
82 void Setup_StatusFunctions();
83 virtual void InitData();
84 virtual void TransferData();
85 void Hdl_SyntaxError( const char *);
87 void SpInit_Type(); // Type and Ignore.
88 void SpInit_Variable();
89 void SpReturn_Type();
90 void SpReturn_Variable();
92 void On_start_Type(const char * i_sText);
93 void On_start_Bracket_Right(const char * i_sText);
94 void On_start_Ellipse(const char * i_sText);
96 void On_expectName_Identifier(const char * i_sText);
97 void On_expectName_ArrayBracket_Left(const char * i_sText);
98 void On_expectName_Bracket_Right(const char * i_sText);
99 void On_expectName_Comma(const char * i_sText);
101 void On_afterName_ArrayBracket_Left(const char * i_sText);
102 void On_afterName_Bracket_Right(const char * i_sText);
103 void On_afterName_Comma(const char * i_sText);
104 void On_afterName_Assign(const char * i_sText);
106 void On_finished_Bracket_Right(const char * i_sText);
107 void On_finished_Comma(const char * i_sText);
109 // DATA
110 Dyn< PeStatusArray<PE_Parameter> >
111 pStati;
113 Dyn<SP_Type> pSpType;
114 Dyn<SPU_Type> pSpuType;
115 Dyn<SP_Variable> pSpVariable;
116 Dyn<SPU_Variable> pSpuVariable;
118 S_ParamInfo aResultParamInfo;
124 // IMPLEMENTATION
125 inline ary::cpp::Type_id
126 PE_Parameter::Result_FrontType() const
128 return aResultParamInfo.nType;
131 inline const PE_Parameter::S_ParamInfo &
132 PE_Parameter::Result_ParamInfo() const
134 return aResultParamInfo;
140 } // namespace cpp
141 #endif