1 /* 2 * Copyright 2006-2012 The FLWOR Foundation. 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 // ****************************************** 18 // * * 19 // * THIS IS A GENERATED FILE. DO NOT EDIT! * 20 // * SEE .xml FILE WITH SAME NAME * 21 // * * 22 // ****************************************** 23 24 25 #ifndef ZORBA_FUNCTIONS_STRINGS_H 26 #define ZORBA_FUNCTIONS_STRINGS_H 27 28 29 #include "common/shared_types.h" 30 #include "functions/function_impl.h" 31 32 33 namespace zorba { 34 35 36 void populate_context_strings(static_context* sctx); 37 38 39 40 41 //fn:codepoints-to-string 42 class fn_codepoints_to_string : public function 43 { 44 public: fn_codepoints_to_string(const signature & sig,FunctionConsts::FunctionKind kind)45 fn_codepoints_to_string(const signature& sig, FunctionConsts::FunctionKind kind) 46 : 47 function(sig, kind) 48 { 49 50 } 51 52 CODEGEN_DECL(); 53 }; 54 55 56 //fn:string-to-codepoints 57 class fn_string_to_codepoints : public function 58 { 59 public: fn_string_to_codepoints(const signature & sig,FunctionConsts::FunctionKind kind)60 fn_string_to_codepoints(const signature& sig, FunctionConsts::FunctionKind kind) 61 : 62 function(sig, kind) 63 { 64 65 } 66 67 CODEGEN_DECL(); 68 }; 69 70 71 //fn:compare 72 class fn_compare : public function 73 { 74 public: fn_compare(const signature & sig,FunctionConsts::FunctionKind kind)75 fn_compare(const signature& sig, FunctionConsts::FunctionKind kind) 76 : 77 function(sig, kind) 78 { 79 80 } 81 82 CODEGEN_DECL(); 83 }; 84 85 86 //fn:codepoint-equal 87 class fn_codepoint_equal : public function 88 { 89 public: fn_codepoint_equal(const signature & sig,FunctionConsts::FunctionKind kind)90 fn_codepoint_equal(const signature& sig, FunctionConsts::FunctionKind kind) 91 : 92 function(sig, kind) 93 { 94 95 } 96 97 CODEGEN_DECL(); 98 }; 99 100 101 //fn:concat 102 class fn_concat : public function 103 { 104 public: fn_concat(const signature & sig,FunctionConsts::FunctionKind kind)105 fn_concat(const signature& sig, FunctionConsts::FunctionKind kind) 106 : 107 function(sig, kind) 108 { 109 110 } 111 112 BoolAnnotationValue ignoresSortedNodes(expr* fo, csize producer) const; 113 114 BoolAnnotationValue ignoresDuplicateNodes(expr* fo, csize producer) const; 115 116 CODEGEN_DECL(); 117 }; 118 119 120 //fn:string-join 121 class fn_string_join_3_0 : public function 122 { 123 public: fn_string_join_3_0(const signature & sig,FunctionConsts::FunctionKind kind)124 fn_string_join_3_0(const signature& sig, FunctionConsts::FunctionKind kind) 125 : 126 function(sig, kind) 127 { 128 theXQueryVersion = StaticContextConsts::xquery_version_3_0; 129 } 130 131 CODEGEN_DECL(); 132 }; 133 134 //fn:string-join 135 class fn_string_join : public function 136 { 137 public: fn_string_join(const signature & sig,FunctionConsts::FunctionKind kind)138 fn_string_join(const signature& sig, FunctionConsts::FunctionKind kind) 139 : 140 function(sig, kind) 141 { 142 143 } 144 145 CODEGEN_DECL(); 146 }; 147 148 149 //fn:substring 150 class fn_substring : public function 151 { 152 public: fn_substring(const signature & sig,FunctionConsts::FunctionKind kind)153 fn_substring(const signature& sig, FunctionConsts::FunctionKind kind) 154 : 155 function(sig, kind) 156 { 157 158 } 159 specializable()160 bool specializable() const { return true; } 161 162 function* specialize( static_context* sctx, 163 const std::vector<xqtref_t>& argTypes) const; 164 165 CODEGEN_DECL(); 166 }; 167 168 169 //op:substring_int 170 class op_substring_int : public function 171 { 172 public: op_substring_int(const signature & sig,FunctionConsts::FunctionKind kind)173 op_substring_int(const signature& sig, FunctionConsts::FunctionKind kind) 174 : 175 function(sig, kind) 176 { 177 178 } 179 180 CODEGEN_DECL(); 181 }; 182 183 184 //fn:string-length 185 class fn_string_length : public function 186 { 187 public: fn_string_length(const signature & sig,FunctionConsts::FunctionKind kind)188 fn_string_length(const signature& sig, FunctionConsts::FunctionKind kind) 189 : 190 function(sig, kind) 191 { 192 193 } 194 195 CODEGEN_DECL(); 196 }; 197 198 199 //fn:normalize-space 200 class fn_normalize_space : public function 201 { 202 public: fn_normalize_space(const signature & sig,FunctionConsts::FunctionKind kind)203 fn_normalize_space(const signature& sig, FunctionConsts::FunctionKind kind) 204 : 205 function(sig, kind) 206 { 207 208 } 209 210 CODEGEN_DECL(); 211 }; 212 213 214 //fn:normalize-unicode 215 class fn_normalize_unicode : public function 216 { 217 public: fn_normalize_unicode(const signature & sig,FunctionConsts::FunctionKind kind)218 fn_normalize_unicode(const signature& sig, FunctionConsts::FunctionKind kind) 219 : 220 function(sig, kind) 221 { 222 223 } 224 225 CODEGEN_DECL(); 226 }; 227 228 229 //fn:upper-case 230 class fn_upper_case : public function 231 { 232 public: fn_upper_case(const signature & sig,FunctionConsts::FunctionKind kind)233 fn_upper_case(const signature& sig, FunctionConsts::FunctionKind kind) 234 : 235 function(sig, kind) 236 { 237 238 } 239 240 CODEGEN_DECL(); 241 }; 242 243 244 //fn:lower-case 245 class fn_lower_case : public function 246 { 247 public: fn_lower_case(const signature & sig,FunctionConsts::FunctionKind kind)248 fn_lower_case(const signature& sig, FunctionConsts::FunctionKind kind) 249 : 250 function(sig, kind) 251 { 252 253 } 254 255 CODEGEN_DECL(); 256 }; 257 258 259 //fn:translate 260 class fn_translate : public function 261 { 262 public: fn_translate(const signature & sig,FunctionConsts::FunctionKind kind)263 fn_translate(const signature& sig, FunctionConsts::FunctionKind kind) 264 : 265 function(sig, kind) 266 { 267 268 } 269 270 CODEGEN_DECL(); 271 }; 272 273 274 //fn:encode-for-uri 275 class fn_encode_for_uri : public function 276 { 277 public: fn_encode_for_uri(const signature & sig,FunctionConsts::FunctionKind kind)278 fn_encode_for_uri(const signature& sig, FunctionConsts::FunctionKind kind) 279 : 280 function(sig, kind) 281 { 282 283 } 284 285 CODEGEN_DECL(); 286 }; 287 288 289 //fn:iri-to-uri 290 class fn_iri_to_uri : public function 291 { 292 public: fn_iri_to_uri(const signature & sig,FunctionConsts::FunctionKind kind)293 fn_iri_to_uri(const signature& sig, FunctionConsts::FunctionKind kind) 294 : 295 function(sig, kind) 296 { 297 298 } 299 300 CODEGEN_DECL(); 301 }; 302 303 304 //fn:escape-html-uri 305 class fn_escape_html_uri : public function 306 { 307 public: fn_escape_html_uri(const signature & sig,FunctionConsts::FunctionKind kind)308 fn_escape_html_uri(const signature& sig, FunctionConsts::FunctionKind kind) 309 : 310 function(sig, kind) 311 { 312 313 } 314 315 CODEGEN_DECL(); 316 }; 317 318 319 //fn:contains 320 class fn_contains : public function 321 { 322 public: fn_contains(const signature & sig,FunctionConsts::FunctionKind kind)323 fn_contains(const signature& sig, FunctionConsts::FunctionKind kind) 324 : 325 function(sig, kind) 326 { 327 328 } 329 330 CODEGEN_DECL(); 331 }; 332 333 334 //fn:starts-with 335 class fn_starts_with : public function 336 { 337 public: fn_starts_with(const signature & sig,FunctionConsts::FunctionKind kind)338 fn_starts_with(const signature& sig, FunctionConsts::FunctionKind kind) 339 : 340 function(sig, kind) 341 { 342 343 } 344 345 CODEGEN_DECL(); 346 }; 347 348 349 //fn:ends-with 350 class fn_ends_with : public function 351 { 352 public: fn_ends_with(const signature & sig,FunctionConsts::FunctionKind kind)353 fn_ends_with(const signature& sig, FunctionConsts::FunctionKind kind) 354 : 355 function(sig, kind) 356 { 357 358 } 359 360 CODEGEN_DECL(); 361 }; 362 363 364 //fn:substring-before 365 class fn_substring_before : public function 366 { 367 public: fn_substring_before(const signature & sig,FunctionConsts::FunctionKind kind)368 fn_substring_before(const signature& sig, FunctionConsts::FunctionKind kind) 369 : 370 function(sig, kind) 371 { 372 373 } 374 375 CODEGEN_DECL(); 376 }; 377 378 379 //fn:substring-after 380 class fn_substring_after : public function 381 { 382 public: fn_substring_after(const signature & sig,FunctionConsts::FunctionKind kind)383 fn_substring_after(const signature& sig, FunctionConsts::FunctionKind kind) 384 : 385 function(sig, kind) 386 { 387 388 } 389 390 CODEGEN_DECL(); 391 }; 392 393 394 //fn:matches 395 class fn_matches : public function 396 { 397 public: fn_matches(const signature & sig,FunctionConsts::FunctionKind kind)398 fn_matches(const signature& sig, FunctionConsts::FunctionKind kind) 399 : 400 function(sig, kind) 401 { 402 403 } 404 405 CODEGEN_DECL(); 406 }; 407 408 409 //fn:replace 410 class fn_replace : public function 411 { 412 public: fn_replace(const signature & sig,FunctionConsts::FunctionKind kind)413 fn_replace(const signature& sig, FunctionConsts::FunctionKind kind) 414 : 415 function(sig, kind) 416 { 417 418 } 419 420 CODEGEN_DECL(); 421 }; 422 423 424 //fn:tokenize 425 class fn_tokenize : public function 426 { 427 public: fn_tokenize(const signature & sig,FunctionConsts::FunctionKind kind)428 fn_tokenize(const signature& sig, FunctionConsts::FunctionKind kind) 429 : 430 function(sig, kind) 431 { 432 433 } 434 435 CODEGEN_DECL(); 436 }; 437 438 439 //fn:analyze-string 440 class fn_analyze_string_3_0 : public function 441 { 442 public: fn_analyze_string_3_0(const signature & sig,FunctionConsts::FunctionKind kind)443 fn_analyze_string_3_0(const signature& sig, FunctionConsts::FunctionKind kind) 444 : 445 function(sig, kind) 446 { 447 theXQueryVersion = StaticContextConsts::xquery_version_3_0; 448 } 449 450 CODEGEN_DECL(); 451 }; 452 453 454 //fn-zorba-string:materialize 455 class fn_zorba_string_materialize : public function 456 { 457 public: fn_zorba_string_materialize(const signature & sig,FunctionConsts::FunctionKind kind)458 fn_zorba_string_materialize(const signature& sig, FunctionConsts::FunctionKind kind) 459 : 460 function(sig, kind) 461 { 462 463 } 464 465 CODEGEN_DECL(); 466 }; 467 468 469 //fn-zorba-string:is-streamable 470 class fn_zorba_string_is_streamable : public function 471 { 472 public: fn_zorba_string_is_streamable(const signature & sig,FunctionConsts::FunctionKind kind)473 fn_zorba_string_is_streamable(const signature& sig, FunctionConsts::FunctionKind kind) 474 : 475 function(sig, kind) 476 { 477 478 } 479 480 CODEGEN_DECL(); 481 }; 482 483 484 //fn-zorba-string:split 485 class fn_zorba_string_split : public function 486 { 487 public: fn_zorba_string_split(const signature & sig,FunctionConsts::FunctionKind kind)488 fn_zorba_string_split(const signature& sig, FunctionConsts::FunctionKind kind) 489 : 490 function(sig, kind) 491 { 492 493 } 494 495 CODEGEN_DECL(); 496 }; 497 498 499 } //namespace zorba 500 501 502 #endif 503 /* 504 * Local variables: 505 * mode: c++ 506 * End: 507 */ 508