xref: /aoo42x/main/autodoc/inc/ary_i/d_token.hxx (revision cdf0e10c)
1*cdf0e10cSrcweir /*************************************************************************
2*cdf0e10cSrcweir  *
3*cdf0e10cSrcweir  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4*cdf0e10cSrcweir  *
5*cdf0e10cSrcweir  * Copyright 2000, 2010 Oracle and/or its affiliates.
6*cdf0e10cSrcweir  *
7*cdf0e10cSrcweir  * OpenOffice.org - a multi-platform office productivity suite
8*cdf0e10cSrcweir  *
9*cdf0e10cSrcweir  * This file is part of OpenOffice.org.
10*cdf0e10cSrcweir  *
11*cdf0e10cSrcweir  * OpenOffice.org is free software: you can redistribute it and/or modify
12*cdf0e10cSrcweir  * it under the terms of the GNU Lesser General Public License version 3
13*cdf0e10cSrcweir  * only, as published by the Free Software Foundation.
14*cdf0e10cSrcweir  *
15*cdf0e10cSrcweir  * OpenOffice.org is distributed in the hope that it will be useful,
16*cdf0e10cSrcweir  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17*cdf0e10cSrcweir  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18*cdf0e10cSrcweir  * GNU Lesser General Public License version 3 for more details
19*cdf0e10cSrcweir  * (a copy is included in the LICENSE file that accompanied this code).
20*cdf0e10cSrcweir  *
21*cdf0e10cSrcweir  * You should have received a copy of the GNU Lesser General Public License
22*cdf0e10cSrcweir  * version 3 along with OpenOffice.org.  If not, see
23*cdf0e10cSrcweir  * <http://www.openoffice.org/license.html>
24*cdf0e10cSrcweir  * for a copy of the LGPLv3 License.
25*cdf0e10cSrcweir  *
26*cdf0e10cSrcweir  ************************************************************************/
27*cdf0e10cSrcweir 
28*cdf0e10cSrcweir #ifndef CSI_DSAPI_D_TOKEN_HXX
29*cdf0e10cSrcweir #define CSI_DSAPI_D_TOKEN_HXX
30*cdf0e10cSrcweir 
31*cdf0e10cSrcweir // BASE CLASSES
32*cdf0e10cSrcweir #include <ary_i/ci_text2.hxx>
33*cdf0e10cSrcweir #include <ary_i/ci_atag2.hxx>
34*cdf0e10cSrcweir 
35*cdf0e10cSrcweir 
36*cdf0e10cSrcweir namespace ary
37*cdf0e10cSrcweir {
38*cdf0e10cSrcweir namespace inf
39*cdf0e10cSrcweir {
40*cdf0e10cSrcweir     class DocumentationDisplay;
41*cdf0e10cSrcweir }
42*cdf0e10cSrcweir }
43*cdf0e10cSrcweir 
44*cdf0e10cSrcweir 
45*cdf0e10cSrcweir 
46*cdf0e10cSrcweir namespace csi
47*cdf0e10cSrcweir {
48*cdf0e10cSrcweir namespace dsapi
49*cdf0e10cSrcweir {
50*cdf0e10cSrcweir 
51*cdf0e10cSrcweir using ary::inf::DocumentationDisplay;
52*cdf0e10cSrcweir 
53*cdf0e10cSrcweir 
54*cdf0e10cSrcweir class DT_Dsapi : public ary::inf::DocuToken
55*cdf0e10cSrcweir {
56*cdf0e10cSrcweir   public:
57*cdf0e10cSrcweir 	virtual void		DisplayAt(
58*cdf0e10cSrcweir 							DocumentationDisplay &
59*cdf0e10cSrcweir 												o_rDisplay ) const  = 0;
60*cdf0e10cSrcweir 	virtual bool		IsWhiteOnly() const;
61*cdf0e10cSrcweir };
62*cdf0e10cSrcweir 
63*cdf0e10cSrcweir 
64*cdf0e10cSrcweir 
65*cdf0e10cSrcweir class DT_TextToken : public DT_Dsapi
66*cdf0e10cSrcweir {
67*cdf0e10cSrcweir   public:
68*cdf0e10cSrcweir 	explicit		    DT_TextToken(
69*cdf0e10cSrcweir 							const char *		i_sText )
70*cdf0e10cSrcweir 												:	sText(i_sText) {}
71*cdf0e10cSrcweir 	explicit		    DT_TextToken(
72*cdf0e10cSrcweir 							const String &  	i_sText )
73*cdf0e10cSrcweir 												:	sText(i_sText) {}
74*cdf0e10cSrcweir     virtual             ~DT_TextToken();
75*cdf0e10cSrcweir 
76*cdf0e10cSrcweir 	virtual void		DisplayAt(
77*cdf0e10cSrcweir 							DocumentationDisplay &
78*cdf0e10cSrcweir 												o_rDisplay ) const;
79*cdf0e10cSrcweir 	const char *		GetText() const			{ return sText; }
80*cdf0e10cSrcweir 	const String &      GetTextStr() const		{ return sText; }
81*cdf0e10cSrcweir 
82*cdf0e10cSrcweir 	String &            Access_Text()   		{ return sText; }
83*cdf0e10cSrcweir 
84*cdf0e10cSrcweir 	virtual bool		IsWhiteOnly() const;
85*cdf0e10cSrcweir 
86*cdf0e10cSrcweir   private:
87*cdf0e10cSrcweir 	String				sText;
88*cdf0e10cSrcweir };
89*cdf0e10cSrcweir 
90*cdf0e10cSrcweir class DT_White : public DT_Dsapi
91*cdf0e10cSrcweir {
92*cdf0e10cSrcweir   public:
93*cdf0e10cSrcweir                         DT_White() {}
94*cdf0e10cSrcweir     virtual             ~DT_White();
95*cdf0e10cSrcweir 
96*cdf0e10cSrcweir 	virtual void		DisplayAt(
97*cdf0e10cSrcweir 							DocumentationDisplay &
98*cdf0e10cSrcweir 												o_rDisplay ) const;
99*cdf0e10cSrcweir 	virtual bool		IsWhiteOnly() const;
100*cdf0e10cSrcweir };
101*cdf0e10cSrcweir 
102*cdf0e10cSrcweir 
103*cdf0e10cSrcweir class DT_MLTag : public DT_Dsapi
104*cdf0e10cSrcweir {
105*cdf0e10cSrcweir   public:
106*cdf0e10cSrcweir 	enum E_Kind
107*cdf0e10cSrcweir 	{
108*cdf0e10cSrcweir 		k_unknown = 0,
109*cdf0e10cSrcweir 		k_begin,
110*cdf0e10cSrcweir 		k_end,
111*cdf0e10cSrcweir 		k_single
112*cdf0e10cSrcweir 	};
113*cdf0e10cSrcweir };
114*cdf0e10cSrcweir 
115*cdf0e10cSrcweir class DT_MupType : public DT_MLTag
116*cdf0e10cSrcweir {
117*cdf0e10cSrcweir   public:
118*cdf0e10cSrcweir 	explicit		    DT_MupType(             /// Constructor for End-Tag
119*cdf0e10cSrcweir 							bool				)	/// Must be there, but is not evaluated.
120*cdf0e10cSrcweir                                                 :	bIsBegin(false) {}
121*cdf0e10cSrcweir 	explicit		    DT_MupType(             /// Constructor for Begin-Tag
122*cdf0e10cSrcweir 							const String &		i_sScope )
123*cdf0e10cSrcweir 												:	sScope(i_sScope), bIsBegin(true) {}
124*cdf0e10cSrcweir     virtual             ~DT_MupType();
125*cdf0e10cSrcweir 
126*cdf0e10cSrcweir 	virtual void		DisplayAt(
127*cdf0e10cSrcweir 							DocumentationDisplay &
128*cdf0e10cSrcweir 												o_rDisplay ) const;
129*cdf0e10cSrcweir 	const String  &		Scope() const			{ return sScope; }
130*cdf0e10cSrcweir 	bool				IsBegin() const			{ return bIsBegin; }
131*cdf0e10cSrcweir 
132*cdf0e10cSrcweir   private:
133*cdf0e10cSrcweir 	String 				sScope;
134*cdf0e10cSrcweir 	bool				bIsBegin;
135*cdf0e10cSrcweir };
136*cdf0e10cSrcweir 
137*cdf0e10cSrcweir class DT_MupMember : public DT_MLTag
138*cdf0e10cSrcweir {
139*cdf0e10cSrcweir   public:
140*cdf0e10cSrcweir 	explicit		    DT_MupMember(           /// Constructor for End-Tag
141*cdf0e10cSrcweir 							bool				)	/// Must be there, but is not evaluated.
142*cdf0e10cSrcweir 												:	bIsBegin(false) {}
143*cdf0e10cSrcweir 						DT_MupMember(           /// Constructor for Begin-Tag
144*cdf0e10cSrcweir 							const String &      i_sScope )
145*cdf0e10cSrcweir 												:	sScope(i_sScope), bIsBegin(true) {}
146*cdf0e10cSrcweir     virtual             ~DT_MupMember();
147*cdf0e10cSrcweir 
148*cdf0e10cSrcweir 	virtual void		DisplayAt(
149*cdf0e10cSrcweir 							DocumentationDisplay &
150*cdf0e10cSrcweir 												o_rDisplay ) const;
151*cdf0e10cSrcweir 	const String  &		Scope() const			{ return sScope; }
152*cdf0e10cSrcweir 	bool				IsBegin() const			{ return bIsBegin; }
153*cdf0e10cSrcweir 
154*cdf0e10cSrcweir   private:
155*cdf0e10cSrcweir 	String 				sScope;
156*cdf0e10cSrcweir 	bool				bIsBegin;
157*cdf0e10cSrcweir };
158*cdf0e10cSrcweir 
159*cdf0e10cSrcweir class DT_MupConst : public DT_Dsapi
160*cdf0e10cSrcweir {
161*cdf0e10cSrcweir   public:
162*cdf0e10cSrcweir 						DT_MupConst(
163*cdf0e10cSrcweir 							const char *		i_sConstText )
164*cdf0e10cSrcweir 												:	sConstText(i_sConstText) {}
165*cdf0e10cSrcweir 	virtual             ~DT_MupConst();
166*cdf0e10cSrcweir 
167*cdf0e10cSrcweir 	virtual void		DisplayAt(
168*cdf0e10cSrcweir 							DocumentationDisplay &
169*cdf0e10cSrcweir 												o_rDisplay ) const;
170*cdf0e10cSrcweir 	const char *		GetText() const			{ return sConstText; }
171*cdf0e10cSrcweir 
172*cdf0e10cSrcweir   private:
173*cdf0e10cSrcweir 	String 				sConstText;				/// Without HTML.
174*cdf0e10cSrcweir };
175*cdf0e10cSrcweir 
176*cdf0e10cSrcweir 
177*cdf0e10cSrcweir class DT_Style : public DT_MLTag
178*cdf0e10cSrcweir {
179*cdf0e10cSrcweir   public:
180*cdf0e10cSrcweir 						DT_Style(
181*cdf0e10cSrcweir 							const char *		i_sPlainHtmlTag,
182*cdf0e10cSrcweir 							bool                i_bNewLine )
183*cdf0e10cSrcweir 												: sText(i_sPlainHtmlTag), bNewLine(i_bNewLine) {}
184*cdf0e10cSrcweir 	virtual             ~DT_Style();
185*cdf0e10cSrcweir 
186*cdf0e10cSrcweir 	virtual void		DisplayAt(
187*cdf0e10cSrcweir 							DocumentationDisplay &
188*cdf0e10cSrcweir 												o_rDisplay ) const;
189*cdf0e10cSrcweir 	const char *		GetText() const			{ return sText; }
190*cdf0e10cSrcweir 	bool				IsStartOfNewLine() const
191*cdf0e10cSrcweir 												{ return bNewLine; }
192*cdf0e10cSrcweir   private:
193*cdf0e10cSrcweir 	String 				sText;					/// With HTML.
194*cdf0e10cSrcweir 	E_Kind              eKind;
195*cdf0e10cSrcweir 	bool				bNewLine;
196*cdf0e10cSrcweir };
197*cdf0e10cSrcweir 
198*cdf0e10cSrcweir class DT_EOL : public DT_Dsapi
199*cdf0e10cSrcweir {
200*cdf0e10cSrcweir   public:
201*cdf0e10cSrcweir                         DT_EOL() {}
202*cdf0e10cSrcweir     virtual             ~DT_EOL();
203*cdf0e10cSrcweir 
204*cdf0e10cSrcweir 	virtual void		DisplayAt(
205*cdf0e10cSrcweir 							DocumentationDisplay &
206*cdf0e10cSrcweir 												o_rDisplay ) const;
207*cdf0e10cSrcweir 	virtual bool		IsWhiteOnly() const;
208*cdf0e10cSrcweir };
209*cdf0e10cSrcweir 
210*cdf0e10cSrcweir 
211*cdf0e10cSrcweir class DT_AtTag : public ary::inf::AtTag2
212*cdf0e10cSrcweir {
213*cdf0e10cSrcweir   public:
214*cdf0e10cSrcweir 	void            	AddToken(
215*cdf0e10cSrcweir 							DYN ary::inf::DocuToken &
216*cdf0e10cSrcweir 												let_drToken )
217*cdf0e10cSrcweir 												{	aText.AddToken(let_drToken); }
218*cdf0e10cSrcweir 	void				SetName(
219*cdf0e10cSrcweir 							const char *		i_sName )
220*cdf0e10cSrcweir 												{ sTitle = i_sName; }
221*cdf0e10cSrcweir 
222*cdf0e10cSrcweir   protected:
223*cdf0e10cSrcweir 						DT_AtTag(
224*cdf0e10cSrcweir 							const char *		i_sTitle )
225*cdf0e10cSrcweir 												:	ary::inf::AtTag2(i_sTitle) {}
226*cdf0e10cSrcweir };
227*cdf0e10cSrcweir 
228*cdf0e10cSrcweir class DT_StdAtTag : public DT_AtTag
229*cdf0e10cSrcweir {
230*cdf0e10cSrcweir   public:
231*cdf0e10cSrcweir 	explicit			DT_StdAtTag(
232*cdf0e10cSrcweir 							const char *		i_sTitle )
233*cdf0e10cSrcweir 												:	DT_AtTag(i_sTitle) {}
234*cdf0e10cSrcweir 	virtual             ~DT_StdAtTag();
235*cdf0e10cSrcweir 
236*cdf0e10cSrcweir 	virtual void		DisplayAt(
237*cdf0e10cSrcweir 							DocumentationDisplay &
238*cdf0e10cSrcweir 												o_rDisplay ) const;
239*cdf0e10cSrcweir };
240*cdf0e10cSrcweir 
241*cdf0e10cSrcweir class DT_SeeAlsoAtTag : public DT_AtTag
242*cdf0e10cSrcweir {
243*cdf0e10cSrcweir   public:
244*cdf0e10cSrcweir 						DT_SeeAlsoAtTag()		:	DT_AtTag("") {}
245*cdf0e10cSrcweir     virtual             ~DT_SeeAlsoAtTag();
246*cdf0e10cSrcweir 
247*cdf0e10cSrcweir 	virtual void		DisplayAt(
248*cdf0e10cSrcweir 							DocumentationDisplay &
249*cdf0e10cSrcweir 												o_rDisplay ) const;
250*cdf0e10cSrcweir 	const String  &		LinkText() const		{ return sTitle; }	// Missbrauch von sTitle
251*cdf0e10cSrcweir };
252*cdf0e10cSrcweir 
253*cdf0e10cSrcweir class DT_ParameterAtTag : public DT_AtTag
254*cdf0e10cSrcweir {
255*cdf0e10cSrcweir   public:
256*cdf0e10cSrcweir 						DT_ParameterAtTag()		:	DT_AtTag("") {}
257*cdf0e10cSrcweir     virtual             ~DT_ParameterAtTag();
258*cdf0e10cSrcweir 
259*cdf0e10cSrcweir 	void				SetTitle(
260*cdf0e10cSrcweir 		                	const char *		i_sTitle );
261*cdf0e10cSrcweir 	virtual void		DisplayAt(
262*cdf0e10cSrcweir 							DocumentationDisplay &
263*cdf0e10cSrcweir 												o_rDisplay ) const;
264*cdf0e10cSrcweir };
265*cdf0e10cSrcweir 
266*cdf0e10cSrcweir class DT_SinceAtTag : public DT_AtTag
267*cdf0e10cSrcweir {
268*cdf0e10cSrcweir   public:
269*cdf0e10cSrcweir 						DT_SinceAtTag()		:	DT_AtTag("Since version") {}
270*cdf0e10cSrcweir     virtual             ~DT_SinceAtTag();
271*cdf0e10cSrcweir 
272*cdf0e10cSrcweir 	virtual void		DisplayAt(
273*cdf0e10cSrcweir 							DocumentationDisplay &
274*cdf0e10cSrcweir 												o_rDisplay ) const;
275*cdf0e10cSrcweir };
276*cdf0e10cSrcweir 
277*cdf0e10cSrcweir 
278*cdf0e10cSrcweir }   // namespace dsapi
279*cdf0e10cSrcweir }   // namespace csi
280*cdf0e10cSrcweir 
281*cdf0e10cSrcweir #endif
282*cdf0e10cSrcweir 
283