xapian-core  2.0.0
backendmanager_honey.h
Go to the documentation of this file.
1 
4 /* Copyright (C) 2007,2008,2009,2017 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, see
18  * <https://www.gnu.org/licenses/>.
19  */
20 
21 #ifndef XAPIAN_INCLUDED_BACKENDMANAGER_HONEY_H
22 #define XAPIAN_INCLUDED_BACKENDMANAGER_HONEY_H
23 
24 #include "backendmanager.h"
25 
26 #include <string>
27 
28 #include <xapian/database.h>
29 #include <xapian/types.h>
30 
35 
38 
40  std::string last_wdb_name;
41 
44 
45  protected:
47  std::string do_get_database_path(const std::vector<std::string> & files);
48 
49  public:
50  BackendManagerHoney(const std::string& datadir_)
51  : BackendManager(datadir_, "honey"),
52  generated_sub_manager(NULL) { }
53 
54  BackendManagerHoney(const std::string& datadir_,
55  BackendManager* generated_sub_manager_)
56  : BackendManager(datadir_, "honey"),
57  generated_sub_manager(generated_sub_manager_) { }
58 
61 
63  void finalise_generated_database(const std::string& name);
64 
67  const std::string& file);
68 
69  std::string get_generated_database_path(const std::string& name);
70 
71  std::string get_compaction_output_path(const std::string& name);
72 };
73 
74 #endif // XAPIAN_INCLUDED_BACKENDMANAGER_HONEY_H
Base class for backend handling in test harness.
BackendManager subclass for honey databases.
BackendManager * generated_sub_manager
BackendManager for generated testcases.
Xapian::WritableDatabase get_generated_database(const std::string &name)
Get generated database for honey.
std::string get_compaction_output_path(const std::string &name)
Get a path to compact a database to.
void operator=(const BackendManagerHoney &)
Don't allow assignment.
BackendManagerHoney(const std::string &datadir_, BackendManager *generated_sub_manager_)
BackendManagerHoney(const BackendManagerHoney &)
Don't allow copying.
std::string do_get_database_path(const std::vector< std::string > &files)
Get the path of Honey Xapian::Database instance.
std::string last_wdb_name
The path of the last writable database used.
Xapian::WritableDatabase get_writable_database(const std::string &name, const std::string &file)
Create a Xapian::WritableDatabase object.
std::string get_generated_database_path(const std::string &name)
Get the path to use for generating a database, if supported.
BackendManagerHoney(const std::string &datadir_)
void finalise_generated_database(const std::string &name)
Finalise generated database.
This class provides read/write access to a database.
Definition: database.h:964
An indexed database of documents.
Definition: header.h:215
typedefs for Xapian