xref: /AOO41X/main/autodoc/source/parser_i/inc/s2_dsapi/docu_pe2.hxx (revision 4f7d22dccf62f39e9c107554ce5ca1110e8261fb)
11c78a5d6SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
31c78a5d6SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
41c78a5d6SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
51c78a5d6SAndrew Rist  * distributed with this work for additional information
61c78a5d6SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
71c78a5d6SAndrew Rist  * to you under the Apache License, Version 2.0 (the
81c78a5d6SAndrew Rist  * "License"); you may not use this file except in compliance
91c78a5d6SAndrew Rist  * with the License.  You may obtain a copy of the License at
10cdf0e10cSrcweir  *
111c78a5d6SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12cdf0e10cSrcweir  *
131c78a5d6SAndrew Rist  * Unless required by applicable law or agreed to in writing,
141c78a5d6SAndrew Rist  * software distributed under the License is distributed on an
151c78a5d6SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
161c78a5d6SAndrew Rist  * KIND, either express or implied.  See the License for the
171c78a5d6SAndrew Rist  * specific language governing permissions and limitations
181c78a5d6SAndrew Rist  * under the License.
19cdf0e10cSrcweir  *
201c78a5d6SAndrew Rist  *************************************************************/
211c78a5d6SAndrew Rist 
221c78a5d6SAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir #ifndef ADC_DSAPI_DOCU_PE2_HXX
25cdf0e10cSrcweir #define ADC_DSAPI_DOCU_PE2_HXX
26cdf0e10cSrcweir 
27cdf0e10cSrcweir 
28cdf0e10cSrcweir 
29cdf0e10cSrcweir // USED SERVICES
30cdf0e10cSrcweir 	// BASE CLASSES
31cdf0e10cSrcweir #include <s2_dsapi/tokintpr.hxx>
32cdf0e10cSrcweir 	// COMPONENTS
33cdf0e10cSrcweir 	// PARAMETERS
34cdf0e10cSrcweir 
35cdf0e10cSrcweir class ParserInfo;
36cdf0e10cSrcweir 
37cdf0e10cSrcweir namespace ary
38cdf0e10cSrcweir {
39cdf0e10cSrcweir namespace doc
40cdf0e10cSrcweir {
41cdf0e10cSrcweir     class OldIdlDocu;
42cdf0e10cSrcweir }
43cdf0e10cSrcweir 
44cdf0e10cSrcweir namespace inf
45cdf0e10cSrcweir {
46cdf0e10cSrcweir     class DocuToken;
47cdf0e10cSrcweir }   // namespace info
48cdf0e10cSrcweir }   // namespace ary
49cdf0e10cSrcweir 
50cdf0e10cSrcweir 
51cdf0e10cSrcweir 
52cdf0e10cSrcweir namespace csi
53cdf0e10cSrcweir {
54cdf0e10cSrcweir namespace dsapi
55cdf0e10cSrcweir {
56cdf0e10cSrcweir 
57cdf0e10cSrcweir 
58cdf0e10cSrcweir class Token;
59cdf0e10cSrcweir class DT_AtTag;
60cdf0e10cSrcweir 
61cdf0e10cSrcweir class SapiDocu_PE : public TokenInterpreter
62cdf0e10cSrcweir {
63cdf0e10cSrcweir   public:
64cdf0e10cSrcweir 						SapiDocu_PE(
65cdf0e10cSrcweir 						    ParserInfo &        io_rPositionInfo );
66cdf0e10cSrcweir 						~SapiDocu_PE();
67cdf0e10cSrcweir 
68cdf0e10cSrcweir 	void				ProcessToken(
69cdf0e10cSrcweir 							DYN csi::dsapi::Token &
70cdf0e10cSrcweir 												let_drToken );
71cdf0e10cSrcweir 
72cdf0e10cSrcweir 	virtual void		Process_AtTag(
73cdf0e10cSrcweir 							const Tok_AtTag &	i_rToken );
74cdf0e10cSrcweir 	virtual void		Process_HtmlTag(
75cdf0e10cSrcweir 							const Tok_HtmlTag &	i_rToken );
76cdf0e10cSrcweir 	virtual void		Process_XmlConst(
77cdf0e10cSrcweir 							const Tok_XmlConst &
78cdf0e10cSrcweir 												i_rToken );
79cdf0e10cSrcweir 	virtual void		Process_XmlLink_BeginTag(
80cdf0e10cSrcweir 							const Tok_XmlLink_BeginTag &
81cdf0e10cSrcweir 												i_rToken );
82cdf0e10cSrcweir 	virtual void		Process_XmlLink_EndTag(
83cdf0e10cSrcweir 							const Tok_XmlLink_EndTag &
84cdf0e10cSrcweir 												i_rToken );
85cdf0e10cSrcweir 	virtual void		Process_XmlFormat_BeginTag(
86cdf0e10cSrcweir 							const Tok_XmlFormat_BeginTag &
87cdf0e10cSrcweir 												i_rToken );
88cdf0e10cSrcweir 	virtual void		Process_XmlFormat_EndTag(
89cdf0e10cSrcweir 							const Tok_XmlFormat_EndTag &
90cdf0e10cSrcweir 												i_rToken );
91cdf0e10cSrcweir 	virtual void		Process_Word(
92cdf0e10cSrcweir 							const Tok_Word &	i_rToken );
93cdf0e10cSrcweir 	virtual void		Process_Comma();
94cdf0e10cSrcweir 	virtual void		Process_DocuEnd();
95cdf0e10cSrcweir 	virtual void		Process_EOL();
96cdf0e10cSrcweir 	virtual void		Process_White();
97cdf0e10cSrcweir 
98cdf0e10cSrcweir 
99cdf0e10cSrcweir 	DYN ary::doc::OldIdlDocu *
100cdf0e10cSrcweir 							ReleaseJustParsedDocu();
101cdf0e10cSrcweir 
102cdf0e10cSrcweir 	bool				IsComplete() const;
103cdf0e10cSrcweir 
104cdf0e10cSrcweir   private:
105cdf0e10cSrcweir 	enum E_State
106cdf0e10cSrcweir 	{
107cdf0e10cSrcweir 		e_none = 0,
108cdf0e10cSrcweir 		st_short,
109cdf0e10cSrcweir 		st_description,
110cdf0e10cSrcweir 		st_attags,
111cdf0e10cSrcweir 		st_complete
112cdf0e10cSrcweir 	};
113cdf0e10cSrcweir 
114cdf0e10cSrcweir 	typedef void ( SapiDocu_PE::*F_TokenAdder )( DYN ary::inf::DocuToken & let_drNewToken );
115cdf0e10cSrcweir 
116cdf0e10cSrcweir 	void				AddDocuToken2Void(
117cdf0e10cSrcweir 							DYN ary::inf::DocuToken &
118cdf0e10cSrcweir 												let_drNewToken );
119cdf0e10cSrcweir 	void				AddDocuToken2Short(
120cdf0e10cSrcweir 							DYN ary::inf::DocuToken &
121cdf0e10cSrcweir 												let_drNewToken );
122cdf0e10cSrcweir 	void				AddDocuToken2Description(
123cdf0e10cSrcweir 							DYN ary::inf::DocuToken &
124cdf0e10cSrcweir 												let_drNewToken );
125cdf0e10cSrcweir 	void				AddDocuToken2Deprecated(
126cdf0e10cSrcweir 							DYN ary::inf::DocuToken &
127cdf0e10cSrcweir 												let_drNewToken );
128cdf0e10cSrcweir 	void				AddDocuToken2CurAtTag(
129cdf0e10cSrcweir 							DYN ary::inf::DocuToken &
130cdf0e10cSrcweir 												let_drNewToken );
131cdf0e10cSrcweir 	void				SetCurParameterAtTagName(
132cdf0e10cSrcweir 							DYN ary::inf::DocuToken &
133cdf0e10cSrcweir 												let_drNewToken );
134cdf0e10cSrcweir 	void				SetCurSeeAlsoAtTagLinkText(
135cdf0e10cSrcweir 							DYN ary::inf::DocuToken &
136cdf0e10cSrcweir 												let_drNewToken );
137cdf0e10cSrcweir 	void				SetCurSeeAlsoAtTagLinkText_2(
138cdf0e10cSrcweir 							DYN ary::inf::DocuToken &
139cdf0e10cSrcweir 												let_drNewToken );
140cdf0e10cSrcweir 	void				SetCurSeeAlsoAtTagLinkText_3(
141cdf0e10cSrcweir 							DYN ary::inf::DocuToken &
142cdf0e10cSrcweir 												let_drNewToken );
143cdf0e10cSrcweir 	void				SetCurSinceAtTagVersion_OOo(
144cdf0e10cSrcweir 							DYN ary::inf::DocuToken &
145cdf0e10cSrcweir 												let_drNewToken );
146*4f7d22dcSAriel Constenla-Haile     void                SetCurSinceAtTagVersion_AOO(
147*4f7d22dcSAriel Constenla-Haile                             DYN ary::inf::DocuToken &
148*4f7d22dcSAriel Constenla-Haile                                                 let_drNewToken );
149cdf0e10cSrcweir 	void				SetCurSinceAtTagVersion_Number(
150cdf0e10cSrcweir 							DYN ary::inf::DocuToken &
151cdf0e10cSrcweir 												let_drNewToken );
152cdf0e10cSrcweir 	void				AddDocuToken2SinceAtTag(
153cdf0e10cSrcweir 							DYN ary::inf::DocuToken &
154cdf0e10cSrcweir 												let_drNewToken );
155cdf0e10cSrcweir 
156cdf0e10cSrcweir 	bool				CheckVersionSyntax_OOo(
157cdf0e10cSrcweir                             const String &      i_versionPart1 );
158cdf0e10cSrcweir 	bool				CheckVersionSyntax_Number(
159cdf0e10cSrcweir                             const String &      i_versionPart2 );
160cdf0e10cSrcweir 	// DATA
161cdf0e10cSrcweir 	Dyn<ary::doc::OldIdlDocu>
162cdf0e10cSrcweir 						pDocu;
163cdf0e10cSrcweir 	E_State				eState;
164cdf0e10cSrcweir 	ParserInfo *        pPositionInfo;
165cdf0e10cSrcweir 	F_TokenAdder		fCurTokenAddFunction;
166cdf0e10cSrcweir 
167cdf0e10cSrcweir 	Dyn<DT_AtTag>	    pCurAtTag;
168cdf0e10cSrcweir     String              sCurDimAttribute;
169cdf0e10cSrcweir     StreamStr           sCurAtSeeType_byXML;
170cdf0e10cSrcweir };
171cdf0e10cSrcweir 
172cdf0e10cSrcweir }   // namespace dsapi
173cdf0e10cSrcweir }   // namespace csi
174cdf0e10cSrcweir 
175cdf0e10cSrcweir 
176cdf0e10cSrcweir // IMPLEMENTATION
177cdf0e10cSrcweir 
178cdf0e10cSrcweir 
179cdf0e10cSrcweir #endif
180cdf0e10cSrcweir 
181