Update ooo320-m1
[ooovba.git] / autodoc / source / parser_i / inc / s2_dsapi / cx_docu2.hxx
blob19d7b7805febee7bc0edf0cba9f93ce8a5cc46fa
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: cx_docu2.hxx,v $
10 * $Revision: 1.4 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef DSAPI_CX_DOCU2_HXX
32 #define DSAPI_CX_DOCU2_HXX
34 // USED SERVICES
35 // BASE CLASSES
36 #include <tokens/tkpcont2.hxx>
37 // COMPONENTS
38 // PARAMETERS
39 #include <s2_dsapi/tk_xml.hxx>
41 namespace csi
43 namespace dsapi
46 class Token_Receiver;
49 /**
50 @descr
53 class Cx_Base : public ::TkpContext
55 public:
56 virtual bool PassNewToken();
57 virtual TkpContext &
58 FollowUpContext();
59 protected:
60 // LIFECYCLE
61 Cx_Base(
62 Token_Receiver & o_rReceiver,
63 TkpContext & i_rFollowUpContext )
64 : rReceiver(o_rReceiver),
65 pFollowUpContext(&i_rFollowUpContext)
66 // pNewToken
67 { }
68 protected:
69 void SetToken(
70 DYN Token * let_dpToken )
71 { pNewToken = let_dpToken; }
72 void Handle_DocuSyntaxError(
73 CharacterSource & io_rText );
75 private:
76 // DATA
77 Token_Receiver & rReceiver;
78 TkpContext * pFollowUpContext;
79 Dyn<Token> pNewToken;
83 class Cx_EoHtml : public Cx_Base
85 public:
86 // LIFECYCLE
87 Cx_EoHtml(
88 Token_Receiver & o_rReceiver,
89 TkpContext & i_rFollowUpContext )
90 : Cx_Base(o_rReceiver, i_rFollowUpContext) {}
91 // OPERATIONS
92 virtual void ReadCharChain(
93 CharacterSource & io_rText );
94 void SetIfIsStartOfParagraph(
95 bool i_bNextTokenProperty )
96 { bToken_IsStartOfParagraph = i_bNextTokenProperty; }
98 private:
99 bool bToken_IsStartOfParagraph;
102 class Cx_EoXmlConst : public Cx_Base
104 public:
105 // LIFECYCLE
106 Cx_EoXmlConst(
107 Token_Receiver & o_rReceiver,
108 TkpContext & i_rFollowUpContext )
109 : Cx_Base(o_rReceiver, i_rFollowUpContext) {}
110 // OPERATIONS
111 virtual void ReadCharChain(
112 CharacterSource & io_rText );
113 void SetTokenId(
114 lux::Enum< Tok_XmlConst::E_TokenId >
115 i_eTokenId )
116 { eTokenId = i_eTokenId; }
117 private:
118 Tok_XmlConst::EV_TokenId
119 eTokenId;
122 class Cx_EoXmlLink_BeginTag : public Cx_Base
124 public:
125 // LIFECYCLE
126 Cx_EoXmlLink_BeginTag(
127 Token_Receiver & o_rReceiver,
128 TkpContext & i_rFollowUpContext )
129 : Cx_Base(o_rReceiver, i_rFollowUpContext) {}
130 // OPERATIONS
131 virtual void ReadCharChain(
132 CharacterSource & io_rText );
133 void SetTokenId(
134 Tok_XmlLink_BeginTag::EV_TokenId
135 i_eTokenId )
136 { eTokenId = i_eTokenId; }
137 private:
138 Tok_XmlLink_BeginTag::EV_TokenId
139 eTokenId;
142 class Cx_EoXmlLink_EndTag : public Cx_Base
144 public:
145 // LIFECYCLE
146 Cx_EoXmlLink_EndTag(
147 Token_Receiver & o_rReceiver,
148 TkpContext & i_rFollowUpContext )
149 : Cx_Base(o_rReceiver, i_rFollowUpContext) {}
150 // OPERATIONS
151 virtual void ReadCharChain(
152 CharacterSource & io_rText );
153 void SetTokenId(
154 Tok_XmlLink_EndTag::EV_TokenId
155 i_eTokenId )
156 { eTokenId = i_eTokenId; }
157 private:
158 Tok_XmlLink_EndTag::E_TokenId
159 eTokenId;
162 class Cx_EoXmlFormat_BeginTag : public Cx_Base
164 public:
165 // LIFECYCLE
166 Cx_EoXmlFormat_BeginTag(
167 Token_Receiver & o_rReceiver,
168 TkpContext & i_rFollowUpContext )
169 : Cx_Base(o_rReceiver, i_rFollowUpContext) {}
170 // OPERATIONS
171 virtual void ReadCharChain(
172 CharacterSource & io_rText );
173 void SetTokenId(
174 lux::Enum< Tok_XmlFormat_BeginTag::E_TokenId >
175 i_eTokenId )
176 { eTokenId = i_eTokenId; }
177 private:
178 lux::Enum< Tok_XmlFormat_BeginTag::E_TokenId >
179 eTokenId;
182 class Cx_EoXmlFormat_EndTag : public Cx_Base
184 public:
185 // LIFECYCLE
186 Cx_EoXmlFormat_EndTag(
187 Token_Receiver & o_rReceiver,
188 TkpContext & i_rFollowUpContext )
189 : Cx_Base(o_rReceiver, i_rFollowUpContext) {}
190 // OPERATIONS
191 virtual void ReadCharChain(
192 CharacterSource & io_rText );
193 void SetTokenId(
194 lux::Enum< Tok_XmlFormat_EndTag::E_TokenId >
195 i_eTokenId )
196 { eTokenId = i_eTokenId; }
197 private:
198 lux::Enum< Tok_XmlFormat_EndTag::E_TokenId >
199 eTokenId;
202 class Cx_CheckStar : public Cx_Base
204 public:
205 // LIFECYCLE
206 Cx_CheckStar(
207 Token_Receiver & o_rReceiver,
208 TkpContext & i_rFollowUpContext )
209 : Cx_Base(o_rReceiver, i_rFollowUpContext),
210 bIsEnd(false), bEndTokenFound(false)
212 void Set_End_FolloUpContext(
213 TkpContext & i_rEnd_FollowUpContext )
214 { pEnd_FollowUpContext = &i_rEnd_FollowUpContext; }
216 virtual void ReadCharChain(
217 CharacterSource & io_rText );
218 void SetIsEnd(
219 bool i_bIsEnd )
220 { bIsEnd = i_bIsEnd; }
221 virtual TkpContext &
222 FollowUpContext();
223 private:
224 TkpContext * pEnd_FollowUpContext;
225 bool bIsEnd;
226 bool bEndTokenFound;
230 } // namespace dsapi
231 } // namespace csi
235 #endif