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 #ifndef ADC_DOCU_PE_HXX 29*cdf0e10cSrcweir #define ADC_DOCU_PE_HXX 30*cdf0e10cSrcweir 31*cdf0e10cSrcweir 32*cdf0e10cSrcweir 33*cdf0e10cSrcweir // USED SERVICES 34*cdf0e10cSrcweir // BASE CLASSES 35*cdf0e10cSrcweir #include <adoc/tokintpr.hxx> 36*cdf0e10cSrcweir // COMPONENTS 37*cdf0e10cSrcweir // PARAMETERS 38*cdf0e10cSrcweir 39*cdf0e10cSrcweir namespace ary 40*cdf0e10cSrcweir { 41*cdf0e10cSrcweir namespace doc 42*cdf0e10cSrcweir { 43*cdf0e10cSrcweir class OldCppDocu; 44*cdf0e10cSrcweir } 45*cdf0e10cSrcweir namespace info 46*cdf0e10cSrcweir { 47*cdf0e10cSrcweir class AtTag; 48*cdf0e10cSrcweir } 49*cdf0e10cSrcweir } 50*cdf0e10cSrcweir 51*cdf0e10cSrcweir 52*cdf0e10cSrcweir 53*cdf0e10cSrcweir namespace adoc 54*cdf0e10cSrcweir { 55*cdf0e10cSrcweir 56*cdf0e10cSrcweir 57*cdf0e10cSrcweir class Adoc_PE : public TokenInterpreter 58*cdf0e10cSrcweir { 59*cdf0e10cSrcweir public: 60*cdf0e10cSrcweir Adoc_PE(); 61*cdf0e10cSrcweir ~Adoc_PE(); 62*cdf0e10cSrcweir 63*cdf0e10cSrcweir virtual void Hdl_at_std( 64*cdf0e10cSrcweir const Tok_at_std & i_rTok ); 65*cdf0e10cSrcweir virtual void Hdl_at_base( 66*cdf0e10cSrcweir const Tok_at_base & i_rTok ); 67*cdf0e10cSrcweir virtual void Hdl_at_exception( 68*cdf0e10cSrcweir const Tok_at_exception & 69*cdf0e10cSrcweir i_rTok ); 70*cdf0e10cSrcweir virtual void Hdl_at_impl( 71*cdf0e10cSrcweir const Tok_at_impl & i_rTok ); 72*cdf0e10cSrcweir virtual void Hdl_at_key( 73*cdf0e10cSrcweir const Tok_at_key & i_rTok ); 74*cdf0e10cSrcweir virtual void Hdl_at_param( 75*cdf0e10cSrcweir const Tok_at_param & 76*cdf0e10cSrcweir i_rTok ); 77*cdf0e10cSrcweir virtual void Hdl_at_see( 78*cdf0e10cSrcweir const Tok_at_see & i_rTok ); 79*cdf0e10cSrcweir virtual void Hdl_at_template( 80*cdf0e10cSrcweir const Tok_at_template & 81*cdf0e10cSrcweir i_rTok ); 82*cdf0e10cSrcweir virtual void Hdl_at_interface( 83*cdf0e10cSrcweir const Tok_at_interface & 84*cdf0e10cSrcweir i_rTok ); 85*cdf0e10cSrcweir virtual void Hdl_at_internal( 86*cdf0e10cSrcweir const Tok_at_internal & 87*cdf0e10cSrcweir i_rTok ); 88*cdf0e10cSrcweir virtual void Hdl_at_obsolete( 89*cdf0e10cSrcweir const Tok_at_obsolete & 90*cdf0e10cSrcweir i_rTok ); 91*cdf0e10cSrcweir virtual void Hdl_at_module( 92*cdf0e10cSrcweir const Tok_at_module & 93*cdf0e10cSrcweir i_rTok ); 94*cdf0e10cSrcweir virtual void Hdl_at_file( 95*cdf0e10cSrcweir const Tok_at_file & i_rTok ); 96*cdf0e10cSrcweir virtual void Hdl_at_gloss( 97*cdf0e10cSrcweir const Tok_at_gloss & 98*cdf0e10cSrcweir i_rTok ); 99*cdf0e10cSrcweir virtual void Hdl_at_global( 100*cdf0e10cSrcweir const Tok_at_global & 101*cdf0e10cSrcweir i_rTok ); 102*cdf0e10cSrcweir virtual void Hdl_at_include( 103*cdf0e10cSrcweir const Tok_at_include & 104*cdf0e10cSrcweir i_rTok ); 105*cdf0e10cSrcweir virtual void Hdl_at_label( 106*cdf0e10cSrcweir const Tok_at_label & 107*cdf0e10cSrcweir i_rTok ); 108*cdf0e10cSrcweir virtual void Hdl_at_since( 109*cdf0e10cSrcweir const Tok_at_since & 110*cdf0e10cSrcweir i_rTok ); 111*cdf0e10cSrcweir virtual void Hdl_at_HTML( 112*cdf0e10cSrcweir const Tok_at_HTML & 113*cdf0e10cSrcweir i_rTok ); 114*cdf0e10cSrcweir virtual void Hdl_at_NOHTML( 115*cdf0e10cSrcweir const Tok_at_NOHTML & 116*cdf0e10cSrcweir i_rTok ); 117*cdf0e10cSrcweir 118*cdf0e10cSrcweir virtual void Hdl_DocWord( 119*cdf0e10cSrcweir const Tok_DocWord & i_rTok ); 120*cdf0e10cSrcweir 121*cdf0e10cSrcweir virtual void Hdl_Whitespace( 122*cdf0e10cSrcweir const Tok_Whitespace & 123*cdf0e10cSrcweir i_rTok ); 124*cdf0e10cSrcweir virtual void Hdl_LineStart( 125*cdf0e10cSrcweir const Tok_LineStart & 126*cdf0e10cSrcweir i_rTok ); 127*cdf0e10cSrcweir virtual void Hdl_Eol( 128*cdf0e10cSrcweir const Tok_Eol & i_rTok ); 129*cdf0e10cSrcweir 130*cdf0e10cSrcweir virtual void Hdl_EoDocu( 131*cdf0e10cSrcweir const Tok_EoDocu & i_rTok ); 132*cdf0e10cSrcweir 133*cdf0e10cSrcweir 134*cdf0e10cSrcweir DYN ary::doc::OldCppDocu * 135*cdf0e10cSrcweir ReleaseJustParsedDocu(); 136*cdf0e10cSrcweir 137*cdf0e10cSrcweir bool IsComplete() const; 138*cdf0e10cSrcweir 139*cdf0e10cSrcweir private: 140*cdf0e10cSrcweir void InstallAtTag( 141*cdf0e10cSrcweir DYN ary::info::AtTag * 142*cdf0e10cSrcweir let_dpTag, 143*cdf0e10cSrcweir bool i_bImplicit = false ); /// True for implicit @short and @descr. 144*cdf0e10cSrcweir ary::doc::OldCppDocu & 145*cdf0e10cSrcweir CurDocu(); 146*cdf0e10cSrcweir ary::info::AtTag & CurAtTag(); 147*cdf0e10cSrcweir bool UsesHtmlInDocuText(); 148*cdf0e10cSrcweir 149*cdf0e10cSrcweir void RenameCurShortTag(); 150*cdf0e10cSrcweir void FinishCurShortTag(); 151*cdf0e10cSrcweir 152*cdf0e10cSrcweir 153*cdf0e10cSrcweir // DATA 154*cdf0e10cSrcweir enum E_TagState 155*cdf0e10cSrcweir { 156*cdf0e10cSrcweir ts_new, 157*cdf0e10cSrcweir ts_std 158*cdf0e10cSrcweir }; 159*cdf0e10cSrcweir enum E_DocuState 160*cdf0e10cSrcweir { 161*cdf0e10cSrcweir ds_wait_for_short = 0, 162*cdf0e10cSrcweir ds_in_short, 163*cdf0e10cSrcweir ds_1newline_after_short, 164*cdf0e10cSrcweir ds_in_descr, 165*cdf0e10cSrcweir ds_std 166*cdf0e10cSrcweir }; 167*cdf0e10cSrcweir 168*cdf0e10cSrcweir Dyn<ary::doc::OldCppDocu> 169*cdf0e10cSrcweir pCurDocu; 170*cdf0e10cSrcweir ary::info::AtTag * pCurAtTag; 171*cdf0e10cSrcweir uintt nLineCountInDocu; 172*cdf0e10cSrcweir UINT8 nCurSpecialMeaningTokens; 173*cdf0e10cSrcweir UINT8 nCurSubtractFromLineStart; 174*cdf0e10cSrcweir E_TagState eCurTagState; 175*cdf0e10cSrcweir E_DocuState eDocuState; 176*cdf0e10cSrcweir bool bIsComplete; 177*cdf0e10cSrcweir bool bUsesHtmlInDocuText; 178*cdf0e10cSrcweir }; 179*cdf0e10cSrcweir 180*cdf0e10cSrcweir 181*cdf0e10cSrcweir // IMPLEMENTATION 182*cdf0e10cSrcweir inline bool 183*cdf0e10cSrcweir Adoc_PE::IsComplete() const 184*cdf0e10cSrcweir { 185*cdf0e10cSrcweir return bIsComplete; 186*cdf0e10cSrcweir } 187*cdf0e10cSrcweir 188*cdf0e10cSrcweir 189*cdf0e10cSrcweir 190*cdf0e10cSrcweir 191*cdf0e10cSrcweir } // namespace adoc 192*cdf0e10cSrcweir #endif 193