xapian-core  1.4.26
backendmanager_singlefile.h
Go to the documentation of this file.
1 
4 /* Copyright (C) 2007,2009,2015,2018,2023 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 
34  void operator=(const BackendManagerSingleFile &);
35 
38 
40 
41  std::string cachedir;
42 
43  protected:
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 
53 
55  void finalise_generated_database(const std::string& name);
56 
58  Xapian::WritableDatabase get_writable_database(const std::string & name, const std::string & file);
59 
60  std::string get_generated_database_path(const std::string& name);
61 
62  std::string get_compaction_output_path(const std::string& name);
63 };
64 
65 #endif // XAPIAN_INCLUDED_BACKENDMANAGER_SINGLEFILE_H
void finalise_generated_database(const std::string &name)
Finalise generated database.
Xapian::WritableDatabase get_generated_database(const std::string &name)
Get generated database.
BackendManager subclass for singlefile databases.
BackendManagerSingleFile(const BackendManagerSingleFile &)
Don&#39;t allow copying.
Base class for backend handling in test harness.
This class provides read/write access to a database.
Definition: database.h:789
API for working with Xapian databases.
std::string get_generated_database_path(const std::string &name)
Get the path to use for generating a database, if supported.
Xapian::WritableDatabase get_writable_database(const std::string &name, const std::string &file)
Create a Xapian::WritableDatabase object.
std::string get_compaction_output_path(const std::string &name)
Get a path to compact a database to.
void operator=(const BackendManagerSingleFile &)
Don&#39;t allow assignment.
std::string do_get_database_path(const std::vector< std::string > &files)
Get the path of the Xapian::Database instance.
Definition: header.h:151