LCOV - code coverage report
Current view: top level - harness - backendmanager_inmemory.cc (source / functions) Hit Total Coverage
Test: Test Coverage for xapian-core r Lines: 6 6 100.0 %
Date: 2011-08-21 Functions: 3 3 100.0 %
Branches: 0 0 -

           Branch data     Line data    Source code
       1                 :            : /** @file backendmanager_inmemory.cc
       2                 :            :  * @brief BackendManager subclass for inmemory databases.
       3                 :            :  */
       4                 :            : /* Copyright (C) 2007,2009 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                 :            : #include <config.h>
      22                 :            : 
      23                 :            : #include "backendmanager_inmemory.h"
      24                 :            : 
      25                 :            : using namespace std;
      26                 :            : 
      27                 :            : std::string
      28                 :         23 : BackendManagerInMemory::get_dbtype() const
      29                 :            : {
      30                 :         23 :     return "inmemory";
      31                 :            : }
      32                 :            : 
      33                 :            : Xapian::Database
      34                 :        191 : BackendManagerInMemory::do_get_database(const vector<string> & files)
      35                 :            : {
      36                 :        191 :     return getwritedb_inmemory(files);
      37                 :            : }
      38                 :            : 
      39                 :            : Xapian::WritableDatabase
      40                 :         56 : BackendManagerInMemory::get_writable_database(const string &,
      41                 :            :                                               const string & file)
      42                 :            : {
      43                 :         56 :     return getwritedb_inmemory(vector<string>(1, file));
      44                 :            : }

Generated by: LCOV version 1.8