Update ooo320-m1
[ooovba.git] / autodoc / source / parser_i / inc / s2_luidl / pe_iface.hxx
blobb6e9e0f57f04aff0b2ce6f1c9638df9cc7ebf8f9
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_iface.hxx,v $
10 * $Revision: 1.7 $
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_IFACE_HXX
32 #define ADC_UIDL_PE_IFACE_HXX
36 // USED SERVICES
37 // BASE CLASSES
38 #include <s2_luidl/parsenv2.hxx>
39 #include <s2_luidl/pestate.hxx>
40 // COMPONENTS
41 // PARAMETERS
43 namespace ary
45 namespace idl
47 class Interface;
51 namespace csi
53 namespace uidl
58 class PE_Function;
59 class PE_Attribute;
60 class PE_Type;
62 class PE_Interface : public UnoIDL_PE,
63 public ParseEnvState
65 public:
66 PE_Interface();
67 virtual ~PE_Interface();
69 virtual void EstablishContacts(
70 UnoIDL_PE * io_pParentPE,
71 ary::Repository & io_rRepository,
72 TokenProcessing_Result &
73 o_rResult );
74 virtual void ProcessToken(
75 const Token & i_rToken );
77 virtual void Process_MetaType(
78 const TokMetaType & i_rToken );
79 virtual void Process_Identifier(
80 const TokIdentifier &
81 i_rToken );
82 virtual void Process_Punctuation(
83 const TokPunctuation &
84 i_rToken );
85 virtual void Process_NameSeparator();
86 virtual void Process_BuiltInType(
87 const TokBuiltInType &
88 i_rToken );
89 virtual void Process_TypeModifier(
90 const TokTypeModifier &
91 i_rToken );
92 virtual void Process_Stereotype(
93 const TokStereotype &
94 i_rToken );
95 virtual void Process_Default();
97 private:
98 enum E_State /// @ATTENTION Do not change existing values (except of e_STATES_MAX) !!! Else array-indices will break.
100 e_none = 0,
101 need_uik,
102 uik,
103 need_ident,
104 ident,
105 need_interface,
106 need_name,
107 wait_for_base,
108 in_base, // in header, after ":"
109 need_curlbr_open,
110 e_std,
111 in_function,
112 in_attribute,
113 need_finish,
114 in_base_interface, // in body, after "interface"
115 e_STATES_MAX
117 enum E_TokenType /// @ATTENTION Do not change existing values (except of tt_MAX) !!! Else array-indices will break.
119 tt_metatype = 0,
120 tt_identifier = 1,
121 tt_punctuation = 2,
122 tt_startoftype = 3,
123 tt_stereotype = 4,
124 tt_MAX
126 typedef void (PE_Interface::*F_TOK)(const char *);
129 void On_need_uik_MetaType(const char * i_sText);
130 void On_uik_Identifier(const char * i_sText);
131 void On_uik_Punctuation(const char * i_sText);
132 void On_need_ident_MetaType(const char * i_sText);
133 void On_ident_Identifier(const char * i_sText);
134 void On_ident_Punctuation(const char * i_sText);
135 void On_need_interface_MetaType(const char * i_sText);
136 void On_need_name_Identifer(const char * i_sText);
137 void On_wait_for_base_Punctuation(const char * i_sText);
138 void On_need_curlbr_open_Punctuation(const char * i_sText);
139 void On_std_Metatype(const char * i_sText);
140 void On_std_Punctuation(const char * i_sText);
141 void On_std_Stereotype(const char * i_sText);
142 void On_std_GotoFunction(const char * i_sText);
143 void On_std_GotoAttribute(const char * i_sText);
144 void On_std_GotoBaseInterface(const char * i_sText);
145 void On_need_finish_Punctuation(const char * i_sText);
146 void On_Default(const char * i_sText);
148 void CallHandler(
149 const char * i_sTokenText,
150 E_TokenType i_eTokenType );
152 virtual void InitData();
153 virtual void TransferData();
154 virtual void ReceiveData();
155 virtual UnoIDL_PE & MyPE();
157 void store_Interface();
159 // DATA
160 static F_TOK aDispatcher[e_STATES_MAX][tt_MAX];
162 E_State eState;
163 String sData_Name;
164 bool bIsPreDeclaration;
165 ary::idl::Interface *
166 pCurInterface;
167 ary::idl::Ce_id nCurInterface;
169 Dyn<PE_Function> pPE_Function;
170 Dyn<PE_Attribute> pPE_Attribute;
172 Dyn<PE_Type> pPE_Type;
173 ary::idl::Type_id nCurParsed_Base;
174 bool bOptionalMember;
179 // IMPLEMENTATION
182 } // namespace uidl
183 } // namespace csi
186 #endif