LCOV - code coverage report
Current view: top level - backends/chert - chert_alldocsmodifiedpostlist.h (source / functions) Hit Total Coverage
Test: Test Coverage for xapian-core r Lines: 1 1 100.0 %
Date: 2011-08-21 Functions: 1 2 50.0 %
Branches: 1 4 25.0 %

           Branch data     Line data    Source code
       1                 :            : /** @file chert_alldocsmodifiedpostlist.h
       2                 :            :  * @brief A ChertAllDocsPostList plus pending modifications.
       3                 :            :  */
       4                 :            : /* Copyright (C) 2008 Lemur Consulting Ltd
       5                 :            :  * Copyright (C) 2009 Olly Betts
       6                 :            :  *
       7                 :            :  * This program is free software; you can redistribute it and/or modify
       8                 :            :  * it under the terms of the GNU General Public License as published by
       9                 :            :  * the Free Software Foundation; either version 2 of the License, or
      10                 :            :  * (at your option) any later version.
      11                 :            :  *
      12                 :            :  * This program is distributed in the hope that it will be useful,
      13                 :            :  * but WITHOUT ANY WARRANTY; without even the implied warranty of
      14                 :            :  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      15                 :            :  * GNU General Public License for more details.
      16                 :            :  *
      17                 :            :  * You should have received a copy of the GNU General Public License
      18                 :            :  * along with this program; if not, write to the Free Software
      19                 :            :  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
      20                 :            :  */
      21                 :            : 
      22                 :            : #ifndef XAPIAN_INCLUDED_CHERT_ALLDOCSMODIFIEDPOSTLIST_H
      23                 :            : #define XAPIAN_INCLUDED_CHERT_ALLDOCSMODIFIEDPOSTLIST_H
      24                 :            : 
      25                 :            : #include <string>
      26                 :            : 
      27                 :            : #include "chert_alldocspostlist.h"
      28                 :            : 
      29 [ +  - ][ #  # ]:         24 : class ChertAllDocsModifiedPostList : public ChertAllDocsPostList {
      30                 :            :     /// Modifications to apply to the ChertAllDocsPostList.
      31                 :            :     map<Xapian::docid, Xapian::termcount> doclens;
      32                 :            : 
      33                 :            :     /// Current position in the doclens list.
      34                 :            :     map<Xapian::docid, Xapian::termcount>::const_iterator doclens_it;
      35                 :            : 
      36                 :            :     /// Don't allow assignment.
      37                 :            :     void operator=(const ChertAllDocsModifiedPostList &);
      38                 :            : 
      39                 :            :     /// Don't allow copying.
      40                 :            :     ChertAllDocsModifiedPostList(const ChertAllDocsModifiedPostList &);
      41                 :            : 
      42                 :            :     /// Skip over deleted documents after a next() or skip_to().
      43                 :            :     void skip_deletes(Xapian::weight w_min);
      44                 :            : 
      45                 :            :   public:
      46                 :            :     ChertAllDocsModifiedPostList(Xapian::Internal::RefCntPtr<const ChertDatabase> db_,
      47                 :            :                                  Xapian::doccount doccount_,
      48                 :            :                                  const map<Xapian::docid, Xapian::termcount> & doclens_);
      49                 :            : 
      50                 :            :     Xapian::docid get_docid() const;
      51                 :            : 
      52                 :            :     Xapian::termcount get_doclength() const;
      53                 :            : 
      54                 :            :     PostList * next(Xapian::weight w_min);
      55                 :            : 
      56                 :            :     PostList * skip_to(Xapian::docid desired_did, Xapian::weight w_min);
      57                 :            : 
      58                 :            :     bool at_end() const;
      59                 :            : 
      60                 :            :     std::string get_description() const;
      61                 :            : };
      62                 :            : 
      63                 :            : #endif // XAPIAN_INCLUDED_CHERT_ALLDOCSMODIFIEDPOSTLIST_H

Generated by: LCOV version 1.8