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 ADC_UIDL_TK_KEYW_HXX
25 #define ADC_UIDL_TK_KEYW_HXX
26 
27 // USED SERVICES
28 	// BASE CLASSES
29 #include <s2_luidl/uidl_tok.hxx>
30 	// COMPONENTS
31 #include <luxenum.hxx>
32 	// PARAMETERS
33 
34 
35 namespace csi
36 {
37 namespace uidl
38 {
39 
40 
41 class TokKeyword : public Token
42 {
43 };
44 
45 
46 class TokBuiltInType : public TokKeyword
47 {
48   public:
49 	enum E_TokenId
50 	{
51 		e_none = 0,
52 		bty_any = 1,
53 		bty_boolean = 2,
54 		bty_byte = 3,
55 		bty_char = 4,
56 		bty_double = 5,
57 		bty_hyper = 6,
58 		bty_long = 7,
59 		bty_short = 8,
60 		bty_string = 9,
61 		bty_void = 10,
62 		bty_ellipse = 11
63 	};
64 	typedef lux::Enum<E_TokenId> EV_TokenId;
65 
TokBuiltInType(EV_TokenId i_eTag)66 						TokBuiltInType(
67 							EV_TokenId			i_eTag )
68 												:	eTag(i_eTag) {}
69 
70 	virtual void       	Trigger(
71 							TokenInterpreter &	io_rInterpreter ) const;
72 	virtual const char *
73 						Text() const;
Id() const74     E_TokenId			Id() const				{ return eTag; }
75 
76   private:
77 	// DATA
78 	EV_TokenId   		eTag;
79 };
80 
81 
82 class TokTypeModifier : public TokKeyword
83 {
84   public:
85 	enum E_TokenId
86 	{
87 		e_none = 0,
88 		tmod_unsigned = 1,
89 		tmod_sequence
90 	};
91 	typedef lux::Enum<E_TokenId> EV_TokenId;
92 
TokTypeModifier(EV_TokenId i_eTag)93 						TokTypeModifier(
94 							EV_TokenId			i_eTag )
95 												:	eTag(i_eTag) {}
96 	virtual void		Trigger(
97 							TokenInterpreter &	io_rInterpreter ) const;
98 	virtual const char *
99 						Text() const;
Id() const100     E_TokenId			Id() const				{ return eTag; }
101 
102   private:
103 	// DATA
104 	EV_TokenId   		eTag;
105 };
106 
107 class TokMetaType : public TokKeyword
108 {
109   public:
110 	enum E_TokenId
111 	{
112 		e_none = 0,
113 		mt_attribute = 1,
114 		mt_constants,
115 		mt_enum,
116 		mt_exception,
117 		mt_ident,
118 		mt_interface,
119 		mt_module,
120 		mt_property,
121 		mt_service,
122 		mt_singleton,
123 		mt_struct,
124 		mt_typedef,
125 		mt_uik
126 	};
127 	typedef lux::Enum<E_TokenId> EV_TokenId;
128 
TokMetaType(EV_TokenId i_eTag)129 						TokMetaType(
130 							EV_TokenId			i_eTag )
131 												:	eTag(i_eTag) {}
132 
133 	virtual void		Trigger(
134 							TokenInterpreter &	io_rInterpreter ) const;
135 	virtual const char *
136 						Text() const;
Id() const137 	E_TokenId			Id() const				{ return eTag; }
138 
139 
140   private:
141 	// DATA
142 	EV_TokenId   		eTag;
143 };
144 
145 class TokStereotype : public TokKeyword
146 {
147   public:
148 	// TYPES
149 	enum E_TokenId
150 	{
151 		e_none = 0,
152         ste_bound = 1,
153 		ste_const,
154 		ste_constrained,
155 		ste_maybeambiguous,
156 		ste_maybedefault,
157 		ste_maybevoid,
158 		ste_oneway,
159 		ste_optional,
160 		ste_readonly,
161 		ste_removable,
162 		ste_virtual,
163 		ste_transient,
164 		ste_published
165 	};
166 
167 	typedef lux::Enum<E_TokenId> EV_TokenId;
168 
TokStereotype(EV_TokenId i_eTag)169 						TokStereotype(
170 							EV_TokenId			i_eTag )
171 												:	eTag(i_eTag) {}
172 	// OPERATIONS
173 	virtual void		Trigger(
174 							TokenInterpreter &	io_rInterpreter ) const;
175 	// INQUIRY
176 	virtual const char *
177 						Text() const;
Id() const178 	E_TokenId			Id() const				{ return eTag; }
179 
180   private:
181 	// DATA
182 	EV_TokenId   		eTag;
183 };
184 
185 class TokParameterHandling : public TokKeyword
186 {
187   public:
188 	// TYPES
189 	enum E_TokenId
190 	{
191 		e_none = 0,
192 		ph_in,
193 		ph_out,
194 		ph_inout
195 	};
196 	typedef lux::Enum<E_TokenId> EV_TokenId;
197 
TokParameterHandling(EV_TokenId i_eTag)198 						TokParameterHandling(
199 							EV_TokenId			i_eTag )
200 												:	eTag(i_eTag) {}
201 	// OPERATIONS
202 	virtual void		Trigger(
203 							TokenInterpreter &	io_rInterpreter ) const;
204 	// INQUIRY
205 	virtual const char *
206 						Text() const;
Id() const207 	E_TokenId			Id() const				{ return eTag; }
208 
209   private:
210 	// DATA
211 	EV_TokenId   		eTag;
212 };
213 
214 class TokRaises : public TokKeyword
215 {
216   public:
217 	virtual void		Trigger(
218 							TokenInterpreter &	io_rInterpreter ) const;
219 	virtual const char *
220 						Text() const;
221 };
222 
223 class TokNeeds : public TokKeyword
224 {
225   public:
226 	virtual void		Trigger(
227 							TokenInterpreter &	io_rInterpreter ) const;
228 	virtual const char *
229 						Text() const;
230 };
231 
232 class TokObserves : public TokKeyword
233 {
234   public:
235 	virtual void		Trigger(
236 							TokenInterpreter &	io_rInterpreter ) const;
237 	virtual const char *
238 						Text() const;
239 };
240 
241 
242 }   // namespace uidl
243 }   // namespace csi
244 
245 #endif
246 
247 
248