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 #pragma once 17 #ifndef ZORBA_COMPILER_FT_EXPR_H 18 #define ZORBA_COMPILER_FT_EXPR_H 19 20 #include "common/shared_types.h" 21 22 #include "compiler/expression/expr_base.h" 23 #include "compiler/expression/ftnode_classes.h" 24 25 namespace zorba { 26 27 /** 28 * An ftcontains_expr is-an expr for the FTContainsExpr. 29 */ 30 class ftcontains_expr : public expr 31 { 32 friend class ExprIterator; 33 friend class ExprManager; 34 35 protected: 36 ftcontains_expr( 37 CompilerCB* ccb, 38 static_context*, 39 QueryLoc const&, 40 expr* range, 41 ftnode *ftselection, 42 expr* ftignore 43 ); 44 45 public: 46 expr* cloneImpl( substitution_t& ) const; 47 48 void compute_scripting_kind(); 49 get_range()50 expr* get_range() const { return range_; } get_ftselection()51 ftnode_t get_ftselection() const { return ftselection_; } get_ignore()52 expr* get_ignore() const { return ftignore_; } 53 54 void accept( expr_visitor& ); 55 56 std::ostream& put( std::ostream& ) const; 57 58 private: 59 expr* range_; 60 ftnode_t ftselection_; 61 expr* ftignore_; 62 }; 63 64 } // namespace zorba 65 66 #endif /* ZORBA_FT_EXPR_H */ 67 /* 68 * Local variables: 69 * mode: c++ 70 * End: 71 */ 72 /* vim:set et sw=2 ts=2: */ 73