include/xapian/dbfactory.h

Go to the documentation of this file.
00001 
00004 /* Copyright (C) 2005 Olly Betts
00005  *
00006  * This program is free software; you can redistribute it and/or
00007  * modify it under the terms of the GNU General Public License as
00008  * published by the Free Software Foundation; either version 2 of the
00009  * License, or (at your option) any later version.
00010  *
00011  * This program is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU General Public License
00017  * along with this program; if not, write to the Free Software
00018  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
00019  * USA
00020  */
00021 
00022 #ifndef XAPIAN_INCLUDED_DBFACTORY_H
00023 #define XAPIAN_INCLUDED_DBFACTORY_H
00024 
00025 #include <string>
00026 
00027 #include <xapian/types.h>
00028 #include <xapian/database.h>
00029 #include <xapian/version.h>
00030 
00031 namespace Xapian {
00032 
00033 namespace Auto {
00034 
00042 Database open_stub(const std::string &file);
00043 
00053 XAPIAN_DEPRECATED(Database open(const std::string &path));
00054 inline Database open(const std::string &path) {
00055     return Database(path);
00056 }
00057 
00067 XAPIAN_DEPRECATED(WritableDatabase open(const std::string &path, int action));
00068 inline WritableDatabase open(const std::string &path, int action) {
00069     return WritableDatabase(path, action);
00070 }
00071 
00072 }
00073 
00074 #ifdef XAPIAN_HAS_INMEMORY_BACKEND
00075 namespace InMemory {
00076 
00081 WritableDatabase open();
00082 
00083 }
00084 #endif
00085 
00086 #ifdef XAPIAN_HAS_MUSCAT36_BACKEND
00087 namespace Muscat36 {
00088 
00096 Database open_da(const std::string &R, const std::string &T, bool heavy_duty = true);
00097 
00110 Database open_da(const std::string &R, const std::string &T, const std::string &values, bool heavy_duty = true);
00111 
00120 Database open_db(const std::string &DB, size_t cache_size = 30);
00121 
00135 Database open_db(const std::string &DB, const std::string &values, size_t cache_size = 30);
00136 
00137 }
00138 #endif
00139 
00140 #ifdef XAPIAN_HAS_QUARTZ_BACKEND
00141 namespace Quartz {
00142 
00147 Database open(const std::string &dir);
00148 
00167 WritableDatabase
00168 open(const std::string &dir, int action, int block_size = 8192);
00169 
00170 }
00171 #endif
00172 
00173 #ifdef XAPIAN_HAS_FLINT_BACKEND
00174 namespace Flint {
00175 
00180 Database open(const std::string &dir);
00181 
00200 WritableDatabase
00201 open(const std::string &dir, int action, int block_size = 8192);
00202 
00203 }
00204 #endif
00205 
00206 #ifdef XAPIAN_HAS_REMOTE_BACKEND
00207 namespace Remote {
00208 
00226 Database open(const std::string &host, unsigned int port, Xapian::timeout timeout = 10000, Xapian::timeout connect_timeout = 0);
00227 
00241 Database open(const std::string &program, const std::string &args, Xapian::timeout timeout = 10000);
00242 
00243 }
00244 #endif
00245 
00246 }
00247 
00248 #endif /* XAPIAN_INCLUDED_DBFACTORY_H */

Documentation for Xapian (version 0.9.6).
Generated on 15 May 2006 by Doxygen 1.4.6.