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_ADOC_CX_A_STD_HXX 29 #define ADC_ADOC_CX_A_STD_HXX 30 31 // USED SERVICES 32 // BASE CLASSES 33 #include <tokens/tkpcontx.hxx> 34 // COMPONENTS 35 #include <tokens/tkpstama.hxx> 36 // PARAMETERS 37 38 class TextToken; 39 40 41 namespace adoc { 42 43 class Cx_LineStart; 44 class Cx_CheckStar; 45 class Cx_AtTagCompletion; 46 47 48 /** 49 @descr 50 */ 51 class Context_AdocStd : public autodoc::TkpDocuContext, 52 private StateMachineContext 53 { 54 public: 55 // LIFECYCLE 56 Context_AdocStd(); 57 virtual void SetParentContext( 58 TkpContext & io_rParentContext, 59 const char * i_sMultiLineEndToken ); 60 ~Context_AdocStd(); 61 62 // OPERATIONS 63 virtual void AssignDealer( 64 TokenDealer & o_rDealer ); 65 66 virtual void ReadCharChain( 67 CharacterSource & io_rText ); 68 virtual bool PassNewToken(); 69 virtual void SetMode_IsMultiLine( 70 bool i_bTrue ); 71 // INQUIRY 72 virtual TkpContext & 73 FollowUpContext(); 74 private: 75 // SERVICE FUNCTIONS 76 virtual void PerformStatusFunction( 77 uintt i_nStatusSignal, 78 F_CRTOK i_fTokenCreateFunction, 79 CharacterSource & io_rText ); 80 81 void SetupStateMachine(); 82 83 // DATA 84 StateMachine aStateMachine; 85 TokenDealer * pDealer; 86 87 // Contexts 88 TkpContext * pParentContext; 89 TkpContext * pFollowUpContext; 90 Dyn<Cx_LineStart> pCx_LineStart; 91 Dyn<Cx_CheckStar> pCx_CheckStar; 92 Dyn<Cx_AtTagCompletion> 93 pCx_AtTagCompletion; 94 95 // Temporary data, used during ReadCharChain() 96 Dyn<TextToken> pNewToken; 97 bool bIsMultiline; 98 }; 99 100 101 } // namespace adoc 102 103 104 #endif 105 106