merge the formfield patch from ooo-build
[ooovba.git] / autodoc / source / parser / inc / adoc / docu_pe.hxx
blob48412caf7813275ddac6c5185d27384e71b02896
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: docu_pe.hxx,v $
10 * $Revision: 1.5 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef ADC_DOCU_PE_HXX
32 #define ADC_DOCU_PE_HXX
36 // USED SERVICES
37 // BASE CLASSES
38 #include <adoc/tokintpr.hxx>
39 // COMPONENTS
40 // PARAMETERS
42 namespace ary
44 namespace doc
46 class OldCppDocu;
48 namespace info
50 class AtTag;
56 namespace adoc
60 class Adoc_PE : public TokenInterpreter
62 public:
63 Adoc_PE();
64 ~Adoc_PE();
66 virtual void Hdl_at_std(
67 const Tok_at_std & i_rTok );
68 virtual void Hdl_at_base(
69 const Tok_at_base & i_rTok );
70 virtual void Hdl_at_exception(
71 const Tok_at_exception &
72 i_rTok );
73 virtual void Hdl_at_impl(
74 const Tok_at_impl & i_rTok );
75 virtual void Hdl_at_key(
76 const Tok_at_key & i_rTok );
77 virtual void Hdl_at_param(
78 const Tok_at_param &
79 i_rTok );
80 virtual void Hdl_at_see(
81 const Tok_at_see & i_rTok );
82 virtual void Hdl_at_template(
83 const Tok_at_template &
84 i_rTok );
85 virtual void Hdl_at_interface(
86 const Tok_at_interface &
87 i_rTok );
88 virtual void Hdl_at_internal(
89 const Tok_at_internal &
90 i_rTok );
91 virtual void Hdl_at_obsolete(
92 const Tok_at_obsolete &
93 i_rTok );
94 virtual void Hdl_at_module(
95 const Tok_at_module &
96 i_rTok );
97 virtual void Hdl_at_file(
98 const Tok_at_file & i_rTok );
99 virtual void Hdl_at_gloss(
100 const Tok_at_gloss &
101 i_rTok );
102 virtual void Hdl_at_global(
103 const Tok_at_global &
104 i_rTok );
105 virtual void Hdl_at_include(
106 const Tok_at_include &
107 i_rTok );
108 virtual void Hdl_at_label(
109 const Tok_at_label &
110 i_rTok );
111 virtual void Hdl_at_since(
112 const Tok_at_since &
113 i_rTok );
114 virtual void Hdl_at_HTML(
115 const Tok_at_HTML &
116 i_rTok );
117 virtual void Hdl_at_NOHTML(
118 const Tok_at_NOHTML &
119 i_rTok );
121 virtual void Hdl_DocWord(
122 const Tok_DocWord & i_rTok );
124 virtual void Hdl_Whitespace(
125 const Tok_Whitespace &
126 i_rTok );
127 virtual void Hdl_LineStart(
128 const Tok_LineStart &
129 i_rTok );
130 virtual void Hdl_Eol(
131 const Tok_Eol & i_rTok );
133 virtual void Hdl_EoDocu(
134 const Tok_EoDocu & i_rTok );
137 DYN ary::doc::OldCppDocu *
138 ReleaseJustParsedDocu();
140 bool IsComplete() const;
142 private:
143 void InstallAtTag(
144 DYN ary::info::AtTag *
145 let_dpTag,
146 bool i_bImplicit = false ); /// True for implicit @short and @descr.
147 ary::doc::OldCppDocu &
148 CurDocu();
149 ary::info::AtTag & CurAtTag();
150 bool UsesHtmlInDocuText();
152 void RenameCurShortTag();
153 void FinishCurShortTag();
156 // DATA
157 enum E_TagState
159 ts_new,
160 ts_std
162 enum E_DocuState
164 ds_wait_for_short = 0,
165 ds_in_short,
166 ds_1newline_after_short,
167 ds_in_descr,
168 ds_std
171 Dyn<ary::doc::OldCppDocu>
172 pCurDocu;
173 ary::info::AtTag * pCurAtTag;
174 uintt nLineCountInDocu;
175 UINT8 nCurSpecialMeaningTokens;
176 UINT8 nCurSubtractFromLineStart;
177 E_TagState eCurTagState;
178 E_DocuState eDocuState;
179 bool bIsComplete;
180 bool bUsesHtmlInDocuText;
184 // IMPLEMENTATION
185 inline bool
186 Adoc_PE::IsComplete() const
188 return bIsComplete;
194 } // namespace adoc
195 #endif