include/xapian/serialisationcontext.h

Go to the documentation of this file.
00001 
00004 /* Copyright 2009 Lemur Consulting Ltd
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., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301
00019  * USA
00020  */
00021 
00022 #ifndef XAPIAN_INCLUDED_SERIALISATIONCONTEXT_H
00023 #define XAPIAN_INCLUDED_SERIALISATIONCONTEXT_H
00024 
00025 #include <xapian/base.h>
00026 #include <xapian/visibility.h>
00027 #include <string>
00028 
00029 namespace Xapian {
00030 
00031 // Forward declarations.
00032 class Weight;
00033 class PostingSource;
00034 
00040 class XAPIAN_VISIBILITY_DEFAULT SerialisationContext {
00041   public:
00043     class Internal;
00044 
00045   private:
00047     Xapian::Internal::RefCntPtr<Internal> internal;
00048 
00049   public:
00050 
00055     SerialisationContext(const SerialisationContext & other);
00056 
00061     SerialisationContext & operator=(const SerialisationContext & other);
00062 
00068     SerialisationContext();
00069 
00070     ~SerialisationContext();
00071 
00073     void register_weighting_scheme(const Xapian::Weight &wt);
00074 
00081     const Xapian::Weight *
00082             get_weighting_scheme(const std::string & name) const;
00083 
00085     void register_posting_source(const Xapian::PostingSource &source);
00086 
00093     const Xapian::PostingSource *
00094             get_posting_source(const std::string & name) const;
00095 };
00096 
00097 }
00098 
00099 #endif /* XAPIAN_INCLUDED_SERIALISATIONCONTEXT_H */

Documentation for Xapian (version 1.1.1).
Generated on 10 Jun 2009 by Doxygen 1.5.2.