1*cdf0e10cSrcweir /************************************************************************* 2*cdf0e10cSrcweir * 3*cdf0e10cSrcweir * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4*cdf0e10cSrcweir * 5*cdf0e10cSrcweir * Copyright 2000, 2010 Oracle and/or its affiliates. 6*cdf0e10cSrcweir * 7*cdf0e10cSrcweir * OpenOffice.org - a multi-platform office productivity suite 8*cdf0e10cSrcweir * 9*cdf0e10cSrcweir * This file is part of OpenOffice.org. 10*cdf0e10cSrcweir * 11*cdf0e10cSrcweir * OpenOffice.org is free software: you can redistribute it and/or modify 12*cdf0e10cSrcweir * it under the terms of the GNU Lesser General Public License version 3 13*cdf0e10cSrcweir * only, as published by the Free Software Foundation. 14*cdf0e10cSrcweir * 15*cdf0e10cSrcweir * OpenOffice.org is distributed in the hope that it will be useful, 16*cdf0e10cSrcweir * but WITHOUT ANY WARRANTY; without even the implied warranty of 17*cdf0e10cSrcweir * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18*cdf0e10cSrcweir * GNU Lesser General Public License version 3 for more details 19*cdf0e10cSrcweir * (a copy is included in the LICENSE file that accompanied this code). 20*cdf0e10cSrcweir * 21*cdf0e10cSrcweir * You should have received a copy of the GNU Lesser General Public License 22*cdf0e10cSrcweir * version 3 along with OpenOffice.org. If not, see 23*cdf0e10cSrcweir * <http://www.openoffice.org/license.html> 24*cdf0e10cSrcweir * for a copy of the LGPLv3 License. 25*cdf0e10cSrcweir * 26*cdf0e10cSrcweir ************************************************************************/ 27*cdf0e10cSrcweir 28*cdf0e10cSrcweir #include <precomp.h> 29*cdf0e10cSrcweir #include <s2_luidl/pe_iface.hxx> 30*cdf0e10cSrcweir 31*cdf0e10cSrcweir 32*cdf0e10cSrcweir // NOT FULLY DEFINED SERVICES 33*cdf0e10cSrcweir #include <ary/idl/i_interface.hxx> 34*cdf0e10cSrcweir #include <ary/idl/i_gate.hxx> 35*cdf0e10cSrcweir #include <ary/idl/ip_ce.hxx> 36*cdf0e10cSrcweir #include <ary/doc/d_oldidldocu.hxx> 37*cdf0e10cSrcweir #include <s2_luidl/pe_func2.hxx> 38*cdf0e10cSrcweir #include <s2_luidl/pe_attri.hxx> 39*cdf0e10cSrcweir #include <s2_luidl/pe_type2.hxx> 40*cdf0e10cSrcweir #include <s2_luidl/tk_keyw.hxx> 41*cdf0e10cSrcweir #include <s2_luidl/tk_ident.hxx> 42*cdf0e10cSrcweir #include <s2_luidl/tk_punct.hxx> 43*cdf0e10cSrcweir #include <adc_cl.hxx> 44*cdf0e10cSrcweir 45*cdf0e10cSrcweir 46*cdf0e10cSrcweir 47*cdf0e10cSrcweir namespace csi 48*cdf0e10cSrcweir { 49*cdf0e10cSrcweir namespace uidl 50*cdf0e10cSrcweir { 51*cdf0e10cSrcweir 52*cdf0e10cSrcweir #ifdef DF 53*cdf0e10cSrcweir #undef DF 54*cdf0e10cSrcweir #endif 55*cdf0e10cSrcweir #define DF &PE_Interface::On_Default 56*cdf0e10cSrcweir 57*cdf0e10cSrcweir PE_Interface::F_TOK 58*cdf0e10cSrcweir PE_Interface::aDispatcher[PE_Interface::e_STATES_MAX][PE_Interface::tt_MAX] = 59*cdf0e10cSrcweir { { DF, DF, DF, DF, DF }, // e_none 60*cdf0e10cSrcweir { &PE_Interface::On_need_uik_MetaType, 61*cdf0e10cSrcweir DF, DF, DF, DF }, // need_uik 62*cdf0e10cSrcweir { DF, &PE_Interface::On_uik_Identifier, 63*cdf0e10cSrcweir &PE_Interface::On_uik_Punctuation, 64*cdf0e10cSrcweir DF, DF }, // uik 65*cdf0e10cSrcweir { &PE_Interface::On_need_ident_MetaType, 66*cdf0e10cSrcweir DF, DF, DF, DF }, // need_ident 67*cdf0e10cSrcweir { DF, &PE_Interface::On_ident_Identifier, 68*cdf0e10cSrcweir &PE_Interface::On_ident_Punctuation, 69*cdf0e10cSrcweir DF, DF }, // ident 70*cdf0e10cSrcweir { &PE_Interface::On_need_interface_MetaType, 71*cdf0e10cSrcweir DF, DF, DF, DF }, // need_interface 72*cdf0e10cSrcweir { DF, &PE_Interface::On_need_name_Identifer, 73*cdf0e10cSrcweir DF, DF, DF }, // need_name 74*cdf0e10cSrcweir { DF, DF, &PE_Interface::On_wait_for_base_Punctuation, 75*cdf0e10cSrcweir DF, DF }, // wait_for_base 76*cdf0e10cSrcweir { DF, DF, DF, DF, DF }, // in_base 77*cdf0e10cSrcweir { DF, DF, &PE_Interface::On_need_curlbr_open_Punctuation, 78*cdf0e10cSrcweir DF, DF }, // need_curlbr_open 79*cdf0e10cSrcweir { &PE_Interface::On_std_Metatype, 80*cdf0e10cSrcweir &PE_Interface::On_std_GotoFunction, 81*cdf0e10cSrcweir &PE_Interface::On_std_Punctuation, 82*cdf0e10cSrcweir &PE_Interface::On_std_GotoFunction, 83*cdf0e10cSrcweir &PE_Interface::On_std_Stereotype }, // e_std 84*cdf0e10cSrcweir { DF, DF, DF, DF, DF }, // in_function 85*cdf0e10cSrcweir { DF, DF, DF, DF, DF }, // in_attribute 86*cdf0e10cSrcweir { DF, DF, &PE_Interface::On_need_finish_Punctuation, 87*cdf0e10cSrcweir DF, DF }, // need_finish 88*cdf0e10cSrcweir { DF, DF, DF, DF, DF } // in_base_interface 89*cdf0e10cSrcweir }; 90*cdf0e10cSrcweir 91*cdf0e10cSrcweir 92*cdf0e10cSrcweir 93*cdf0e10cSrcweir inline void 94*cdf0e10cSrcweir PE_Interface::CallHandler( const char * i_sTokenText, 95*cdf0e10cSrcweir E_TokenType i_eTokenType ) 96*cdf0e10cSrcweir { (this->*aDispatcher[eState][i_eTokenType])(i_sTokenText); } 97*cdf0e10cSrcweir 98*cdf0e10cSrcweir 99*cdf0e10cSrcweir 100*cdf0e10cSrcweir PE_Interface::PE_Interface() 101*cdf0e10cSrcweir : eState(e_none), 102*cdf0e10cSrcweir sData_Name(), 103*cdf0e10cSrcweir bIsPreDeclaration(false), 104*cdf0e10cSrcweir pCurInterface(0), 105*cdf0e10cSrcweir nCurInterface(0), 106*cdf0e10cSrcweir pPE_Function(0), 107*cdf0e10cSrcweir pPE_Attribute(0), 108*cdf0e10cSrcweir pPE_Type(0), 109*cdf0e10cSrcweir nCurParsed_Base(0), 110*cdf0e10cSrcweir bOptionalMember(false) 111*cdf0e10cSrcweir { 112*cdf0e10cSrcweir pPE_Function = new PE_Function(nCurInterface); 113*cdf0e10cSrcweir pPE_Type = new PE_Type(nCurParsed_Base); 114*cdf0e10cSrcweir pPE_Attribute = new PE_Attribute(nCurInterface); 115*cdf0e10cSrcweir } 116*cdf0e10cSrcweir 117*cdf0e10cSrcweir void 118*cdf0e10cSrcweir PE_Interface::EstablishContacts( UnoIDL_PE * io_pParentPE, 119*cdf0e10cSrcweir ary::Repository & io_rRepository, 120*cdf0e10cSrcweir TokenProcessing_Result & o_rResult ) 121*cdf0e10cSrcweir { 122*cdf0e10cSrcweir UnoIDL_PE::EstablishContacts(io_pParentPE,io_rRepository,o_rResult); 123*cdf0e10cSrcweir pPE_Function->EstablishContacts(this,io_rRepository,o_rResult); 124*cdf0e10cSrcweir pPE_Type->EstablishContacts(this,io_rRepository,o_rResult); 125*cdf0e10cSrcweir pPE_Attribute->EstablishContacts(this,io_rRepository,o_rResult); 126*cdf0e10cSrcweir } 127*cdf0e10cSrcweir 128*cdf0e10cSrcweir PE_Interface::~PE_Interface() 129*cdf0e10cSrcweir { 130*cdf0e10cSrcweir } 131*cdf0e10cSrcweir 132*cdf0e10cSrcweir void 133*cdf0e10cSrcweir PE_Interface::ProcessToken( const Token & i_rToken ) 134*cdf0e10cSrcweir { 135*cdf0e10cSrcweir i_rToken.Trigger(*this); 136*cdf0e10cSrcweir } 137*cdf0e10cSrcweir 138*cdf0e10cSrcweir 139*cdf0e10cSrcweir void 140*cdf0e10cSrcweir PE_Interface::Process_MetaType( const TokMetaType & i_rToken ) 141*cdf0e10cSrcweir { 142*cdf0e10cSrcweir CallHandler( i_rToken.Text(), tt_metatype ); 143*cdf0e10cSrcweir } 144*cdf0e10cSrcweir 145*cdf0e10cSrcweir void 146*cdf0e10cSrcweir PE_Interface::Process_Identifier( const TokIdentifier & i_rToken ) 147*cdf0e10cSrcweir { 148*cdf0e10cSrcweir CallHandler( i_rToken.Text(), tt_identifier ); 149*cdf0e10cSrcweir } 150*cdf0e10cSrcweir 151*cdf0e10cSrcweir void 152*cdf0e10cSrcweir PE_Interface::Process_Punctuation( const TokPunctuation & i_rToken ) 153*cdf0e10cSrcweir { 154*cdf0e10cSrcweir CallHandler( i_rToken.Text(), tt_punctuation ); 155*cdf0e10cSrcweir } 156*cdf0e10cSrcweir 157*cdf0e10cSrcweir void 158*cdf0e10cSrcweir PE_Interface::Process_NameSeparator() 159*cdf0e10cSrcweir { 160*cdf0e10cSrcweir CallHandler( "", tt_startoftype ); 161*cdf0e10cSrcweir } 162*cdf0e10cSrcweir 163*cdf0e10cSrcweir void 164*cdf0e10cSrcweir PE_Interface::Process_BuiltInType( const TokBuiltInType & i_rToken ) 165*cdf0e10cSrcweir { 166*cdf0e10cSrcweir CallHandler( i_rToken.Text(), tt_startoftype ); 167*cdf0e10cSrcweir } 168*cdf0e10cSrcweir 169*cdf0e10cSrcweir void 170*cdf0e10cSrcweir PE_Interface::Process_TypeModifier( const TokTypeModifier & i_rToken ) 171*cdf0e10cSrcweir { 172*cdf0e10cSrcweir CallHandler( i_rToken.Text(), tt_startoftype ); 173*cdf0e10cSrcweir } 174*cdf0e10cSrcweir 175*cdf0e10cSrcweir void 176*cdf0e10cSrcweir PE_Interface::Process_Stereotype( const TokStereotype & i_rToken ) 177*cdf0e10cSrcweir { 178*cdf0e10cSrcweir CallHandler( i_rToken.Text(), tt_stereotype ); 179*cdf0e10cSrcweir } 180*cdf0e10cSrcweir 181*cdf0e10cSrcweir void 182*cdf0e10cSrcweir PE_Interface::Process_Default() 183*cdf0e10cSrcweir { 184*cdf0e10cSrcweir SetResult(done, stay); 185*cdf0e10cSrcweir } 186*cdf0e10cSrcweir 187*cdf0e10cSrcweir 188*cdf0e10cSrcweir void 189*cdf0e10cSrcweir PE_Interface::On_need_uik_MetaType(const char *) 190*cdf0e10cSrcweir { 191*cdf0e10cSrcweir // Deprecated, data will be ignored 192*cdf0e10cSrcweir SetResult(done, stay); 193*cdf0e10cSrcweir eState = uik; 194*cdf0e10cSrcweir } 195*cdf0e10cSrcweir 196*cdf0e10cSrcweir void 197*cdf0e10cSrcweir PE_Interface::On_uik_Identifier(const char *) 198*cdf0e10cSrcweir { 199*cdf0e10cSrcweir // Deprecated, data will be ignored 200*cdf0e10cSrcweir SetResult(done, stay); 201*cdf0e10cSrcweir } 202*cdf0e10cSrcweir 203*cdf0e10cSrcweir void 204*cdf0e10cSrcweir PE_Interface::On_uik_Punctuation(const char * i_sText) 205*cdf0e10cSrcweir { 206*cdf0e10cSrcweir // Deprecated, data will be ignored 207*cdf0e10cSrcweir SetResult(done, stay); 208*cdf0e10cSrcweir if (strcmp(",",i_sText) == 0) 209*cdf0e10cSrcweir { 210*cdf0e10cSrcweir eState = need_ident; 211*cdf0e10cSrcweir } 212*cdf0e10cSrcweir } 213*cdf0e10cSrcweir 214*cdf0e10cSrcweir void 215*cdf0e10cSrcweir PE_Interface::On_need_ident_MetaType(const char *) 216*cdf0e10cSrcweir { 217*cdf0e10cSrcweir SetResult(done, stay); 218*cdf0e10cSrcweir eState = ident; 219*cdf0e10cSrcweir } 220*cdf0e10cSrcweir 221*cdf0e10cSrcweir void 222*cdf0e10cSrcweir PE_Interface::On_ident_Identifier(const char *) 223*cdf0e10cSrcweir { 224*cdf0e10cSrcweir SetResult(done, stay); 225*cdf0e10cSrcweir } 226*cdf0e10cSrcweir 227*cdf0e10cSrcweir void 228*cdf0e10cSrcweir PE_Interface::On_ident_Punctuation(const char * i_sText) 229*cdf0e10cSrcweir { 230*cdf0e10cSrcweir SetResult(done, stay); 231*cdf0e10cSrcweir if (strcmp(")",i_sText) == 0) 232*cdf0e10cSrcweir { 233*cdf0e10cSrcweir eState = need_interface; 234*cdf0e10cSrcweir } 235*cdf0e10cSrcweir } 236*cdf0e10cSrcweir 237*cdf0e10cSrcweir void 238*cdf0e10cSrcweir PE_Interface::On_need_interface_MetaType(const char *) 239*cdf0e10cSrcweir { 240*cdf0e10cSrcweir SetResult(done, stay); 241*cdf0e10cSrcweir eState = need_name; 242*cdf0e10cSrcweir } 243*cdf0e10cSrcweir 244*cdf0e10cSrcweir void 245*cdf0e10cSrcweir PE_Interface::On_need_name_Identifer(const char * i_sText) 246*cdf0e10cSrcweir { 247*cdf0e10cSrcweir SetResult(done, stay); 248*cdf0e10cSrcweir sData_Name = i_sText; 249*cdf0e10cSrcweir eState = wait_for_base; 250*cdf0e10cSrcweir } 251*cdf0e10cSrcweir 252*cdf0e10cSrcweir void 253*cdf0e10cSrcweir PE_Interface::On_wait_for_base_Punctuation(const char * i_sText) 254*cdf0e10cSrcweir { 255*cdf0e10cSrcweir if (i_sText[0] != ';') 256*cdf0e10cSrcweir { 257*cdf0e10cSrcweir switch (i_sText[0]) 258*cdf0e10cSrcweir { 259*cdf0e10cSrcweir case ':': 260*cdf0e10cSrcweir SetResult(done, push_sure, pPE_Type.Ptr()); 261*cdf0e10cSrcweir eState = in_base; 262*cdf0e10cSrcweir break; 263*cdf0e10cSrcweir case '{': 264*cdf0e10cSrcweir store_Interface(); 265*cdf0e10cSrcweir 266*cdf0e10cSrcweir SetResult(done,stay); 267*cdf0e10cSrcweir eState = e_std; 268*cdf0e10cSrcweir break; 269*cdf0e10cSrcweir default: 270*cdf0e10cSrcweir SetResult(not_done, pop_failure); 271*cdf0e10cSrcweir eState = e_none; 272*cdf0e10cSrcweir } // end switch 273*cdf0e10cSrcweir } 274*cdf0e10cSrcweir else 275*cdf0e10cSrcweir { 276*cdf0e10cSrcweir bIsPreDeclaration = true; 277*cdf0e10cSrcweir SetResult(done, pop_success); 278*cdf0e10cSrcweir eState = e_none; 279*cdf0e10cSrcweir } 280*cdf0e10cSrcweir } 281*cdf0e10cSrcweir 282*cdf0e10cSrcweir void 283*cdf0e10cSrcweir PE_Interface::On_need_curlbr_open_Punctuation(const char * i_sText) 284*cdf0e10cSrcweir { 285*cdf0e10cSrcweir if (i_sText[0] == '{') 286*cdf0e10cSrcweir { 287*cdf0e10cSrcweir store_Interface(); 288*cdf0e10cSrcweir 289*cdf0e10cSrcweir SetResult(done, stay); 290*cdf0e10cSrcweir eState = e_std; 291*cdf0e10cSrcweir } 292*cdf0e10cSrcweir else { 293*cdf0e10cSrcweir csv_assert(false); 294*cdf0e10cSrcweir } 295*cdf0e10cSrcweir } 296*cdf0e10cSrcweir 297*cdf0e10cSrcweir 298*cdf0e10cSrcweir void 299*cdf0e10cSrcweir PE_Interface::On_std_Metatype(const char * i_sText) 300*cdf0e10cSrcweir { 301*cdf0e10cSrcweir if (strcmp(i_sText,"attribute") == 0) 302*cdf0e10cSrcweir On_std_GotoAttribute(i_sText); 303*cdf0e10cSrcweir else if (strcmp(i_sText,"interface") == 0) 304*cdf0e10cSrcweir On_std_GotoBaseInterface(i_sText); 305*cdf0e10cSrcweir else 306*cdf0e10cSrcweir On_std_GotoFunction(i_sText); 307*cdf0e10cSrcweir } 308*cdf0e10cSrcweir 309*cdf0e10cSrcweir void 310*cdf0e10cSrcweir PE_Interface::On_std_Punctuation(const char * i_sText) 311*cdf0e10cSrcweir { 312*cdf0e10cSrcweir switch (i_sText[0]) 313*cdf0e10cSrcweir { 314*cdf0e10cSrcweir case '}': 315*cdf0e10cSrcweir SetResult(done, stay); 316*cdf0e10cSrcweir eState = need_finish; 317*cdf0e10cSrcweir break; 318*cdf0e10cSrcweir case ';': // Appears after base interface declarations. 319*cdf0e10cSrcweir SetResult(done, stay); 320*cdf0e10cSrcweir break; 321*cdf0e10cSrcweir default: 322*cdf0e10cSrcweir SetResult(not_done, pop_failure); 323*cdf0e10cSrcweir eState = e_none; 324*cdf0e10cSrcweir } // end switch 325*cdf0e10cSrcweir } 326*cdf0e10cSrcweir 327*cdf0e10cSrcweir void 328*cdf0e10cSrcweir PE_Interface::On_std_Stereotype(const char * i_sText) 329*cdf0e10cSrcweir { 330*cdf0e10cSrcweir if (strcmp(i_sText,"oneway") == 0) 331*cdf0e10cSrcweir On_std_GotoFunction(i_sText); 332*cdf0e10cSrcweir else if ( strcmp(i_sText,"readonly") == 0 333*cdf0e10cSrcweir OR strcmp(i_sText,"bound") == 0 ) 334*cdf0e10cSrcweir On_std_GotoAttribute(i_sText); 335*cdf0e10cSrcweir else if (strcmp(i_sText,"optional") == 0) 336*cdf0e10cSrcweir { 337*cdf0e10cSrcweir bOptionalMember = true; 338*cdf0e10cSrcweir SetResult(done, stay); 339*cdf0e10cSrcweir } 340*cdf0e10cSrcweir else 341*cdf0e10cSrcweir SetResult(not_done, pop_failure); 342*cdf0e10cSrcweir } 343*cdf0e10cSrcweir 344*cdf0e10cSrcweir void 345*cdf0e10cSrcweir PE_Interface::On_std_GotoFunction(const char * ) 346*cdf0e10cSrcweir { 347*cdf0e10cSrcweir SetResult(not_done, push_sure, pPE_Function.Ptr()); 348*cdf0e10cSrcweir eState = in_function; 349*cdf0e10cSrcweir } 350*cdf0e10cSrcweir 351*cdf0e10cSrcweir void 352*cdf0e10cSrcweir PE_Interface::On_std_GotoAttribute(const char * ) 353*cdf0e10cSrcweir { 354*cdf0e10cSrcweir SetResult(not_done, push_sure, pPE_Attribute.Ptr()); 355*cdf0e10cSrcweir eState = in_attribute; 356*cdf0e10cSrcweir } 357*cdf0e10cSrcweir 358*cdf0e10cSrcweir void 359*cdf0e10cSrcweir PE_Interface::On_std_GotoBaseInterface(const char * ) 360*cdf0e10cSrcweir { 361*cdf0e10cSrcweir SetResult(done, push_sure, pPE_Type.Ptr()); 362*cdf0e10cSrcweir eState = in_base_interface; 363*cdf0e10cSrcweir } 364*cdf0e10cSrcweir 365*cdf0e10cSrcweir void 366*cdf0e10cSrcweir PE_Interface::On_need_finish_Punctuation(const char * i_sText) 367*cdf0e10cSrcweir { 368*cdf0e10cSrcweir switch (i_sText[0]) 369*cdf0e10cSrcweir { 370*cdf0e10cSrcweir case ';': 371*cdf0e10cSrcweir SetResult(done, pop_success); 372*cdf0e10cSrcweir eState = e_none; 373*cdf0e10cSrcweir break; 374*cdf0e10cSrcweir default: 375*cdf0e10cSrcweir SetResult(not_done, pop_failure); 376*cdf0e10cSrcweir eState = e_none; 377*cdf0e10cSrcweir } // end switch 378*cdf0e10cSrcweir } 379*cdf0e10cSrcweir 380*cdf0e10cSrcweir void 381*cdf0e10cSrcweir PE_Interface::On_Default(const char *) 382*cdf0e10cSrcweir { 383*cdf0e10cSrcweir SetResult(not_done, pop_failure); 384*cdf0e10cSrcweir } 385*cdf0e10cSrcweir 386*cdf0e10cSrcweir void 387*cdf0e10cSrcweir PE_Interface::InitData() 388*cdf0e10cSrcweir { 389*cdf0e10cSrcweir eState = need_interface; 390*cdf0e10cSrcweir 391*cdf0e10cSrcweir sData_Name.clear(); 392*cdf0e10cSrcweir bIsPreDeclaration = false; 393*cdf0e10cSrcweir pCurInterface = 0; 394*cdf0e10cSrcweir nCurInterface = 0; 395*cdf0e10cSrcweir nCurParsed_Base = 0; 396*cdf0e10cSrcweir bOptionalMember = false; 397*cdf0e10cSrcweir } 398*cdf0e10cSrcweir 399*cdf0e10cSrcweir void 400*cdf0e10cSrcweir PE_Interface::TransferData() 401*cdf0e10cSrcweir { 402*cdf0e10cSrcweir if (NOT bIsPreDeclaration) 403*cdf0e10cSrcweir { 404*cdf0e10cSrcweir csv_assert(sData_Name.size() > 0); 405*cdf0e10cSrcweir csv_assert(nCurInterface.IsValid()); 406*cdf0e10cSrcweir } 407*cdf0e10cSrcweir else 408*cdf0e10cSrcweir { 409*cdf0e10cSrcweir sData_Name.clear(); 410*cdf0e10cSrcweir pCurInterface = 0; 411*cdf0e10cSrcweir nCurInterface = 0; 412*cdf0e10cSrcweir } 413*cdf0e10cSrcweir 414*cdf0e10cSrcweir eState = e_none; 415*cdf0e10cSrcweir } 416*cdf0e10cSrcweir 417*cdf0e10cSrcweir void 418*cdf0e10cSrcweir PE_Interface::ReceiveData() 419*cdf0e10cSrcweir { 420*cdf0e10cSrcweir switch (eState) 421*cdf0e10cSrcweir { 422*cdf0e10cSrcweir case in_base: 423*cdf0e10cSrcweir eState = need_curlbr_open; 424*cdf0e10cSrcweir break; 425*cdf0e10cSrcweir case in_function: 426*cdf0e10cSrcweir eState = e_std; 427*cdf0e10cSrcweir break; 428*cdf0e10cSrcweir case in_attribute: 429*cdf0e10cSrcweir eState = e_std; 430*cdf0e10cSrcweir break; 431*cdf0e10cSrcweir case in_base_interface: 432*cdf0e10cSrcweir if (bOptionalMember) 433*cdf0e10cSrcweir { 434*cdf0e10cSrcweir pPE_Type->SetOptional(); 435*cdf0e10cSrcweir bOptionalMember = false; 436*cdf0e10cSrcweir } 437*cdf0e10cSrcweir pCurInterface->Add_Base( 438*cdf0e10cSrcweir nCurParsed_Base, 439*cdf0e10cSrcweir pPE_Type->ReleaseDocu()); 440*cdf0e10cSrcweir nCurParsed_Base = 0; 441*cdf0e10cSrcweir eState = e_std; 442*cdf0e10cSrcweir break; 443*cdf0e10cSrcweir default: 444*cdf0e10cSrcweir csv_assert(false); 445*cdf0e10cSrcweir } 446*cdf0e10cSrcweir } 447*cdf0e10cSrcweir 448*cdf0e10cSrcweir UnoIDL_PE & 449*cdf0e10cSrcweir PE_Interface::MyPE() 450*cdf0e10cSrcweir { 451*cdf0e10cSrcweir return *this; 452*cdf0e10cSrcweir } 453*cdf0e10cSrcweir 454*cdf0e10cSrcweir void 455*cdf0e10cSrcweir PE_Interface::store_Interface() 456*cdf0e10cSrcweir { 457*cdf0e10cSrcweir pCurInterface = & Gate().Ces().Store_Interface( 458*cdf0e10cSrcweir CurNamespace().CeId(), 459*cdf0e10cSrcweir sData_Name, 460*cdf0e10cSrcweir nCurParsed_Base ); 461*cdf0e10cSrcweir nCurInterface = pCurInterface->CeId(); 462*cdf0e10cSrcweir PassDocuAt(*pCurInterface); 463*cdf0e10cSrcweir } 464*cdf0e10cSrcweir 465*cdf0e10cSrcweir 466*cdf0e10cSrcweir } // namespace uidl 467*cdf0e10cSrcweir } // namespace csi 468