LCOV - code coverage report
Current view: top level - tests/harness - backendmanager_singlefile.h (source / functions) Hit Total Coverage
Test: Test Coverage for xapian-core c2b6f1024d3a Lines: 1 1 100.0 %
Date: 2019-05-16 09:13:18 Functions: 1 1 100.0 %
Branches: 1 2 50.0 %

           Branch data     Line data    Source code
       1                 :            : /** @file backendmanager_singlefile.h
       2                 :            :  * @brief BackendManager subclass for singlefile databases.
       3                 :            :  */
       4                 :            : /* Copyright (C) 2007,2009,2015,2018 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_SINGLEFILE_H
      23                 :            : #define XAPIAN_INCLUDED_BACKENDMANAGER_SINGLEFILE_H
      24                 :            : 
      25                 :            : #include "backendmanager.h"
      26                 :            : 
      27                 :            : #include <string>
      28                 :            : 
      29                 :            : #include <xapian/database.h>
      30                 :            : 
      31                 :            : /// BackendManager subclass for singlefile databases.
      32         [ -  + ]:          2 : class BackendManagerSingleFile : public BackendManager {
      33                 :            :     /// Don't allow assignment.
      34                 :            :     void operator=(const BackendManagerSingleFile &);
      35                 :            : 
      36                 :            :     /// Don't allow copying.
      37                 :            :     BackendManagerSingleFile(const BackendManagerSingleFile &);
      38                 :            : 
      39                 :            :     BackendManager* sub_manager;
      40                 :            : 
      41                 :            :     std::string cachedir;
      42                 :            : 
      43                 :            :   protected:
      44                 :            :     /// Get the path of the Xapian::Database instance.
      45                 :            :     std::string do_get_database_path(const std::vector<std::string> & files);
      46                 :            : 
      47                 :            :   public:
      48                 :            :     BackendManagerSingleFile(const std::string& datadir_,
      49                 :            :                              BackendManager* sub_manager_);
      50                 :            : 
      51                 :            :     /// Return a string representing the current database type.
      52                 :            :     std::string get_dbtype() const;
      53                 :            : 
      54                 :            :     /// Create a Xapian::WritableDatabase object.
      55                 :            :     Xapian::WritableDatabase get_writable_database(const std::string & name, const std::string & file);
      56                 :            : 
      57                 :            :     std::string get_compaction_output_path(const std::string& name);
      58                 :            : };
      59                 :            : 
      60                 :            : #endif // XAPIAN_INCLUDED_BACKENDMANAGER_SINGLEFILE_H

Generated by: LCOV version 1.11