1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 28 #ifndef ADC_CPP_PE_TYDEF_HXX 29 #define ADC_CPP_PE_TYDEF_HXX 30 31 // BASE CLASSES 32 #include "cpp_pe.hxx" 33 // USED SERVICES 34 #include <semantic/callf.hxx> 35 #include <semantic/sub_peu.hxx> 36 37 38 namespace cpp 39 { 40 class PE_Type; 41 42 43 44 45 class PE_Typedef : public cpp::Cpp_PE 46 { 47 public: 48 enum E_State 49 { 50 start, 51 expectName, 52 afterName, 53 size_of_states 54 }; 55 PE_Typedef( 56 Cpp_PE * i_pParent ); 57 ~PE_Typedef(); 58 59 virtual void Call_Handler( 60 const cpp::Token & i_rTok ); 61 private: 62 typedef SubPe< PE_Typedef, PE_Type > SP_Type; 63 typedef SubPeUse< PE_Typedef, PE_Type> SPU_Type; 64 65 void Setup_StatusFunctions(); 66 virtual void InitData(); 67 virtual void TransferData(); 68 void Hdl_SyntaxError( const char *); 69 70 void SpReturn_Type(); 71 72 void On_start_typedef( const char * ); 73 void On_expectName_Identifier( const char * ); 74 void On_afterName_Semicolon( const char * ); 75 76 // DATA 77 Dyn< PeStatusArray<PE_Typedef> > 78 pStati; 79 Dyn<SP_Type> pSpType; 80 Dyn<SPU_Type> pSpuType; 81 82 String sName; 83 ary::cpp::Type_id nType; 84 }; 85 86 87 88 89 } // namespace cpp 90 #endif 91