1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 28 #ifndef ADC_UIDL_TK_KEYW_HXX 29 #define ADC_UIDL_TK_KEYW_HXX 30 31 // USED SERVICES 32 // BASE CLASSES 33 #include <s2_luidl/uidl_tok.hxx> 34 // COMPONENTS 35 #include <luxenum.hxx> 36 // PARAMETERS 37 38 39 namespace csi 40 { 41 namespace uidl 42 { 43 44 45 class TokKeyword : public Token 46 { 47 }; 48 49 50 class TokBuiltInType : public TokKeyword 51 { 52 public: 53 enum E_TokenId 54 { 55 e_none = 0, 56 bty_any = 1, 57 bty_boolean = 2, 58 bty_byte = 3, 59 bty_char = 4, 60 bty_double = 5, 61 bty_hyper = 6, 62 bty_long = 7, 63 bty_short = 8, 64 bty_string = 9, 65 bty_void = 10, 66 bty_ellipse = 11 67 }; 68 typedef lux::Enum<E_TokenId> EV_TokenId; 69 70 TokBuiltInType( 71 EV_TokenId i_eTag ) 72 : eTag(i_eTag) {} 73 74 virtual void Trigger( 75 TokenInterpreter & io_rInterpreter ) const; 76 virtual const char * 77 Text() const; 78 E_TokenId Id() const { return eTag; } 79 80 private: 81 // DATA 82 EV_TokenId eTag; 83 }; 84 85 86 class TokTypeModifier : public TokKeyword 87 { 88 public: 89 enum E_TokenId 90 { 91 e_none = 0, 92 tmod_unsigned = 1, 93 tmod_sequence 94 }; 95 typedef lux::Enum<E_TokenId> EV_TokenId; 96 97 TokTypeModifier( 98 EV_TokenId i_eTag ) 99 : eTag(i_eTag) {} 100 virtual void Trigger( 101 TokenInterpreter & io_rInterpreter ) const; 102 virtual const char * 103 Text() const; 104 E_TokenId Id() const { return eTag; } 105 106 private: 107 // DATA 108 EV_TokenId eTag; 109 }; 110 111 class TokMetaType : public TokKeyword 112 { 113 public: 114 enum E_TokenId 115 { 116 e_none = 0, 117 mt_attribute = 1, 118 mt_constants, 119 mt_enum, 120 mt_exception, 121 mt_ident, 122 mt_interface, 123 mt_module, 124 mt_property, 125 mt_service, 126 mt_singleton, 127 mt_struct, 128 mt_typedef, 129 mt_uik 130 }; 131 typedef lux::Enum<E_TokenId> EV_TokenId; 132 133 TokMetaType( 134 EV_TokenId i_eTag ) 135 : eTag(i_eTag) {} 136 137 virtual void Trigger( 138 TokenInterpreter & io_rInterpreter ) const; 139 virtual const char * 140 Text() const; 141 E_TokenId Id() const { return eTag; } 142 143 144 private: 145 // DATA 146 EV_TokenId eTag; 147 }; 148 149 class TokStereotype : public TokKeyword 150 { 151 public: 152 // TYPES 153 enum E_TokenId 154 { 155 e_none = 0, 156 ste_bound = 1, 157 ste_const, 158 ste_constrained, 159 ste_maybeambiguous, 160 ste_maybedefault, 161 ste_maybevoid, 162 ste_oneway, 163 ste_optional, 164 ste_readonly, 165 ste_removable, 166 ste_virtual, 167 ste_transient, 168 ste_published 169 }; 170 171 typedef lux::Enum<E_TokenId> EV_TokenId; 172 173 TokStereotype( 174 EV_TokenId i_eTag ) 175 : eTag(i_eTag) {} 176 // OPERATIONS 177 virtual void Trigger( 178 TokenInterpreter & io_rInterpreter ) const; 179 // INQUIRY 180 virtual const char * 181 Text() const; 182 E_TokenId Id() const { return eTag; } 183 184 private: 185 // DATA 186 EV_TokenId eTag; 187 }; 188 189 class TokParameterHandling : public TokKeyword 190 { 191 public: 192 // TYPES 193 enum E_TokenId 194 { 195 e_none = 0, 196 ph_in, 197 ph_out, 198 ph_inout 199 }; 200 typedef lux::Enum<E_TokenId> EV_TokenId; 201 202 TokParameterHandling( 203 EV_TokenId i_eTag ) 204 : eTag(i_eTag) {} 205 // OPERATIONS 206 virtual void Trigger( 207 TokenInterpreter & io_rInterpreter ) const; 208 // INQUIRY 209 virtual const char * 210 Text() const; 211 E_TokenId Id() const { return eTag; } 212 213 private: 214 // DATA 215 EV_TokenId eTag; 216 }; 217 218 class TokRaises : public TokKeyword 219 { 220 public: 221 virtual void Trigger( 222 TokenInterpreter & io_rInterpreter ) const; 223 virtual const char * 224 Text() const; 225 }; 226 227 class TokNeeds : public TokKeyword 228 { 229 public: 230 virtual void Trigger( 231 TokenInterpreter & io_rInterpreter ) const; 232 virtual const char * 233 Text() const; 234 }; 235 236 class TokObserves : public TokKeyword 237 { 238 public: 239 virtual void Trigger( 240 TokenInterpreter & io_rInterpreter ) const; 241 virtual const char * 242 Text() const; 243 }; 244 245 246 } // namespace uidl 247 } // namespace csi 248 249 #endif 250 251 252