1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef CSI_DSAPI_D_TOKEN_HXX
21 #define CSI_DSAPI_D_TOKEN_HXX
24 #include <ary_i/ci_text2.hxx>
25 #include <ary_i/ci_atag2.hxx>
32 class DocumentationDisplay
;
43 using ary::inf::DocumentationDisplay
;
46 class DT_Dsapi
: public ary::inf::DocuToken
49 virtual void DisplayAt(
50 DocumentationDisplay
&
51 o_rDisplay
) const = 0;
52 virtual bool IsWhiteOnly() const;
57 class DT_TextToken
: public DT_Dsapi
60 explicit DT_TextToken(
61 const char * i_sText
)
63 explicit DT_TextToken(
64 const String
& i_sText
)
66 virtual ~DT_TextToken();
68 virtual void DisplayAt(
69 DocumentationDisplay
&
71 const char * GetText() const { return sText
; }
72 const String
& GetTextStr() const { return sText
; }
74 String
& Access_Text() { return sText
; }
76 virtual bool IsWhiteOnly() const;
82 class DT_White
: public DT_Dsapi
88 virtual void DisplayAt(
89 DocumentationDisplay
&
91 virtual bool IsWhiteOnly() const;
94 class DT_MupType
: public DT_Dsapi
97 explicit DT_MupType() /// Constructor for End-Tag
99 explicit DT_MupType( /// Constructor for Begin-Tag
100 const String
& i_sScope
)
101 : sScope(i_sScope
), bIsBegin(true) {}
102 virtual ~DT_MupType();
104 virtual void DisplayAt(
105 DocumentationDisplay
&
107 const String
& Scope() const { return sScope
; }
108 bool IsBegin() const { return bIsBegin
; }
115 class DT_MupMember
: public DT_Dsapi
118 explicit DT_MupMember() /// Constructor for End-Tag
120 DT_MupMember( /// Constructor for Begin-Tag
121 const String
& i_sScope
)
122 : sScope(i_sScope
), bIsBegin(true) {}
123 virtual ~DT_MupMember();
125 virtual void DisplayAt(
126 DocumentationDisplay
&
128 const String
& Scope() const { return sScope
; }
129 bool IsBegin() const { return bIsBegin
; }
136 class DT_MupConst
: public DT_Dsapi
140 const char * i_sConstText
)
141 : sConstText(i_sConstText
) {}
142 virtual ~DT_MupConst();
144 virtual void DisplayAt(
145 DocumentationDisplay
&
147 const char * GetText() const { return sConstText
; }
150 String sConstText
; /// Without HTML.
154 class DT_Style
: public DT_Dsapi
158 const char * i_sPlainHtmlTag
,
160 : sText(i_sPlainHtmlTag
), bNewLine(i_bNewLine
) {}
163 virtual void DisplayAt(
164 DocumentationDisplay
&
166 const char * GetText() const { return sText
; }
167 bool IsStartOfNewLine() const
170 String sText
; /// With HTML.
174 class DT_EOL
: public DT_Dsapi
180 virtual void DisplayAt(
181 DocumentationDisplay
&
183 virtual bool IsWhiteOnly() const;
187 class DT_AtTag
: public ary::inf::AtTag2
191 DYN
ary::inf::DocuToken
&
193 { aText
.AddToken(let_drToken
); }
195 const char * i_sName
)
196 { sTitle
= i_sName
; }
200 const char * i_sTitle
)
201 : ary::inf::AtTag2(i_sTitle
) {}
204 class DT_StdAtTag
: public DT_AtTag
207 explicit DT_StdAtTag(
208 const char * i_sTitle
)
209 : DT_AtTag(i_sTitle
) {}
210 virtual ~DT_StdAtTag();
212 virtual void DisplayAt(
213 DocumentationDisplay
&
217 class DT_SeeAlsoAtTag
: public DT_AtTag
220 DT_SeeAlsoAtTag() : DT_AtTag("") {}
221 virtual ~DT_SeeAlsoAtTag();
223 virtual void DisplayAt(
224 DocumentationDisplay
&
226 const String
& LinkText() const { return sTitle
; } // abuse of sTitle
229 class DT_ParameterAtTag
: public DT_AtTag
232 DT_ParameterAtTag() : DT_AtTag("") {}
233 virtual ~DT_ParameterAtTag();
236 const char * i_sTitle
);
237 virtual void DisplayAt(
238 DocumentationDisplay
&
242 class DT_SinceAtTag
: public DT_AtTag
245 DT_SinceAtTag() : DT_AtTag("Since version") {}
246 virtual ~DT_SinceAtTag();
248 virtual void DisplayAt(
249 DocumentationDisplay
&
259 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */