Bump for 3.6-28
[LibreOffice.git] / autodoc / inc / ary_i / d_token.hxx
blob7247de6e90389e36c9ca3059128fad0e91084b7c
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
32 // BASE CLASSES
33 #include <ary_i/ci_text2.hxx>
34 #include <ary_i/ci_atag2.hxx>
37 namespace ary
39 namespace inf
41 class DocumentationDisplay;
47 namespace csi
49 namespace dsapi
52 using ary::inf::DocumentationDisplay;
55 class DT_Dsapi : public ary::inf::DocuToken
57 public:
58 virtual void DisplayAt(
59 DocumentationDisplay &
60 o_rDisplay ) const = 0;
61 virtual bool IsWhiteOnly() const;
66 class DT_TextToken : public DT_Dsapi
68 public:
69 explicit DT_TextToken(
70 const char * i_sText )
71 : sText(i_sText) {}
72 explicit DT_TextToken(
73 const String & i_sText )
74 : sText(i_sText) {}
75 virtual ~DT_TextToken();
77 virtual void DisplayAt(
78 DocumentationDisplay &
79 o_rDisplay ) const;
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;
87 private:
88 String sText;
91 class DT_White : public DT_Dsapi
93 public:
94 DT_White() {}
95 virtual ~DT_White();
97 virtual void DisplayAt(
98 DocumentationDisplay &
99 o_rDisplay ) const;
100 virtual bool IsWhiteOnly() const;
104 class DT_MLTag : public DT_Dsapi
106 public:
107 enum E_Kind
109 k_unknown = 0,
110 k_begin,
111 k_end,
112 k_single
116 class DT_MupType : public DT_MLTag
118 public:
119 explicit DT_MupType() /// Constructor for End-Tag
120 : bIsBegin(false) {}
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 &
128 o_rDisplay ) const;
129 const String & Scope() const { return sScope; }
130 bool IsBegin() const { return bIsBegin; }
132 private:
133 String sScope;
134 bool bIsBegin;
137 class DT_MupMember : public DT_MLTag
139 public:
140 explicit DT_MupMember() /// Constructor for End-Tag
141 : bIsBegin(false) {}
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 &
149 o_rDisplay ) const;
150 const String & Scope() const { return sScope; }
151 bool IsBegin() const { return bIsBegin; }
153 private:
154 String sScope;
155 bool bIsBegin;
158 class DT_MupConst : public DT_Dsapi
160 public:
161 DT_MupConst(
162 const char * i_sConstText )
163 : sConstText(i_sConstText) {}
164 virtual ~DT_MupConst();
166 virtual void DisplayAt(
167 DocumentationDisplay &
168 o_rDisplay ) const;
169 const char * GetText() const { return sConstText; }
171 private:
172 String sConstText; /// Without HTML.
176 class DT_Style : public DT_MLTag
178 public:
179 DT_Style(
180 const char * i_sPlainHtmlTag,
181 bool i_bNewLine )
182 : sText(i_sPlainHtmlTag), bNewLine(i_bNewLine) {}
183 virtual ~DT_Style();
185 virtual void DisplayAt(
186 DocumentationDisplay &
187 o_rDisplay ) const;
188 const char * GetText() const { return sText; }
189 bool IsStartOfNewLine() const
190 { return bNewLine; }
191 private:
192 String sText; /// With HTML.
193 E_Kind eKind;
194 bool bNewLine;
197 class DT_EOL : public DT_Dsapi
199 public:
200 DT_EOL() {}
201 virtual ~DT_EOL();
203 virtual void DisplayAt(
204 DocumentationDisplay &
205 o_rDisplay ) const;
206 virtual bool IsWhiteOnly() const;
210 class DT_AtTag : public ary::inf::AtTag2
212 public:
213 void AddToken(
214 DYN ary::inf::DocuToken &
215 let_drToken )
216 { aText.AddToken(let_drToken); }
217 void SetName(
218 const char * i_sName )
219 { sTitle = i_sName; }
221 protected:
222 DT_AtTag(
223 const char * i_sTitle )
224 : ary::inf::AtTag2(i_sTitle) {}
227 class DT_StdAtTag : public DT_AtTag
229 public:
230 explicit DT_StdAtTag(
231 const char * i_sTitle )
232 : DT_AtTag(i_sTitle) {}
233 virtual ~DT_StdAtTag();
235 virtual void DisplayAt(
236 DocumentationDisplay &
237 o_rDisplay ) const;
240 class DT_SeeAlsoAtTag : public DT_AtTag
242 public:
243 DT_SeeAlsoAtTag() : DT_AtTag("") {}
244 virtual ~DT_SeeAlsoAtTag();
246 virtual void DisplayAt(
247 DocumentationDisplay &
248 o_rDisplay ) const;
249 const String & LinkText() const { return sTitle; } // abuse of sTitle
252 class DT_ParameterAtTag : public DT_AtTag
254 public:
255 DT_ParameterAtTag() : DT_AtTag("") {}
256 virtual ~DT_ParameterAtTag();
258 void SetTitle(
259 const char * i_sTitle );
260 virtual void DisplayAt(
261 DocumentationDisplay &
262 o_rDisplay ) const;
265 class DT_SinceAtTag : public DT_AtTag
267 public:
268 DT_SinceAtTag() : DT_AtTag("Since version") {}
269 virtual ~DT_SinceAtTag();
271 virtual void DisplayAt(
272 DocumentationDisplay &
273 o_rDisplay ) const;
277 } // namespace dsapi
278 } // namespace csi
280 #endif
282 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */