fuzzy_finder.hh

Go to the documentation of this file.
00001 /* vim: set sw=4 sts=4 et foldmethod=syntax : */
00002 
00003 /*
00004  * Copyright (c) 2007 Fernando J. Pereda
00005  *
00006  * This file is part of the Paludis package manager. Paludis is free software;
00007  * you can redistribute it and/or modify it under the terms of the GNU General
00008  * Public License version 2, as published by the Free Software Foundation.
00009  *
00010  * Paludis is distributed in the hope that it will be useful, but WITHOUT ANY
00011  * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
00012  * FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
00013  * details.
00014  *
00015  * You should have received a copy of the GNU General Public License along with
00016  * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
00017  * Place, Suite 330, Boston, MA  02111-1307  USA
00018  */
00019 
00020 #ifndef PALUDIS_GUARD_PALUDIS_FUZZY_FINDER_HH
00021 #define PALUDIS_GUARD_PALUDIS_FUZZY_FINDER_HH 1
00022 
00023 #include <paludis/environment-fwd.hh>
00024 #include <paludis/util/private_implementation_pattern.hh>
00025 #include <paludis/util/wrapped_forward_iterator-fwd.hh>
00026 #include <paludis/name.hh>
00027 #include <paludis/filter-fwd.hh>
00028 #include <string>
00029 
00030 /** \file
00031  * Declarations for paludis::FuzzyCandidatesFinder and paludis::FuzzyRepositoriesFinder
00032  *
00033  * \ingroup g_package_database
00034  */
00035 
00036 namespace paludis
00037 {
00038     /**
00039      * Object to find package names to a given name
00040      *
00041      * \ingroup g_package_database
00042      */
00043     class PALUDIS_VISIBLE FuzzyCandidatesFinder :
00044         private PrivateImplementationPattern<FuzzyCandidatesFinder>
00045     {
00046         public:
00047             ///\name Basic Operations
00048             ///\{
00049 
00050             FuzzyCandidatesFinder(const Environment & e, const std::string & name, const Filter & filter);
00051             ~FuzzyCandidatesFinder();
00052 
00053             ///\}
00054 
00055             ///\name Iterate over the candidates
00056             ///\{
00057 
00058             struct CandidatesConstIteratorTag;
00059             typedef WrappedForwardIterator<CandidatesConstIteratorTag, const QualifiedPackageName>
00060                 CandidatesConstIterator;
00061 
00062             CandidatesConstIterator begin() const;
00063             CandidatesConstIterator end() const;
00064 
00065             ///\}
00066     };
00067 
00068     /**
00069      * Object to find repositories similar to a given name
00070      *
00071      * \ingroup g_package_database
00072      */
00073     class PALUDIS_VISIBLE FuzzyRepositoriesFinder :
00074         private PrivateImplementationPattern<FuzzyRepositoriesFinder>
00075     {
00076         public:
00077             ///\name Basic Operations
00078             ///\{
00079 
00080             FuzzyRepositoriesFinder(const Environment & e, const std::string & name);
00081             ~FuzzyRepositoriesFinder();
00082 
00083             ///\}
00084 
00085             ///\name Iterate over the candidates
00086             ///\{
00087 
00088             struct RepositoriesConstIteratorTag;
00089             typedef WrappedForwardIterator<RepositoriesConstIteratorTag, const RepositoryName>
00090                 RepositoriesConstIterator;
00091 
00092             RepositoriesConstIterator begin() const;
00093             RepositoriesConstIterator end() const;
00094 
00095             ///\}
00096     };
00097 }
00098 
00099 #endif

Generated on Mon Sep 21 10:36:08 2009 for paludis by  doxygen 1.5.4