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_TPLTP_HXX 29 #define ADC_CPP_PE_TPLTP_HXX 30 31 32 33 // USED SERVICES 34 // BASE CLASSES 35 #include "cpp_pe.hxx" 36 // COMPONENTS 37 #include <semantic/callf.hxx> 38 #include <semantic/sub_peu.hxx> 39 // PARAMETERS 40 41 42 namespace cpp { 43 44 45 46 class PE_TemplateTop : public cpp::Cpp_PE 47 { 48 public: 49 enum E_State 50 { 51 start, 52 expect_qualifier, 53 expect_name, 54 expect_separator, 55 size_of_states 56 }; 57 PE_TemplateTop( 58 Cpp_PE * i_pParent ); 59 ~PE_TemplateTop(); 60 61 const StringVector & 62 Result_Parameters() const; 63 64 virtual void Call_Handler( 65 const cpp::Token & i_rTok ); 66 private: 67 void Setup_StatusFunctions(); 68 virtual void InitData(); 69 virtual void TransferData(); 70 void Hdl_SyntaxError(const char *); 71 72 73 void On_start_Less(const char *); 74 75 void On_expect_qualifier_ClassOrTypename(const char *); 76 void On_expect_qualifier_Greater(const char *); 77 void On_expect_qualifier_Other(const char *); 78 79 void On_expect_name_Identifier(const char *); 80 81 void On_expect_separator_Comma(const char *); 82 void On_expect_separator_Greater(const char *); 83 84 // DATA 85 Dyn< PeStatusArray<PE_TemplateTop> > 86 pStati; 87 88 StringVector 89 aResult_Parameters; 90 bool bCurIsConstant; 91 }; 92 93 94 95 // IMPLEMENTATION 96 97 inline const StringVector & 98 PE_TemplateTop::Result_Parameters() const 99 { return aResult_Parameters; } 100 101 102 } // namespace cpp 103 104 105 #endif 106 107