xapian-core  1.4.26
backendmanager_inmemory.h
Go to the documentation of this file.
1 
4 /* Copyright (C) 2007,2009,2018 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 #ifndef XAPIAN_INCLUDED_BACKENDMANAGER_INMEMORY_H
22 #define XAPIAN_INCLUDED_BACKENDMANAGER_INMEMORY_H
23 
24 #include "backendmanager.h"
25 
26 #include <string>
27 
28 #include <xapian/types.h>
29 #include <xapian/postingiterator.h>
30 
34  void operator=(const BackendManagerInMemory &);
35 
38 
39  protected:
41  Xapian::Database do_get_database(const std::vector<std::string> & files);
42 
43  public:
44  explicit
45  BackendManagerInMemory(const std::string& datadir_)
46  : BackendManager(datadir_, "inmemory") {}
47 
49  Xapian::WritableDatabase get_writable_database(const std::string & name, const std::string & file);
50 
52  std::string get_generated_database_path(const std::string & name);
53 };
54 
55 #endif // XAPIAN_INCLUDED_BACKENDMANAGER_INMEMORY_H
Xapian::Database do_get_database(const std::vector< std::string > &files)
Create a InMemory Xapian::Database object indexing multiple files.
Xapian::WritableDatabase get_writable_database(const std::string &name, const std::string &file)
Create a InMemory Xapian::WritableDatabase object indexing a single file.
typedefs for Xapian
BackendManagerInMemory(const std::string &datadir_)
This class is used to access a database, or a group of databases.
Definition: database.h:68
Base class for backend handling in test harness.
This class provides read/write access to a database.
Definition: database.h:789
std::string get_generated_database_path(const std::string &name)
Get the path to use for generating a database, if supported.
BackendManagerInMemory(const BackendManagerInMemory &)
Don&#39;t allow copying.
BackendManager subclass for inmemory databases.
Definition: header.h:151
Class for iterating over a list of document ids.
void operator=(const BackendManagerInMemory &)
Don&#39;t allow assignment.