Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

FieldBelowWalker.hpp

Go to the documentation of this file.
00001 /*==========================================================================
00002  * Copyright (c) 2006 Carnegie Mellon University.  All Rights Reserved.
00003  *
00004  * Use of the Lemur Toolkit for Language Modeling and Information Retrieval
00005  * is subject to the terms of the software license set forth in the LICENSE
00006  * file included with this software (and below), and also available at
00007  * http://www.lemurproject.org/license.html
00008  *
00009  *==========================================================================
00010  */
00011 #include "indri/Walker.hpp"
00012 
00013 #ifndef INDRI_FIELDBELOWWALKER_HPP
00014 #define INDRI_FIELDBELOWWALKER_HPP
00015 
00016 namespace indri
00017 {
00018   namespace lang
00019   {
00020     
00021     // Identifies where there's a field at or below the curent node in the query spec.
00022     // This is used by InferenceNetworkBuilder to determine whether the nested operators
00023     // are needed.
00024 
00025     class FieldBelowWalker : public indri::lang::Walker { 
00026     private:
00027      
00028       bool _seenField;
00029       
00030     public:
00031       FieldBelowWalker() : _seenField(false) {}
00032       
00033       
00034       bool fieldBelow() {
00035         return _seenField;
00036       }
00037 
00038       void before( indri::lang::Field* f ) {
00039         _seenField = true;
00040       }
00041     };
00042   }
00043 }
00044 #endif //INDRI_FIELDBELOWWALKER_HPP

Generated on Tue Jun 15 11:02:54 2010 for Lemur by doxygen 1.3.4