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 29 #ifndef ADC_CPP_PE_BASE_HXX 30 #define ADC_CPP_PE_BASE_HXX 31 32 // BASE CLASSES 33 #include "cpp_pe.hxx" 34 // USED SERVICES 35 #include <semantic/callf.hxx> 36 #include <semantic/sub_peu.hxx> 37 #include <ary/cpp/c_types4cpp.hxx> 38 #include <ary/cpp/c_slntry.hxx> 39 40 41 42 namespace cpp 43 { 44 45 class PE_Type; 46 47 class PE_Base : public Cpp_PE 48 { 49 public: 50 enum E_State 51 { 52 startOfNext, 53 inName, 54 size_of_states 55 }; 56 57 typedef ary::cpp::List_Bases BaseList; 58 typedef ary::cpp::S_Classes_Base Base; 59 60 PE_Base( 61 Cpp_PE * i_pParent ); 62 ~PE_Base(); 63 64 const BaseList & Result_BaseIds() const; 65 66 virtual void Call_Handler( 67 const cpp::Token & i_rTok ); 68 69 private: 70 typedef SubPe< PE_Base, PE_Type > SP_Type; 71 typedef SubPeUse< PE_Base, PE_Type> SPU_BaseName; 72 73 void Setup_StatusFunctions(); 74 virtual void InitData(); 75 virtual void TransferData(); 76 void Hdl_SyntaxError( const char *); 77 78 void SpReturn_BaseName(); 79 80 void On_startOfNext_Identifier(const char *); 81 void On_startOfNext_public(const char *); 82 void On_startOfNext_protected(const char *); 83 void On_startOfNext_private(const char *); 84 void On_startOfNext_virtual(const char *); 85 void On_startOfNext_DoubleColon(const char *); 86 87 void On_inName_Identifier(const char *); 88 void On_inName_virtual(const char *); 89 void On_inName_SwBracket_Left(const char *); 90 void On_inName_DoubleColon(const char *); 91 void On_inName_Comma(const char *); 92 93 Base & CurObject(); 94 95 // DATA 96 Dyn< PeStatusArray<PE_Base> > 97 pStati; 98 99 Dyn<SP_Type> pSpType; /// till "{" incl. 100 Dyn<SPU_BaseName> pSpuBaseName; 101 102 BaseList aBaseIds; 103 }; 104 105 106 107 // IMPLEMENTATION 108 109 inline const PE_Base::BaseList & 110 PE_Base::Result_BaseIds() const 111 { return aBaseIds; } 112 113 114 inline PE_Base::Base & 115 PE_Base::CurObject() 116 { return aBaseIds.back(); } 117 118 119 120 121 122 } // namespace cpp 123 #endif 124