1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: pe_iface.hxx,v $
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
38 #include <s2_luidl/parsenv2.hxx>
39 #include <s2_luidl/pestate.hxx>
62 class PE_Interface
: public UnoIDL_PE
,
67 virtual ~PE_Interface();
69 virtual void EstablishContacts(
70 UnoIDL_PE
* io_pParentPE
,
71 ary::Repository
& io_rRepository
,
72 TokenProcessing_Result
&
74 virtual void ProcessToken(
75 const Token
& i_rToken
);
77 virtual void Process_MetaType(
78 const TokMetaType
& i_rToken
);
79 virtual void Process_Identifier(
82 virtual void Process_Punctuation(
83 const TokPunctuation
&
85 virtual void Process_NameSeparator();
86 virtual void Process_BuiltInType(
87 const TokBuiltInType
&
89 virtual void Process_TypeModifier(
90 const TokTypeModifier
&
92 virtual void Process_Stereotype(
95 virtual void Process_Default();
98 enum E_State
/// @ATTENTION Do not change existing values (except of e_STATES_MAX) !!! Else array-indices will break.
108 in_base
, // in header, after ":"
114 in_base_interface
, // in body, after "interface"
117 enum E_TokenType
/// @ATTENTION Do not change existing values (except of tt_MAX) !!! Else array-indices will break.
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
);
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();
160 static F_TOK aDispatcher
[e_STATES_MAX
][tt_MAX
];
164 bool bIsPreDeclaration
;
165 ary::idl::Interface
*
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
;