LCOV - code coverage report
Current view: top level - backends/honey - honey_valuelist.h (source / functions) Hit Total Coverage
Test: Test Coverage for xapian-core 7822d31adece Lines: 2 2 100.0 %
Date: 2019-05-23 11:15:29 Functions: 1 1 100.0 %
Branches: 1 2 50.0 %

           Branch data     Line data    Source code
       1                 :            : /** @file honey_valuelist.h
       2                 :            :  * @brief Honey class for value streams.
       3                 :            :  */
       4                 :            : /* Copyright (C) 2007,2008,2009,2011 Olly Betts
       5                 :            :  *
       6                 :            :  * This program is free software; you can redistribute it and/or
       7                 :            :  * modify it under the terms of the GNU General Public License as
       8                 :            :  * published by the Free Software Foundation; either version 2 of the
       9                 :            :  * License, or (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_HONEY_VALUELIST_H
      22                 :            : #define XAPIAN_INCLUDED_HONEY_VALUELIST_H
      23                 :            : 
      24                 :            : #include "backends/valuelist.h"
      25                 :            : #include "honey_values.h"
      26                 :            : 
      27                 :            : class HoneyCursor;
      28                 :            : class HoneyDatabase;
      29                 :            : 
      30                 :            : /// Honey class for value streams.
      31                 :            : class HoneyValueList : public Xapian::ValueIterator::Internal {
      32                 :            :     /// Don't allow assignment.
      33                 :            :     void operator=(const HoneyValueList &);
      34                 :            : 
      35                 :            :     /// Don't allow copying.
      36                 :            :     HoneyValueList(const HoneyValueList &);
      37                 :            : 
      38                 :            :     HoneyCursor * cursor;
      39                 :            : 
      40                 :            :     Honey::ValueChunkReader reader;
      41                 :            : 
      42                 :            :     Xapian::valueno slot;
      43                 :            : 
      44                 :            :     Xapian::Internal::intrusive_ptr<const HoneyDatabase> db;
      45                 :            : 
      46                 :            :     /// Update @a reader to use the chunk currently pointed to by @a cursor.
      47                 :            :     bool update_reader();
      48                 :            : 
      49                 :            :   public:
      50                 :       3045 :     HoneyValueList(Xapian::valueno slot_, const HoneyDatabase* db_)
      51         [ +  - ]:       3045 :         : cursor(NULL), slot(slot_), db(db_) { }
      52                 :            : 
      53                 :            :     ~HoneyValueList();
      54                 :            : 
      55                 :            :     Xapian::docid get_docid() const;
      56                 :            : 
      57                 :            :     Xapian::valueno get_valueno() const;
      58                 :            : 
      59                 :            :     std::string get_value() const;
      60                 :            : 
      61                 :            :     bool at_end() const;
      62                 :            : 
      63                 :            :     void next();
      64                 :            : 
      65                 :            :     void skip_to(Xapian::docid);
      66                 :            : 
      67                 :            :     std::string get_description() const;
      68                 :            : };
      69                 :            : 
      70                 :            : #endif // XAPIAN_INCLUDED_HONEY_VALUELIST_H

Generated by: LCOV version 1.11