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 #ifndef ZORBA_RUNTIME_INTROSPECTION_SCTX_H 24 #define ZORBA_RUNTIME_INTROSPECTION_SCTX_H 25 26 27 #include "common/shared_types.h" 28 29 30 31 #include "runtime/base/narybase.h" 32 #include "context/static_context.h" 33 34 35 namespace zorba { 36 37 /** 38 * 39 * sc:statically-known-namespaces 40 * 41 * Author: Zorba Team 42 */ 43 class StaticNamespacesIteratorState : public PlanIteratorState 44 { 45 public: 46 store::NsBindings theBindings; //vector of namespace bindings 47 ulong thePosition; //current position 48 49 StaticNamespacesIteratorState(); 50 51 ~StaticNamespacesIteratorState(); 52 53 void init(PlanState&); 54 void reset(PlanState&); 55 }; 56 57 class StaticNamespacesIterator : public NaryBaseIterator<StaticNamespacesIterator, StaticNamespacesIteratorState> 58 { 59 public: 60 SERIALIZABLE_CLASS(StaticNamespacesIterator); 61 62 SERIALIZABLE_CLASS_CONSTRUCTOR2T(StaticNamespacesIterator, 63 NaryBaseIterator<StaticNamespacesIterator, StaticNamespacesIteratorState>); 64 65 void serialize( ::zorba::serialization::Archiver& ar); 66 StaticNamespacesIterator(static_context * sctx,const QueryLoc & loc,std::vector<PlanIter_t> & children)67 StaticNamespacesIterator( 68 static_context* sctx, 69 const QueryLoc& loc, 70 std::vector<PlanIter_t>& children) 71 : 72 NaryBaseIterator<StaticNamespacesIterator, StaticNamespacesIteratorState>(sctx, loc, children) 73 {} 74 75 virtual ~StaticNamespacesIterator(); 76 77 void accept(PlanIterVisitor& v) const; 78 79 bool nextImpl(store::Item_t& result, PlanState& aPlanState) const; 80 }; 81 82 83 /** 84 * 85 * sc:default-function-namespace 86 * 87 * Author: Zorba Team 88 */ 89 class DefaultFunctionNamespaceIterator : public NaryBaseIterator<DefaultFunctionNamespaceIterator, PlanIteratorState> 90 { 91 public: 92 SERIALIZABLE_CLASS(DefaultFunctionNamespaceIterator); 93 94 SERIALIZABLE_CLASS_CONSTRUCTOR2T(DefaultFunctionNamespaceIterator, 95 NaryBaseIterator<DefaultFunctionNamespaceIterator, PlanIteratorState>); 96 97 void serialize( ::zorba::serialization::Archiver& ar); 98 DefaultFunctionNamespaceIterator(static_context * sctx,const QueryLoc & loc,std::vector<PlanIter_t> & children)99 DefaultFunctionNamespaceIterator( 100 static_context* sctx, 101 const QueryLoc& loc, 102 std::vector<PlanIter_t>& children) 103 : 104 NaryBaseIterator<DefaultFunctionNamespaceIterator, PlanIteratorState>(sctx, loc, children) 105 {} 106 107 virtual ~DefaultFunctionNamespaceIterator(); 108 109 void accept(PlanIterVisitor& v) const; 110 111 bool nextImpl(store::Item_t& result, PlanState& aPlanState) const; 112 }; 113 114 115 /** 116 * 117 * sc:base-uri 118 * 119 * Author: Zorba Team 120 */ 121 class SctxBaseUriIterator : public NaryBaseIterator<SctxBaseUriIterator, PlanIteratorState> 122 { 123 public: 124 SERIALIZABLE_CLASS(SctxBaseUriIterator); 125 126 SERIALIZABLE_CLASS_CONSTRUCTOR2T(SctxBaseUriIterator, 127 NaryBaseIterator<SctxBaseUriIterator, PlanIteratorState>); 128 129 void serialize( ::zorba::serialization::Archiver& ar); 130 SctxBaseUriIterator(static_context * sctx,const QueryLoc & loc,std::vector<PlanIter_t> & children)131 SctxBaseUriIterator( 132 static_context* sctx, 133 const QueryLoc& loc, 134 std::vector<PlanIter_t>& children) 135 : 136 NaryBaseIterator<SctxBaseUriIterator, PlanIteratorState>(sctx, loc, children) 137 {} 138 139 virtual ~SctxBaseUriIterator(); 140 141 void accept(PlanIterVisitor& v) const; 142 143 bool nextImpl(store::Item_t& result, PlanState& aPlanState) const; 144 }; 145 146 147 /** 148 * 149 * sc:default-collation 150 * 151 * Author: Zorba Team 152 */ 153 class SctxDefaultCollationIterator : public NaryBaseIterator<SctxDefaultCollationIterator, PlanIteratorState> 154 { 155 public: 156 SERIALIZABLE_CLASS(SctxDefaultCollationIterator); 157 158 SERIALIZABLE_CLASS_CONSTRUCTOR2T(SctxDefaultCollationIterator, 159 NaryBaseIterator<SctxDefaultCollationIterator, PlanIteratorState>); 160 161 void serialize( ::zorba::serialization::Archiver& ar); 162 SctxDefaultCollationIterator(static_context * sctx,const QueryLoc & loc,std::vector<PlanIter_t> & children)163 SctxDefaultCollationIterator( 164 static_context* sctx, 165 const QueryLoc& loc, 166 std::vector<PlanIter_t>& children) 167 : 168 NaryBaseIterator<SctxDefaultCollationIterator, PlanIteratorState>(sctx, loc, children) 169 {} 170 171 virtual ~SctxDefaultCollationIterator(); 172 173 void accept(PlanIterVisitor& v) const; 174 175 bool nextImpl(store::Item_t& result, PlanState& aPlanState) const; 176 }; 177 178 179 /** 180 * 181 * sc:statically-known-namespace-binding 182 * 183 * Author: Zorba Team 184 */ 185 class StaticNamespaceBindingIterator : public NaryBaseIterator<StaticNamespaceBindingIterator, PlanIteratorState> 186 { 187 public: 188 SERIALIZABLE_CLASS(StaticNamespaceBindingIterator); 189 190 SERIALIZABLE_CLASS_CONSTRUCTOR2T(StaticNamespaceBindingIterator, 191 NaryBaseIterator<StaticNamespaceBindingIterator, PlanIteratorState>); 192 193 void serialize( ::zorba::serialization::Archiver& ar); 194 StaticNamespaceBindingIterator(static_context * sctx,const QueryLoc & loc,std::vector<PlanIter_t> & children)195 StaticNamespaceBindingIterator( 196 static_context* sctx, 197 const QueryLoc& loc, 198 std::vector<PlanIter_t>& children) 199 : 200 NaryBaseIterator<StaticNamespaceBindingIterator, PlanIteratorState>(sctx, loc, children) 201 {} 202 203 virtual ~StaticNamespaceBindingIterator(); 204 205 void accept(PlanIterVisitor& v) const; 206 207 bool nextImpl(store::Item_t& result, PlanState& aPlanState) const; 208 }; 209 210 211 /** 212 * 213 * sc:in-scope-variables 214 * 215 * Author: Zorba Team 216 */ 217 class InscopeVariablesIteratorState : public PlanIteratorState 218 { 219 public: 220 std::vector<VarInfo*> theVariables; //vector of variables 221 csize thePosition; //current position 222 223 InscopeVariablesIteratorState(); 224 225 ~InscopeVariablesIteratorState(); 226 227 void init(PlanState&); 228 void reset(PlanState&); 229 }; 230 231 class InscopeVariablesIterator : public NaryBaseIterator<InscopeVariablesIterator, InscopeVariablesIteratorState> 232 { 233 public: 234 SERIALIZABLE_CLASS(InscopeVariablesIterator); 235 236 SERIALIZABLE_CLASS_CONSTRUCTOR2T(InscopeVariablesIterator, 237 NaryBaseIterator<InscopeVariablesIterator, InscopeVariablesIteratorState>); 238 239 void serialize( ::zorba::serialization::Archiver& ar); 240 InscopeVariablesIterator(static_context * sctx,const QueryLoc & loc,std::vector<PlanIter_t> & children)241 InscopeVariablesIterator( 242 static_context* sctx, 243 const QueryLoc& loc, 244 std::vector<PlanIter_t>& children) 245 : 246 NaryBaseIterator<InscopeVariablesIterator, InscopeVariablesIteratorState>(sctx, loc, children) 247 {} 248 249 virtual ~InscopeVariablesIterator(); 250 251 void accept(PlanIterVisitor& v) const; 252 253 bool nextImpl(store::Item_t& result, PlanState& aPlanState) const; 254 }; 255 256 257 /** 258 * 259 * sc:default-collection-type 260 * 261 * Author: Zorba Team 262 */ 263 class DefaultCollectionTypeIterator : public NaryBaseIterator<DefaultCollectionTypeIterator, PlanIteratorState> 264 { 265 public: 266 SERIALIZABLE_CLASS(DefaultCollectionTypeIterator); 267 268 SERIALIZABLE_CLASS_CONSTRUCTOR2T(DefaultCollectionTypeIterator, 269 NaryBaseIterator<DefaultCollectionTypeIterator, PlanIteratorState>); 270 271 void serialize( ::zorba::serialization::Archiver& ar); 272 DefaultCollectionTypeIterator(static_context * sctx,const QueryLoc & loc,std::vector<PlanIter_t> & children)273 DefaultCollectionTypeIterator( 274 static_context* sctx, 275 const QueryLoc& loc, 276 std::vector<PlanIter_t>& children) 277 : 278 NaryBaseIterator<DefaultCollectionTypeIterator, PlanIteratorState>(sctx, loc, children) 279 {} 280 281 virtual ~DefaultCollectionTypeIterator(); 282 283 void accept(PlanIterVisitor& v) const; 284 285 bool nextImpl(store::Item_t& result, PlanState& aPlanState) const; 286 }; 287 288 289 /** 290 * 291 * sc:xpath10-compatibility-mode 292 * 293 * Author: Zorba Team 294 */ 295 class XPath10CompatModeIterator : public NaryBaseIterator<XPath10CompatModeIterator, PlanIteratorState> 296 { 297 public: 298 SERIALIZABLE_CLASS(XPath10CompatModeIterator); 299 300 SERIALIZABLE_CLASS_CONSTRUCTOR2T(XPath10CompatModeIterator, 301 NaryBaseIterator<XPath10CompatModeIterator, PlanIteratorState>); 302 303 void serialize( ::zorba::serialization::Archiver& ar); 304 XPath10CompatModeIterator(static_context * sctx,const QueryLoc & loc,std::vector<PlanIter_t> & children)305 XPath10CompatModeIterator( 306 static_context* sctx, 307 const QueryLoc& loc, 308 std::vector<PlanIter_t>& children) 309 : 310 NaryBaseIterator<XPath10CompatModeIterator, PlanIteratorState>(sctx, loc, children) 311 {} 312 313 virtual ~XPath10CompatModeIterator(); 314 315 void accept(PlanIterVisitor& v) const; 316 317 bool nextImpl(store::Item_t& result, PlanState& aPlanState) const; 318 }; 319 320 321 /** 322 * 323 * sc:statically-known-documents 324 * 325 * Author: Zorba Team 326 */ 327 class StaticallyKnownDocumentsIteratorState : public PlanIteratorState 328 { 329 public: 330 std::vector < zstring > theDocuments; //vector of document URIs 331 ulong thePosition; //current position 332 333 StaticallyKnownDocumentsIteratorState(); 334 335 ~StaticallyKnownDocumentsIteratorState(); 336 337 void init(PlanState&); 338 void reset(PlanState&); 339 }; 340 341 class StaticallyKnownDocumentsIterator : public NaryBaseIterator<StaticallyKnownDocumentsIterator, StaticallyKnownDocumentsIteratorState> 342 { 343 public: 344 SERIALIZABLE_CLASS(StaticallyKnownDocumentsIterator); 345 346 SERIALIZABLE_CLASS_CONSTRUCTOR2T(StaticallyKnownDocumentsIterator, 347 NaryBaseIterator<StaticallyKnownDocumentsIterator, StaticallyKnownDocumentsIteratorState>); 348 349 void serialize( ::zorba::serialization::Archiver& ar); 350 StaticallyKnownDocumentsIterator(static_context * sctx,const QueryLoc & loc,std::vector<PlanIter_t> & children)351 StaticallyKnownDocumentsIterator( 352 static_context* sctx, 353 const QueryLoc& loc, 354 std::vector<PlanIter_t>& children) 355 : 356 NaryBaseIterator<StaticallyKnownDocumentsIterator, StaticallyKnownDocumentsIteratorState>(sctx, loc, children) 357 {} 358 359 virtual ~StaticallyKnownDocumentsIterator(); 360 361 void accept(PlanIterVisitor& v) const; 362 363 bool nextImpl(store::Item_t& result, PlanState& aPlanState) const; 364 }; 365 366 367 /** 368 * 369 * sc:statically-known-document-type 370 * 371 * Author: Zorba Team 372 */ 373 class StaticallyKnownDocumentTypeIterator : public NaryBaseIterator<StaticallyKnownDocumentTypeIterator, PlanIteratorState> 374 { 375 public: 376 SERIALIZABLE_CLASS(StaticallyKnownDocumentTypeIterator); 377 378 SERIALIZABLE_CLASS_CONSTRUCTOR2T(StaticallyKnownDocumentTypeIterator, 379 NaryBaseIterator<StaticallyKnownDocumentTypeIterator, PlanIteratorState>); 380 381 void serialize( ::zorba::serialization::Archiver& ar); 382 StaticallyKnownDocumentTypeIterator(static_context * sctx,const QueryLoc & loc,std::vector<PlanIter_t> & children)383 StaticallyKnownDocumentTypeIterator( 384 static_context* sctx, 385 const QueryLoc& loc, 386 std::vector<PlanIter_t>& children) 387 : 388 NaryBaseIterator<StaticallyKnownDocumentTypeIterator, PlanIteratorState>(sctx, loc, children) 389 {} 390 391 virtual ~StaticallyKnownDocumentTypeIterator(); 392 393 void accept(PlanIterVisitor& v) const; 394 395 bool nextImpl(store::Item_t& result, PlanState& aPlanState) const; 396 }; 397 398 399 /** 400 * 401 * sc:statically-known-collations 402 * 403 * Author: Zorba Team 404 */ 405 class StaticallyKnownCollationsIteratorState : public PlanIteratorState 406 { 407 public: 408 std::vector < std::string > theCollations; //vector of collation uris 409 ulong thePosition; //current position 410 411 StaticallyKnownCollationsIteratorState(); 412 413 ~StaticallyKnownCollationsIteratorState(); 414 415 void init(PlanState&); 416 void reset(PlanState&); 417 }; 418 419 class StaticallyKnownCollationsIterator : public NaryBaseIterator<StaticallyKnownCollationsIterator, StaticallyKnownCollationsIteratorState> 420 { 421 public: 422 SERIALIZABLE_CLASS(StaticallyKnownCollationsIterator); 423 424 SERIALIZABLE_CLASS_CONSTRUCTOR2T(StaticallyKnownCollationsIterator, 425 NaryBaseIterator<StaticallyKnownCollationsIterator, StaticallyKnownCollationsIteratorState>); 426 427 void serialize( ::zorba::serialization::Archiver& ar); 428 StaticallyKnownCollationsIterator(static_context * sctx,const QueryLoc & loc,std::vector<PlanIter_t> & children)429 StaticallyKnownCollationsIterator( 430 static_context* sctx, 431 const QueryLoc& loc, 432 std::vector<PlanIter_t>& children) 433 : 434 NaryBaseIterator<StaticallyKnownCollationsIterator, StaticallyKnownCollationsIteratorState>(sctx, loc, children) 435 {} 436 437 virtual ~StaticallyKnownCollationsIterator(); 438 439 void accept(PlanIterVisitor& v) const; 440 441 bool nextImpl(store::Item_t& result, PlanState& aPlanState) const; 442 }; 443 444 445 /** 446 * 447 * sc:construction-mode 448 * 449 * Author: Zorba Team 450 */ 451 class ConstructionModeIterator : public NaryBaseIterator<ConstructionModeIterator, PlanIteratorState> 452 { 453 public: 454 SERIALIZABLE_CLASS(ConstructionModeIterator); 455 456 SERIALIZABLE_CLASS_CONSTRUCTOR2T(ConstructionModeIterator, 457 NaryBaseIterator<ConstructionModeIterator, PlanIteratorState>); 458 459 void serialize( ::zorba::serialization::Archiver& ar); 460 ConstructionModeIterator(static_context * sctx,const QueryLoc & loc,std::vector<PlanIter_t> & children)461 ConstructionModeIterator( 462 static_context* sctx, 463 const QueryLoc& loc, 464 std::vector<PlanIter_t>& children) 465 : 466 NaryBaseIterator<ConstructionModeIterator, PlanIteratorState>(sctx, loc, children) 467 {} 468 469 virtual ~ConstructionModeIterator(); 470 471 void accept(PlanIterVisitor& v) const; 472 473 bool nextImpl(store::Item_t& result, PlanState& aPlanState) const; 474 }; 475 476 477 /** 478 * 479 * sc:ordering-mode 480 * 481 * Author: Zorba Team 482 */ 483 class OrderingModeIterator : public NaryBaseIterator<OrderingModeIterator, PlanIteratorState> 484 { 485 public: 486 SERIALIZABLE_CLASS(OrderingModeIterator); 487 488 SERIALIZABLE_CLASS_CONSTRUCTOR2T(OrderingModeIterator, 489 NaryBaseIterator<OrderingModeIterator, PlanIteratorState>); 490 491 void serialize( ::zorba::serialization::Archiver& ar); 492 OrderingModeIterator(static_context * sctx,const QueryLoc & loc,std::vector<PlanIter_t> & children)493 OrderingModeIterator( 494 static_context* sctx, 495 const QueryLoc& loc, 496 std::vector<PlanIter_t>& children) 497 : 498 NaryBaseIterator<OrderingModeIterator, PlanIteratorState>(sctx, loc, children) 499 {} 500 501 virtual ~OrderingModeIterator(); 502 503 void accept(PlanIterVisitor& v) const; 504 505 bool nextImpl(store::Item_t& result, PlanState& aPlanState) const; 506 }; 507 508 509 /** 510 * 511 * sc:default-order 512 * 513 * Author: Zorba Team 514 */ 515 class DefaultOrderIterator : public NaryBaseIterator<DefaultOrderIterator, PlanIteratorState> 516 { 517 public: 518 SERIALIZABLE_CLASS(DefaultOrderIterator); 519 520 SERIALIZABLE_CLASS_CONSTRUCTOR2T(DefaultOrderIterator, 521 NaryBaseIterator<DefaultOrderIterator, PlanIteratorState>); 522 523 void serialize( ::zorba::serialization::Archiver& ar); 524 DefaultOrderIterator(static_context * sctx,const QueryLoc & loc,std::vector<PlanIter_t> & children)525 DefaultOrderIterator( 526 static_context* sctx, 527 const QueryLoc& loc, 528 std::vector<PlanIter_t>& children) 529 : 530 NaryBaseIterator<DefaultOrderIterator, PlanIteratorState>(sctx, loc, children) 531 {} 532 533 virtual ~DefaultOrderIterator(); 534 535 void accept(PlanIterVisitor& v) const; 536 537 bool nextImpl(store::Item_t& result, PlanState& aPlanState) const; 538 }; 539 540 541 /** 542 * 543 * sc:boundary-space-policy 544 * 545 * Author: Zorba Team 546 */ 547 class BoundarySpacePolicyIterator : public NaryBaseIterator<BoundarySpacePolicyIterator, PlanIteratorState> 548 { 549 public: 550 SERIALIZABLE_CLASS(BoundarySpacePolicyIterator); 551 552 SERIALIZABLE_CLASS_CONSTRUCTOR2T(BoundarySpacePolicyIterator, 553 NaryBaseIterator<BoundarySpacePolicyIterator, PlanIteratorState>); 554 555 void serialize( ::zorba::serialization::Archiver& ar); 556 BoundarySpacePolicyIterator(static_context * sctx,const QueryLoc & loc,std::vector<PlanIter_t> & children)557 BoundarySpacePolicyIterator( 558 static_context* sctx, 559 const QueryLoc& loc, 560 std::vector<PlanIter_t>& children) 561 : 562 NaryBaseIterator<BoundarySpacePolicyIterator, PlanIteratorState>(sctx, loc, children) 563 {} 564 565 virtual ~BoundarySpacePolicyIterator(); 566 567 void accept(PlanIterVisitor& v) const; 568 569 bool nextImpl(store::Item_t& result, PlanState& aPlanState) const; 570 }; 571 572 573 /** 574 * 575 * sc:copy-namespaces-mode 576 * 577 * Author: Zorba Team 578 */ 579 class CopyNamespacesModeIterator : public NaryBaseIterator<CopyNamespacesModeIterator, PlanIteratorState> 580 { 581 public: 582 SERIALIZABLE_CLASS(CopyNamespacesModeIterator); 583 584 SERIALIZABLE_CLASS_CONSTRUCTOR2T(CopyNamespacesModeIterator, 585 NaryBaseIterator<CopyNamespacesModeIterator, PlanIteratorState>); 586 587 void serialize( ::zorba::serialization::Archiver& ar); 588 CopyNamespacesModeIterator(static_context * sctx,const QueryLoc & loc,std::vector<PlanIter_t> & children)589 CopyNamespacesModeIterator( 590 static_context* sctx, 591 const QueryLoc& loc, 592 std::vector<PlanIter_t>& children) 593 : 594 NaryBaseIterator<CopyNamespacesModeIterator, PlanIteratorState>(sctx, loc, children) 595 {} 596 597 virtual ~CopyNamespacesModeIterator(); 598 599 void accept(PlanIterVisitor& v) const; 600 601 bool nextImpl(store::Item_t& result, PlanState& aPlanState) const; 602 }; 603 604 605 /** 606 * 607 * sc:function-names 608 * 609 * Author: Zorba Team 610 */ 611 class FunctionNamesIteratorState : public PlanIteratorState 612 { 613 public: 614 std::vector < function *> theFunctions; //vector of functions 615 ulong thePosition; //current position 616 617 FunctionNamesIteratorState(); 618 619 ~FunctionNamesIteratorState(); 620 621 void init(PlanState&); 622 void reset(PlanState&); 623 }; 624 625 class FunctionNamesIterator : public NaryBaseIterator<FunctionNamesIterator, FunctionNamesIteratorState> 626 { 627 public: 628 SERIALIZABLE_CLASS(FunctionNamesIterator); 629 630 SERIALIZABLE_CLASS_CONSTRUCTOR2T(FunctionNamesIterator, 631 NaryBaseIterator<FunctionNamesIterator, FunctionNamesIteratorState>); 632 633 void serialize( ::zorba::serialization::Archiver& ar); 634 FunctionNamesIterator(static_context * sctx,const QueryLoc & loc,std::vector<PlanIter_t> & children)635 FunctionNamesIterator( 636 static_context* sctx, 637 const QueryLoc& loc, 638 std::vector<PlanIter_t>& children) 639 : 640 NaryBaseIterator<FunctionNamesIterator, FunctionNamesIteratorState>(sctx, loc, children) 641 {} 642 643 virtual ~FunctionNamesIterator(); 644 645 void accept(PlanIterVisitor& v) const; 646 647 bool nextImpl(store::Item_t& result, PlanState& aPlanState) const; 648 }; 649 650 651 /** 652 * 653 * sc:function-arguments-count 654 * 655 * Author: Zorba Team 656 */ 657 class FunctionArgumentsCountIteratorState : public PlanIteratorState 658 { 659 public: 660 std::vector < int > arities; //vector of arities 661 unsigned int position; //current position 662 663 FunctionArgumentsCountIteratorState(); 664 665 ~FunctionArgumentsCountIteratorState(); 666 667 void init(PlanState&); 668 void reset(PlanState&); 669 }; 670 671 class FunctionArgumentsCountIterator : public NaryBaseIterator<FunctionArgumentsCountIterator, FunctionArgumentsCountIteratorState> 672 { 673 public: 674 SERIALIZABLE_CLASS(FunctionArgumentsCountIterator); 675 676 SERIALIZABLE_CLASS_CONSTRUCTOR2T(FunctionArgumentsCountIterator, 677 NaryBaseIterator<FunctionArgumentsCountIterator, FunctionArgumentsCountIteratorState>); 678 679 void serialize( ::zorba::serialization::Archiver& ar); 680 FunctionArgumentsCountIterator(static_context * sctx,const QueryLoc & loc,std::vector<PlanIter_t> & children)681 FunctionArgumentsCountIterator( 682 static_context* sctx, 683 const QueryLoc& loc, 684 std::vector<PlanIter_t>& children) 685 : 686 NaryBaseIterator<FunctionArgumentsCountIterator, FunctionArgumentsCountIteratorState>(sctx, loc, children) 687 {} 688 689 virtual ~FunctionArgumentsCountIterator(); 690 691 void accept(PlanIterVisitor& v) const; 692 693 bool nextImpl(store::Item_t& result, PlanState& aPlanState) const; 694 }; 695 696 697 /** 698 * 699 * sc:in-scope-schema-types 700 * 701 * Author: Zorba Team 702 */ 703 class InScopeSchemaTypesIteratorState : public PlanIteratorState 704 { 705 public: 706 unsigned int ns_pos; //current position 707 unsigned int elem_pos; //current position 708 709 InScopeSchemaTypesIteratorState(); 710 711 ~InScopeSchemaTypesIteratorState(); 712 713 void init(PlanState&); 714 void reset(PlanState&); 715 }; 716 717 class InScopeSchemaTypesIterator : public NaryBaseIterator<InScopeSchemaTypesIterator, InScopeSchemaTypesIteratorState> 718 { 719 public: 720 SERIALIZABLE_CLASS(InScopeSchemaTypesIterator); 721 722 SERIALIZABLE_CLASS_CONSTRUCTOR2T(InScopeSchemaTypesIterator, 723 NaryBaseIterator<InScopeSchemaTypesIterator, InScopeSchemaTypesIteratorState>); 724 725 void serialize( ::zorba::serialization::Archiver& ar); 726 InScopeSchemaTypesIterator(static_context * sctx,const QueryLoc & loc,std::vector<PlanIter_t> & children)727 InScopeSchemaTypesIterator( 728 static_context* sctx, 729 const QueryLoc& loc, 730 std::vector<PlanIter_t>& children) 731 : 732 NaryBaseIterator<InScopeSchemaTypesIterator, InScopeSchemaTypesIteratorState>(sctx, loc, children) 733 {} 734 735 virtual ~InScopeSchemaTypesIterator(); 736 737 void accept(PlanIterVisitor& v) const; 738 739 bool nextImpl(store::Item_t& result, PlanState& aPlanState) const; 740 }; 741 742 743 /** 744 * 745 * sc:in-scope-element-declarations 746 * 747 * Author: Zorba Team 748 */ 749 class InScopeElementDeclarationsIteratorState : public PlanIteratorState 750 { 751 public: 752 unsigned int ns_pos; //current position 753 unsigned int elem_pos; //current position 754 755 InScopeElementDeclarationsIteratorState(); 756 757 ~InScopeElementDeclarationsIteratorState(); 758 759 void init(PlanState&); 760 void reset(PlanState&); 761 }; 762 763 class InScopeElementDeclarationsIterator : public NaryBaseIterator<InScopeElementDeclarationsIterator, InScopeElementDeclarationsIteratorState> 764 { 765 public: 766 SERIALIZABLE_CLASS(InScopeElementDeclarationsIterator); 767 768 SERIALIZABLE_CLASS_CONSTRUCTOR2T(InScopeElementDeclarationsIterator, 769 NaryBaseIterator<InScopeElementDeclarationsIterator, InScopeElementDeclarationsIteratorState>); 770 771 void serialize( ::zorba::serialization::Archiver& ar); 772 InScopeElementDeclarationsIterator(static_context * sctx,const QueryLoc & loc,std::vector<PlanIter_t> & children)773 InScopeElementDeclarationsIterator( 774 static_context* sctx, 775 const QueryLoc& loc, 776 std::vector<PlanIter_t>& children) 777 : 778 NaryBaseIterator<InScopeElementDeclarationsIterator, InScopeElementDeclarationsIteratorState>(sctx, loc, children) 779 {} 780 781 virtual ~InScopeElementDeclarationsIterator(); 782 783 void accept(PlanIterVisitor& v) const; 784 785 bool nextImpl(store::Item_t& result, PlanState& aPlanState) const; 786 }; 787 788 789 /** 790 * 791 * sc:in-scope-attribute-declarations 792 * 793 * Author: Zorba Team 794 */ 795 class InScopeAttributeDeclarationsIteratorState : public PlanIteratorState 796 { 797 public: 798 unsigned int ns_pos; //current position 799 unsigned int elem_pos; //current position 800 801 InScopeAttributeDeclarationsIteratorState(); 802 803 ~InScopeAttributeDeclarationsIteratorState(); 804 805 void init(PlanState&); 806 void reset(PlanState&); 807 }; 808 809 class InScopeAttributeDeclarationsIterator : public NaryBaseIterator<InScopeAttributeDeclarationsIterator, InScopeAttributeDeclarationsIteratorState> 810 { 811 public: 812 SERIALIZABLE_CLASS(InScopeAttributeDeclarationsIterator); 813 814 SERIALIZABLE_CLASS_CONSTRUCTOR2T(InScopeAttributeDeclarationsIterator, 815 NaryBaseIterator<InScopeAttributeDeclarationsIterator, InScopeAttributeDeclarationsIteratorState>); 816 817 void serialize( ::zorba::serialization::Archiver& ar); 818 InScopeAttributeDeclarationsIterator(static_context * sctx,const QueryLoc & loc,std::vector<PlanIter_t> & children)819 InScopeAttributeDeclarationsIterator( 820 static_context* sctx, 821 const QueryLoc& loc, 822 std::vector<PlanIter_t>& children) 823 : 824 NaryBaseIterator<InScopeAttributeDeclarationsIterator, InScopeAttributeDeclarationsIteratorState>(sctx, loc, children) 825 {} 826 827 virtual ~InScopeAttributeDeclarationsIterator(); 828 829 void accept(PlanIterVisitor& v) const; 830 831 bool nextImpl(store::Item_t& result, PlanState& aPlanState) const; 832 }; 833 834 835 /** 836 * 837 * sc:in-scope-schema-types 838 * 839 * Author: Zorba Team 840 */ 841 class InScopeElementGroupsIteratorState : public PlanIteratorState 842 { 843 public: 844 unsigned int ns_pos; //current position 845 unsigned int elem_pos; //current position 846 847 InScopeElementGroupsIteratorState(); 848 849 ~InScopeElementGroupsIteratorState(); 850 851 void init(PlanState&); 852 void reset(PlanState&); 853 }; 854 855 class InScopeElementGroupsIterator : public NaryBaseIterator<InScopeElementGroupsIterator, InScopeElementGroupsIteratorState> 856 { 857 public: 858 SERIALIZABLE_CLASS(InScopeElementGroupsIterator); 859 860 SERIALIZABLE_CLASS_CONSTRUCTOR2T(InScopeElementGroupsIterator, 861 NaryBaseIterator<InScopeElementGroupsIterator, InScopeElementGroupsIteratorState>); 862 863 void serialize( ::zorba::serialization::Archiver& ar); 864 InScopeElementGroupsIterator(static_context * sctx,const QueryLoc & loc,std::vector<PlanIter_t> & children)865 InScopeElementGroupsIterator( 866 static_context* sctx, 867 const QueryLoc& loc, 868 std::vector<PlanIter_t>& children) 869 : 870 NaryBaseIterator<InScopeElementGroupsIterator, InScopeElementGroupsIteratorState>(sctx, loc, children) 871 {} 872 873 virtual ~InScopeElementGroupsIterator(); 874 875 void accept(PlanIterVisitor& v) const; 876 877 bool nextImpl(store::Item_t& result, PlanState& aPlanState) const; 878 }; 879 880 881 /** 882 * 883 * sc:in-scope-schema-types 884 * 885 * Author: Zorba Team 886 */ 887 class InScopeAttributeGroupsIteratorState : public PlanIteratorState 888 { 889 public: 890 unsigned int ns_pos; //current position 891 unsigned int elem_pos; //current position 892 893 InScopeAttributeGroupsIteratorState(); 894 895 ~InScopeAttributeGroupsIteratorState(); 896 897 void init(PlanState&); 898 void reset(PlanState&); 899 }; 900 901 class InScopeAttributeGroupsIterator : public NaryBaseIterator<InScopeAttributeGroupsIterator, InScopeAttributeGroupsIteratorState> 902 { 903 public: 904 SERIALIZABLE_CLASS(InScopeAttributeGroupsIterator); 905 906 SERIALIZABLE_CLASS_CONSTRUCTOR2T(InScopeAttributeGroupsIterator, 907 NaryBaseIterator<InScopeAttributeGroupsIterator, InScopeAttributeGroupsIteratorState>); 908 909 void serialize( ::zorba::serialization::Archiver& ar); 910 InScopeAttributeGroupsIterator(static_context * sctx,const QueryLoc & loc,std::vector<PlanIter_t> & children)911 InScopeAttributeGroupsIterator( 912 static_context* sctx, 913 const QueryLoc& loc, 914 std::vector<PlanIter_t>& children) 915 : 916 NaryBaseIterator<InScopeAttributeGroupsIterator, InScopeAttributeGroupsIteratorState>(sctx, loc, children) 917 {} 918 919 virtual ~InScopeAttributeGroupsIterator(); 920 921 void accept(PlanIterVisitor& v) const; 922 923 bool nextImpl(store::Item_t& result, PlanState& aPlanState) const; 924 }; 925 926 927 /** 928 * 929 * sc:option 930 * 931 * Author: Zorba Team 932 */ 933 class OptionIterator : public NaryBaseIterator<OptionIterator, PlanIteratorState> 934 { 935 public: 936 SERIALIZABLE_CLASS(OptionIterator); 937 938 SERIALIZABLE_CLASS_CONSTRUCTOR2T(OptionIterator, 939 NaryBaseIterator<OptionIterator, PlanIteratorState>); 940 941 void serialize( ::zorba::serialization::Archiver& ar); 942 OptionIterator(static_context * sctx,const QueryLoc & loc,std::vector<PlanIter_t> & children)943 OptionIterator( 944 static_context* sctx, 945 const QueryLoc& loc, 946 std::vector<PlanIter_t>& children) 947 : 948 NaryBaseIterator<OptionIterator, PlanIteratorState>(sctx, loc, children) 949 {} 950 951 virtual ~OptionIterator(); 952 953 void accept(PlanIterVisitor& v) const; 954 955 bool nextImpl(store::Item_t& result, PlanState& aPlanState) const; 956 }; 957 958 959 /** 960 * 961 * sc:option 962 * 963 * Author: Zorba Team 964 */ 965 class FunctionAnnotationsIteratorState : public PlanIteratorState 966 { 967 public: 968 const function* theFunction; //the function 969 ulong thePosition; //current position 970 971 FunctionAnnotationsIteratorState(); 972 973 ~FunctionAnnotationsIteratorState(); 974 975 void init(PlanState&); 976 void reset(PlanState&); 977 }; 978 979 class FunctionAnnotationsIterator : public NaryBaseIterator<FunctionAnnotationsIterator, FunctionAnnotationsIteratorState> 980 { 981 public: 982 SERIALIZABLE_CLASS(FunctionAnnotationsIterator); 983 984 SERIALIZABLE_CLASS_CONSTRUCTOR2T(FunctionAnnotationsIterator, 985 NaryBaseIterator<FunctionAnnotationsIterator, FunctionAnnotationsIteratorState>); 986 987 void serialize( ::zorba::serialization::Archiver& ar); 988 FunctionAnnotationsIterator(static_context * sctx,const QueryLoc & loc,std::vector<PlanIter_t> & children)989 FunctionAnnotationsIterator( 990 static_context* sctx, 991 const QueryLoc& loc, 992 std::vector<PlanIter_t>& children) 993 : 994 NaryBaseIterator<FunctionAnnotationsIterator, FunctionAnnotationsIteratorState>(sctx, loc, children) 995 {} 996 997 virtual ~FunctionAnnotationsIterator(); 998 999 void accept(PlanIterVisitor& v) const; 1000 1001 bool nextImpl(store::Item_t& result, PlanState& aPlanState) const; 1002 }; 1003 1004 1005 } 1006 #endif 1007 /* 1008 * Local variables: 1009 * mode: c++ 1010 * End: 1011 */ 1012