1 /** @file registryinternal.h 2 * @brief Internals of Xapian::Registry object. 3 */ 4 /* Copyright 2009 Lemur Consulting Ltd 5 * Copyright 2009 Olly Betts 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_REGISTRYINTERNAL_H 23 #define XAPIAN_INCLUDED_REGISTRYINTERNAL_H 24 25 #include "xapian/base.h" 26 #include "xapian/registry.h" 27 28 #include <map> 29 #include <string> 30 31 namespace Xapian { 32 class Weight; 33 class PostingSource; 34 class MatchSpy; 35 } 36 37 class Xapian::Registry::Internal : public Xapian::Internal::RefCntBase { 38 friend class Xapian::Registry; 39 40 /// Registered weighting schemes. 41 std::map<std::string, Xapian::Weight *> wtschemes; 42 43 /// Registered external posting sources. 44 std::map<std::string, Xapian::PostingSource *> postingsources; 45 46 /// Registered match spies. 47 std::map<std::string, Xapian::MatchSpy *> matchspies; 48 49 /// Add the standard subclasses provided in the API. 50 void add_defaults(); 51 52 /// Clear all registered weighting schemes. 53 void clear_weighting_schemes(); 54 55 /// Clear all registered posting sources. 56 void clear_posting_sources(); 57 58 /// Clear all registered match spies. 59 void clear_match_spies(); 60 61 public: 62 Internal(); 63 ~Internal(); 64 }; 65 66 #endif // XAPIAN_INCLUDED_REGISTRYINTERNAL_H 67