1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * This file is part of OpenOffice.org.
12 * OpenOffice.org is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 3
14 * only, as published by the Free Software Foundation.
16 * OpenOffice.org is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License version 3 for more details
20 * (a copy is included in the LICENSE file that accompanied this code).
22 * You should have received a copy of the GNU Lesser General Public License
23 * version 3 along with OpenOffice.org. If not, see
24 * <http://www.openoffice.org/license.html>
25 * for a copy of the LGPLv3 License.
27 ************************************************************************/
29 #ifndef CSI_DSAPI_D_TOKEN_HXX
30 #define CSI_DSAPI_D_TOKEN_HXX
33 #include <ary_i/ci_text2.hxx>
34 #include <ary_i/ci_atag2.hxx>
41 class DocumentationDisplay
;
52 using ary::inf::DocumentationDisplay
;
55 class DT_Dsapi
: public ary::inf::DocuToken
58 virtual void DisplayAt(
59 DocumentationDisplay
&
60 o_rDisplay
) const = 0;
61 virtual bool IsWhiteOnly() const;
66 class DT_TextToken
: public DT_Dsapi
69 explicit DT_TextToken(
70 const char * i_sText
)
72 explicit DT_TextToken(
73 const String
& i_sText
)
75 virtual ~DT_TextToken();
77 virtual void DisplayAt(
78 DocumentationDisplay
&
80 const char * GetText() const { return sText
; }
81 const String
& GetTextStr() const { return sText
; }
83 String
& Access_Text() { return sText
; }
85 virtual bool IsWhiteOnly() const;
91 class DT_White
: public DT_Dsapi
97 virtual void DisplayAt(
98 DocumentationDisplay
&
100 virtual bool IsWhiteOnly() const;
104 class DT_MLTag
: public DT_Dsapi
116 class DT_MupType
: public DT_MLTag
119 explicit DT_MupType() /// Constructor for End-Tag
121 explicit DT_MupType( /// Constructor for Begin-Tag
122 const String
& i_sScope
)
123 : sScope(i_sScope
), bIsBegin(true) {}
124 virtual ~DT_MupType();
126 virtual void DisplayAt(
127 DocumentationDisplay
&
129 const String
& Scope() const { return sScope
; }
130 bool IsBegin() const { return bIsBegin
; }
137 class DT_MupMember
: public DT_MLTag
140 explicit DT_MupMember() /// Constructor for End-Tag
142 DT_MupMember( /// Constructor for Begin-Tag
143 const String
& i_sScope
)
144 : sScope(i_sScope
), bIsBegin(true) {}
145 virtual ~DT_MupMember();
147 virtual void DisplayAt(
148 DocumentationDisplay
&
150 const String
& Scope() const { return sScope
; }
151 bool IsBegin() const { return bIsBegin
; }
158 class DT_MupConst
: public DT_Dsapi
162 const char * i_sConstText
)
163 : sConstText(i_sConstText
) {}
164 virtual ~DT_MupConst();
166 virtual void DisplayAt(
167 DocumentationDisplay
&
169 const char * GetText() const { return sConstText
; }
172 String sConstText
; /// Without HTML.
176 class DT_Style
: public DT_MLTag
180 const char * i_sPlainHtmlTag
,
182 : sText(i_sPlainHtmlTag
), bNewLine(i_bNewLine
) {}
185 virtual void DisplayAt(
186 DocumentationDisplay
&
188 const char * GetText() const { return sText
; }
189 bool IsStartOfNewLine() const
192 String sText
; /// With HTML.
197 class DT_EOL
: public DT_Dsapi
203 virtual void DisplayAt(
204 DocumentationDisplay
&
206 virtual bool IsWhiteOnly() const;
210 class DT_AtTag
: public ary::inf::AtTag2
214 DYN
ary::inf::DocuToken
&
216 { aText
.AddToken(let_drToken
); }
218 const char * i_sName
)
219 { sTitle
= i_sName
; }
223 const char * i_sTitle
)
224 : ary::inf::AtTag2(i_sTitle
) {}
227 class DT_StdAtTag
: public DT_AtTag
230 explicit DT_StdAtTag(
231 const char * i_sTitle
)
232 : DT_AtTag(i_sTitle
) {}
233 virtual ~DT_StdAtTag();
235 virtual void DisplayAt(
236 DocumentationDisplay
&
240 class DT_SeeAlsoAtTag
: public DT_AtTag
243 DT_SeeAlsoAtTag() : DT_AtTag("") {}
244 virtual ~DT_SeeAlsoAtTag();
246 virtual void DisplayAt(
247 DocumentationDisplay
&
249 const String
& LinkText() const { return sTitle
; } // abuse of sTitle
252 class DT_ParameterAtTag
: public DT_AtTag
255 DT_ParameterAtTag() : DT_AtTag("") {}
256 virtual ~DT_ParameterAtTag();
259 const char * i_sTitle
);
260 virtual void DisplayAt(
261 DocumentationDisplay
&
265 class DT_SinceAtTag
: public DT_AtTag
268 DT_SinceAtTag() : DT_AtTag("Since version") {}
269 virtual ~DT_SinceAtTag();
271 virtual void DisplayAt(
272 DocumentationDisplay
&
282 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */