LCOV - code coverage report
Current view: top level - queryparser - termgenerator_internal.h (source / functions) Hit Total Coverage
Test: Test Coverage for xapian-core 954b5873a738 Lines: 3 3 100.0 %
Date: 2019-06-30 05:20:33 Functions: 2 2 100.0 %
Branches: 2 4 50.0 %

           Branch data     Line data    Source code
       1                 :            : /** @file termgenerator_internal.h
       2                 :            :  * @brief TermGenerator class internals
       3                 :            :  */
       4                 :            : /* Copyright (C) 2007,2012,2016 Olly Betts
       5                 :            :  *
       6                 :            :  * This program is free software; you can redistribute it and/or modify
       7                 :            :  * it under the terms of the GNU General Public License as published by
       8                 :            :  * the Free Software Foundation; either version 2 of the License, or
       9                 :            :  * (at your option) any later version.
      10                 :            :  *
      11                 :            :  * This program is distributed in the hope that it will be useful,
      12                 :            :  * but WITHOUT ANY WARRANTY; without even the implied warranty of
      13                 :            :  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      14                 :            :  * GNU General Public License for more details.
      15                 :            :  *
      16                 :            :  * You should have received a copy of the GNU General Public License
      17                 :            :  * along with this program; if not, write to the Free Software
      18                 :            :  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
      19                 :            :  */
      20                 :            : 
      21                 :            : #ifndef XAPIAN_INCLUDED_TERMGENERATOR_INTERNAL_H
      22                 :            : #define XAPIAN_INCLUDED_TERMGENERATOR_INTERNAL_H
      23                 :            : 
      24                 :            : #include "xapian/intrusive_ptr.h"
      25                 :            : #include <xapian/database.h>
      26                 :            : #include <xapian/document.h>
      27                 :            : #include <xapian/termgenerator.h>
      28                 :            : #include <xapian/queryparser.h> // For Xapian::Stopper
      29                 :            : #include <xapian/stem.h>
      30                 :            : 
      31                 :            : namespace Xapian {
      32                 :            : 
      33                 :            : class Stopper;
      34                 :            : 
      35                 :         52 : class TermGenerator::Internal : public Xapian::Internal::intrusive_base {
      36                 :            :     friend class TermGenerator;
      37                 :            :     Stem stemmer;
      38                 :            :     stem_strategy strategy;
      39                 :            :     Xapian::Internal::opt_intrusive_ptr<const Stopper> stopper;
      40                 :            :     stop_strategy stop_mode;
      41                 :            :     Document doc;
      42                 :            :     termpos cur_pos;
      43                 :            :     TermGenerator::flags flags;
      44                 :            :     unsigned max_word_length;
      45                 :            :     WritableDatabase db;
      46                 :            : 
      47                 :            :   public:
      48                 :         26 :     Internal() : strategy(STEM_SOME), stopper(NULL), stop_mode(STOP_STEMMED),
      49 [ +  - ][ +  - ]:         26 :         cur_pos(0), flags(TermGenerator::flags(0)), max_word_length(64) { }
      50                 :            :     void index_text(Utf8Iterator itor,
      51                 :            :                     termcount weight,
      52                 :            :                     const std::string & prefix,
      53                 :            :                     bool with_positions);
      54                 :            : };
      55                 :            : 
      56                 :            : }
      57                 :            : 
      58                 :            : #endif // XAPIAN_INCLUDED_TERMGENERATOR_INTERNAL_H

Generated by: LCOV version 1.11