Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members

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 inline Database open(const std::string &path) { 00054 return Database(path); 00055 } 00056 00066 inline WritableDatabase open(const std::string &path, int action) { 00067 return WritableDatabase(path, action); 00068 } 00069 00070 } 00071 00072 #ifdef XAPIAN_HAS_INMEMORY_BACKEND 00073 namespace InMemory { 00074 00079 WritableDatabase open(); 00080 00081 } 00082 #endif 00083 00084 #ifdef XAPIAN_HAS_MUSCAT36_BACKEND 00085 namespace Muscat36 { 00086 00094 Database open_da(const std::string &R, const std::string &T, bool heavy_duty = true); 00095 00108 Database open_da(const std::string &R, const std::string &T, const std::string &values, bool heavy_duty = true); 00109 00118 Database open_db(const std::string &DB, size_t cache_size = 30); 00119 00133 Database open_db(const std::string &DB, const std::string &values, size_t cache_size = 30); 00134 00135 } 00136 #endif 00137 00138 #ifdef XAPIAN_HAS_QUARTZ_BACKEND 00139 namespace Quartz { 00140 00145 Database open(const std::string &dir); 00146 00165 WritableDatabase 00166 open(const std::string &dir, int action, int block_size = 8192); 00167 00168 } 00169 #endif 00170 00171 #ifdef XAPIAN_HAS_FLINT_BACKEND 00172 namespace Flint { 00173 00178 Database open(const std::string &dir); 00179 00198 WritableDatabase 00199 open(const std::string &dir, int action, int block_size = 8192); 00200 00201 } 00202 #endif 00203 00204 #ifdef XAPIAN_HAS_REMOTE_BACKEND 00205 namespace Remote { 00206 00224 Database open(const std::string &host, unsigned int port, Xapian::timeout timeout = 10000, Xapian::timeout connect_timeout = 0); 00225 00239 Database open(const std::string &program, const std::string &args, Xapian::timeout timeout = 10000); 00240 00241 } 00242 #endif 00243 00244 } 00245 00246 #endif /* XAPIAN_INCLUDED_DBFACTORY_H */

Documentation for Xapian (version 0.9.2).
Generated on 15 Jul 2005 by Doxygen 1.3.8.