1 /* 2 * Copyright 2006-2008 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 #ifndef ZORBA_STORE_ITERATOR_FACTORY_H 17 #define ZORBA_STORE_ITERATOR_FACTORY_H 18 19 20 #include "store/api/iterator.h" 21 22 23 namespace zorba { namespace store { 24 25 26 class Index; 27 28 29 class IteratorFactory 30 { 31 public: ~IteratorFactory()32 virtual ~IteratorFactory() {} 33 34 /** 35 * Create an iterator to iterate over the children of a document or element 36 * node in document order. 37 */ 38 virtual ChildrenIterator* 39 createChildrenIterator() = 0; 40 41 /** 42 * Create an iterator to iterate over the children of a document or element 43 * node in reverse document order. 44 */ 45 virtual ChildrenReverseIterator* 46 createChildrenReverseIterator() = 0; 47 48 /** 49 * Create an iterator to iterate over the attributes of an element node. 50 */ 51 virtual AttributesIterator* 52 createAttributesIterator() = 0; 53 54 55 /** 56 * Create an iterator to iterate over the result of an index probe 57 */ 58 virtual IndexProbeIterator* 59 createIndexProbeIterator(const Index_t& index) = 0; 60 61 /** 62 * Create an iterator to iterate over the items of a temp sequence. 63 */ 64 virtual TempSeqIterator* 65 createTempSeqIterator(bool lazy) = 0; 66 }; 67 68 69 } 70 } 71 72 #endif 73 74 /* 75 * Local variables: 76 * mode: c++ 77 * End: 78 */ 79 /* vim:set et sw=2 ts=2: */ 80