xref: /AOO41X/main/autodoc/source/parser_i/inc/s2_dsapi/tk_xml.hxx (revision 1c78a5d6c0093dece4c096ba53051800fbad6e33)
1*1c78a5d6SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*1c78a5d6SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*1c78a5d6SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*1c78a5d6SAndrew Rist  * distributed with this work for additional information
6*1c78a5d6SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*1c78a5d6SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*1c78a5d6SAndrew Rist  * "License"); you may not use this file except in compliance
9*1c78a5d6SAndrew Rist  * with the License.  You may obtain a copy of the License at
10cdf0e10cSrcweir  *
11*1c78a5d6SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12cdf0e10cSrcweir  *
13*1c78a5d6SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*1c78a5d6SAndrew Rist  * software distributed under the License is distributed on an
15*1c78a5d6SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*1c78a5d6SAndrew Rist  * KIND, either express or implied.  See the License for the
17*1c78a5d6SAndrew Rist  * specific language governing permissions and limitations
18*1c78a5d6SAndrew Rist  * under the License.
19cdf0e10cSrcweir  *
20*1c78a5d6SAndrew Rist  *************************************************************/
21*1c78a5d6SAndrew Rist 
22*1c78a5d6SAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir #ifndef DSAPI_TK_XML_HXX
25cdf0e10cSrcweir #define DSAPI_TK_XML_HXX
26cdf0e10cSrcweir 
27cdf0e10cSrcweir // USED SERVICES
28cdf0e10cSrcweir 	// BASE CLASSES
29cdf0e10cSrcweir #include <s2_dsapi/dsapitok.hxx>
30cdf0e10cSrcweir 	// COMPONENTS
31cdf0e10cSrcweir 	// PARAMETERS
32cdf0e10cSrcweir #include <luxenum.hxx>
33cdf0e10cSrcweir 
34cdf0e10cSrcweir 
35cdf0e10cSrcweir namespace csi
36cdf0e10cSrcweir {
37cdf0e10cSrcweir namespace dsapi
38cdf0e10cSrcweir {
39cdf0e10cSrcweir 
40cdf0e10cSrcweir 
41cdf0e10cSrcweir class Tok_XmlTag : public Token
42cdf0e10cSrcweir {
43cdf0e10cSrcweir   public:
44cdf0e10cSrcweir };
45cdf0e10cSrcweir 
46cdf0e10cSrcweir class Tok_XmlConst : public Tok_XmlTag
47cdf0e10cSrcweir {
48cdf0e10cSrcweir   public:
49cdf0e10cSrcweir 	// TYPE
50cdf0e10cSrcweir 	enum  E_TokenId
51cdf0e10cSrcweir 	{
52cdf0e10cSrcweir 		e_none = 0,
53cdf0e10cSrcweir 		e_true = 1,
54cdf0e10cSrcweir 		e_false = 2,
55cdf0e10cSrcweir 		e_null = 3,
56cdf0e10cSrcweir 		e_void = 4
57cdf0e10cSrcweir 	};
58cdf0e10cSrcweir 	typedef lux::Enum<E_TokenId> EV_TokenId;
59cdf0e10cSrcweir 
60cdf0e10cSrcweir 	// Spring and Fall
Tok_XmlConst(EV_TokenId i_eTag)61cdf0e10cSrcweir 						Tok_XmlConst(
62cdf0e10cSrcweir 							EV_TokenId			i_eTag )
63cdf0e10cSrcweir 												:	eTag(i_eTag) {}
64cdf0e10cSrcweir 	// OPERATIONS
65cdf0e10cSrcweir 	virtual void		Trigger(
66cdf0e10cSrcweir 							TokenInterpreter &	io_rInterpreter ) const;
67cdf0e10cSrcweir 	// INQUIRY
68cdf0e10cSrcweir 	virtual const char*	Text() const;
Id() const69cdf0e10cSrcweir 	E_TokenId			Id() const				{ return eTag; }
70cdf0e10cSrcweir 
71cdf0e10cSrcweir   private:
72cdf0e10cSrcweir 	// DATA
73cdf0e10cSrcweir 	EV_TokenId			eTag;
74cdf0e10cSrcweir };
75cdf0e10cSrcweir 
76cdf0e10cSrcweir class Tok_XmlLink_Tag : public Tok_XmlTag
77cdf0e10cSrcweir {
78cdf0e10cSrcweir   public:
79cdf0e10cSrcweir 	// TYPE
80cdf0e10cSrcweir 	enum E_TokenId
81cdf0e10cSrcweir 	{
82cdf0e10cSrcweir 		e_none = 0,
83cdf0e10cSrcweir 		e_const = 1,
84cdf0e10cSrcweir 		member = 2,
85cdf0e10cSrcweir 		type = 3
86cdf0e10cSrcweir 	};
87cdf0e10cSrcweir 	typedef lux::Enum<E_TokenId> EV_TokenId;
88cdf0e10cSrcweir };
89cdf0e10cSrcweir 
90cdf0e10cSrcweir class Tok_XmlLink_BeginTag : public Tok_XmlLink_Tag
91cdf0e10cSrcweir {
92cdf0e10cSrcweir   public:
93cdf0e10cSrcweir 	// Spring and Fall
Tok_XmlLink_BeginTag(EV_TokenId i_eTag,const String & i_sScope,const String & i_sDim)94cdf0e10cSrcweir 						Tok_XmlLink_BeginTag(
95cdf0e10cSrcweir 							EV_TokenId			i_eTag,
96cdf0e10cSrcweir 							const String  &		i_sScope,
97cdf0e10cSrcweir                             const String  &		i_sDim )
98cdf0e10cSrcweir 												:	eTag(i_eTag),
99cdf0e10cSrcweir 													sScope(i_sScope),
100cdf0e10cSrcweir 													sDim(i_sDim) {}
101cdf0e10cSrcweir 	// OPERATIONS
102cdf0e10cSrcweir 	virtual void		Trigger(
103cdf0e10cSrcweir 							TokenInterpreter &	io_rInterpreter ) const;
104cdf0e10cSrcweir 	// INQUIRY
105cdf0e10cSrcweir 	virtual const char*	Text() const;
Id() const106cdf0e10cSrcweir 	E_TokenId			Id() const				{ return eTag; }
Scope() const107cdf0e10cSrcweir 	const String  &		Scope() const			{ return sScope; }
Dim() const108cdf0e10cSrcweir 	const String  &		Dim() const			    { return sDim; }
109cdf0e10cSrcweir 
110cdf0e10cSrcweir   private:
111cdf0e10cSrcweir 	// DATA
112cdf0e10cSrcweir 	EV_TokenId			eTag;
113cdf0e10cSrcweir 	String 				sScope;
114cdf0e10cSrcweir 	String 				sDim;
115cdf0e10cSrcweir };
116cdf0e10cSrcweir 
117cdf0e10cSrcweir class Tok_XmlLink_EndTag : public Tok_XmlLink_Tag
118cdf0e10cSrcweir {
119cdf0e10cSrcweir   public:
120cdf0e10cSrcweir 	// Spring and Fall
Tok_XmlLink_EndTag(EV_TokenId i_eTag)121cdf0e10cSrcweir 						Tok_XmlLink_EndTag(
122cdf0e10cSrcweir 							EV_TokenId			i_eTag )
123cdf0e10cSrcweir 												:	eTag(i_eTag) {}
124cdf0e10cSrcweir 	// OPERATIONS
125cdf0e10cSrcweir 	virtual void		Trigger(
126cdf0e10cSrcweir 							TokenInterpreter &	io_rInterpreter ) const;
127cdf0e10cSrcweir 	// INQUIRY
128cdf0e10cSrcweir 	virtual const char*	Text() const;
Id() const129cdf0e10cSrcweir 	E_TokenId			Id() const				{ return eTag; }
130cdf0e10cSrcweir 
131cdf0e10cSrcweir   private:
132cdf0e10cSrcweir 	// DATA
133cdf0e10cSrcweir 	EV_TokenId			eTag;
134cdf0e10cSrcweir };
135cdf0e10cSrcweir 
136cdf0e10cSrcweir class Tok_XmlFormat_Tag : public Tok_XmlTag
137cdf0e10cSrcweir {
138cdf0e10cSrcweir   public:
139cdf0e10cSrcweir 	// TYPE
140cdf0e10cSrcweir 	enum E_TokenId
141cdf0e10cSrcweir 	{
142cdf0e10cSrcweir 		e_none = 0,
143cdf0e10cSrcweir 		code = 1,
144cdf0e10cSrcweir 		listing = 2,
145cdf0e10cSrcweir         atom = 3
146cdf0e10cSrcweir 	};
147cdf0e10cSrcweir 	typedef lux::Enum<E_TokenId> EV_TokenId;
148cdf0e10cSrcweir };
149cdf0e10cSrcweir 
150cdf0e10cSrcweir class Tok_XmlFormat_BeginTag : public Tok_XmlFormat_Tag
151cdf0e10cSrcweir {
152cdf0e10cSrcweir   public:
153cdf0e10cSrcweir 	// Spring and Fall
Tok_XmlFormat_BeginTag(EV_TokenId i_eTag,const String & i_sDim)154cdf0e10cSrcweir 						Tok_XmlFormat_BeginTag(
155cdf0e10cSrcweir 							EV_TokenId			i_eTag,
156cdf0e10cSrcweir                             const String  &     i_sDim )
157cdf0e10cSrcweir 												:	eTag(i_eTag),
158cdf0e10cSrcweir                                                     sDim(i_sDim) {}
159cdf0e10cSrcweir 	// OPERATIONS
160cdf0e10cSrcweir 	virtual void		Trigger(
161cdf0e10cSrcweir 							TokenInterpreter &	io_rInterpreter ) const;
162cdf0e10cSrcweir 	// INQUIRY
163cdf0e10cSrcweir 	virtual const char*	Text() const;
Id() const164cdf0e10cSrcweir 	E_TokenId			Id() const				{ return eTag; }
Dim() const165cdf0e10cSrcweir 	const String  &		Dim() const			    { return sDim; }
166cdf0e10cSrcweir 
167cdf0e10cSrcweir   private:
168cdf0e10cSrcweir 	// DATA
169cdf0e10cSrcweir 	EV_TokenId			eTag;
170cdf0e10cSrcweir     String              sDim;
171cdf0e10cSrcweir };
172cdf0e10cSrcweir 
173cdf0e10cSrcweir class Tok_XmlFormat_EndTag : public Tok_XmlFormat_Tag
174cdf0e10cSrcweir {
175cdf0e10cSrcweir   public:
176cdf0e10cSrcweir 	// Spring and Fall
Tok_XmlFormat_EndTag(EV_TokenId i_eTag)177cdf0e10cSrcweir 						Tok_XmlFormat_EndTag(
178cdf0e10cSrcweir 							EV_TokenId			i_eTag )
179cdf0e10cSrcweir 												:	eTag(i_eTag) {}
180cdf0e10cSrcweir 	// OPERATIONS
181cdf0e10cSrcweir 	virtual void		Trigger(
182cdf0e10cSrcweir 							TokenInterpreter &	io_rInterpreter ) const;
183cdf0e10cSrcweir 	// INQUIRY
184cdf0e10cSrcweir 	virtual const char*	Text() const;
Id() const185cdf0e10cSrcweir 	E_TokenId			Id() const				{ return eTag; }
186cdf0e10cSrcweir 
187cdf0e10cSrcweir   private:
188cdf0e10cSrcweir 	// DATA
189cdf0e10cSrcweir 	EV_TokenId			eTag;
190cdf0e10cSrcweir };
191cdf0e10cSrcweir 
192cdf0e10cSrcweir 
193cdf0e10cSrcweir }   // namespace dsapi
194cdf0e10cSrcweir }   // namespace csi
195cdf0e10cSrcweir 
196cdf0e10cSrcweir #endif
197cdf0e10cSrcweir 
198