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