LCOV - code coverage report
Current view: top level - harness - backendmanager_multi.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 backendmanager_multi.h
       2                 :            :  * @brief BackendManager subclass for multi databases.
       3                 :            :  */
       4                 :            : /* Copyright (C) 2007,2009 Olly Betts
       5                 :            :  * Copyright (C) 2008 Lemur Consulting Ltd
       6                 :            :  *
       7                 :            :  * This program is free software; you can redistribute it and/or
       8                 :            :  * modify it under the terms of the GNU General Public License as
       9                 :            :  * published by the Free Software Foundation; either version 2 of the
      10                 :            :  * License, or (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_BACKENDMANAGER_MULTI_H
      23                 :            : #define XAPIAN_INCLUDED_BACKENDMANAGER_MULTI_H
      24                 :            : 
      25                 :            : #include "backendmanager.h"
      26                 :            : 
      27                 :            : #include <string>
      28                 :            : 
      29                 :            : #include <xapian/base.h>
      30                 :            : #include <xapian/types.h>
      31                 :            : #include <xapian/postingiterator.h>
      32                 :            : 
      33                 :            : #include "positionlist.h"
      34                 :            : 
      35                 :            : /// BackendManager subclass for multi databases.
      36 [ #  # ][ -  + ]:          3 : class BackendManagerMulti : public BackendManager {
      37                 :            :     /// The type to use for the sub-databases.
      38                 :            :     std::string subtype;
      39                 :            : 
      40                 :            :     /// Don't allow assignment.
      41                 :            :     void operator=(const BackendManagerMulti &);
      42                 :            : 
      43                 :            :     /// Don't allow copying.
      44                 :            :     BackendManagerMulti(const BackendManagerMulti &);
      45                 :            : 
      46                 :            :     std::string createdb_multi(const std::vector<std::string> & files);
      47                 :            : 
      48                 :            :   protected:
      49                 :            :     /// Get the path of the Xapian::Database instance.
      50                 :            :     std::string do_get_database_path(const std::vector<std::string> & files);
      51                 :            : 
      52                 :            :   public:
      53                 :            :     BackendManagerMulti(const std::string & subtype_);
      54                 :            : 
      55                 :            :     /// Return a string representing the current database type.
      56                 :            :     std::string get_dbtype() const;
      57                 :            : 
      58                 :            :     /// Create a Multi Xapian::WritableDatabase object indexing a single file.
      59                 :            :     Xapian::WritableDatabase get_writable_database(const std::string & name, const std::string & file);
      60                 :            : };
      61                 :            : 
      62                 :            : #endif // XAPIAN_INCLUDED_BACKENDMANAGER_MULTI_H

Generated by: LCOV version 1.8