Bump for 4.0-15
[LibreOffice.git] / autodoc / inc / ary_i / d_token.hxx
blobe04c6bf582176287f72bed608426628d19f37324
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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
23 // BASE CLASSES
24 #include <ary_i/ci_text2.hxx>
25 #include <ary_i/ci_atag2.hxx>
28 namespace ary
30 namespace inf
32 class DocumentationDisplay;
38 namespace csi
40 namespace dsapi
43 using ary::inf::DocumentationDisplay;
46 class DT_Dsapi : public ary::inf::DocuToken
48 public:
49 virtual void DisplayAt(
50 DocumentationDisplay &
51 o_rDisplay ) const = 0;
52 virtual bool IsWhiteOnly() const;
57 class DT_TextToken : public DT_Dsapi
59 public:
60 explicit DT_TextToken(
61 const char * i_sText )
62 : sText(i_sText) {}
63 explicit DT_TextToken(
64 const String & i_sText )
65 : sText(i_sText) {}
66 virtual ~DT_TextToken();
68 virtual void DisplayAt(
69 DocumentationDisplay &
70 o_rDisplay ) const;
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;
78 private:
79 String sText;
82 class DT_White : public DT_Dsapi
84 public:
85 DT_White() {}
86 virtual ~DT_White();
88 virtual void DisplayAt(
89 DocumentationDisplay &
90 o_rDisplay ) const;
91 virtual bool IsWhiteOnly() const;
94 class DT_MupType : public DT_Dsapi
96 public:
97 explicit DT_MupType() /// Constructor for End-Tag
98 : bIsBegin(false) {}
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 &
106 o_rDisplay ) const;
107 const String & Scope() const { return sScope; }
108 bool IsBegin() const { return bIsBegin; }
110 private:
111 String sScope;
112 bool bIsBegin;
115 class DT_MupMember : public DT_Dsapi
117 public:
118 explicit DT_MupMember() /// Constructor for End-Tag
119 : bIsBegin(false) {}
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 &
127 o_rDisplay ) const;
128 const String & Scope() const { return sScope; }
129 bool IsBegin() const { return bIsBegin; }
131 private:
132 String sScope;
133 bool bIsBegin;
136 class DT_MupConst : public DT_Dsapi
138 public:
139 DT_MupConst(
140 const char * i_sConstText )
141 : sConstText(i_sConstText) {}
142 virtual ~DT_MupConst();
144 virtual void DisplayAt(
145 DocumentationDisplay &
146 o_rDisplay ) const;
147 const char * GetText() const { return sConstText; }
149 private:
150 String sConstText; /// Without HTML.
154 class DT_Style : public DT_Dsapi
156 public:
157 DT_Style(
158 const char * i_sPlainHtmlTag,
159 bool i_bNewLine )
160 : sText(i_sPlainHtmlTag), bNewLine(i_bNewLine) {}
161 virtual ~DT_Style();
163 virtual void DisplayAt(
164 DocumentationDisplay &
165 o_rDisplay ) const;
166 const char * GetText() const { return sText; }
167 bool IsStartOfNewLine() const
168 { return bNewLine; }
169 private:
170 String sText; /// With HTML.
171 bool bNewLine;
174 class DT_EOL : public DT_Dsapi
176 public:
177 DT_EOL() {}
178 virtual ~DT_EOL();
180 virtual void DisplayAt(
181 DocumentationDisplay &
182 o_rDisplay ) const;
183 virtual bool IsWhiteOnly() const;
187 class DT_AtTag : public ary::inf::AtTag2
189 public:
190 void AddToken(
191 DYN ary::inf::DocuToken &
192 let_drToken )
193 { aText.AddToken(let_drToken); }
194 void SetName(
195 const char * i_sName )
196 { sTitle = i_sName; }
198 protected:
199 DT_AtTag(
200 const char * i_sTitle )
201 : ary::inf::AtTag2(i_sTitle) {}
204 class DT_StdAtTag : public DT_AtTag
206 public:
207 explicit DT_StdAtTag(
208 const char * i_sTitle )
209 : DT_AtTag(i_sTitle) {}
210 virtual ~DT_StdAtTag();
212 virtual void DisplayAt(
213 DocumentationDisplay &
214 o_rDisplay ) const;
217 class DT_SeeAlsoAtTag : public DT_AtTag
219 public:
220 DT_SeeAlsoAtTag() : DT_AtTag("") {}
221 virtual ~DT_SeeAlsoAtTag();
223 virtual void DisplayAt(
224 DocumentationDisplay &
225 o_rDisplay ) const;
226 const String & LinkText() const { return sTitle; } // abuse of sTitle
229 class DT_ParameterAtTag : public DT_AtTag
231 public:
232 DT_ParameterAtTag() : DT_AtTag("") {}
233 virtual ~DT_ParameterAtTag();
235 void SetTitle(
236 const char * i_sTitle );
237 virtual void DisplayAt(
238 DocumentationDisplay &
239 o_rDisplay ) const;
242 class DT_SinceAtTag : public DT_AtTag
244 public:
245 DT_SinceAtTag() : DT_AtTag("Since version") {}
246 virtual ~DT_SinceAtTag();
248 virtual void DisplayAt(
249 DocumentationDisplay &
250 o_rDisplay ) const;
254 } // namespace dsapi
255 } // namespace csi
257 #endif
259 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */