match_package.hh

Go to the documentation of this file.
00001 /* vim: set sw=4 sts=4 et foldmethod=syntax : */
00002 
00003 /*
00004  * Copyright (c) 2006, 2007, 2008 Ciaran McCreesh
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_MATCH_PACKAGE_HH
00021 #define PALUDIS_GUARD_PALUDIS_MATCH_PACKAGE_HH 1
00022 
00023 /** \file
00024  * Declarations for match_package and match_package_in_set.
00025  *
00026  * \ingroup g_query
00027  *
00028  * \section Examples
00029  *
00030  * - \ref example_match_package.cc "example_match_package.cc"
00031  */
00032 
00033 #include <paludis/match_package-fwd.hh>
00034 #include <paludis/util/attributes.hh>
00035 #include <paludis/dep_spec-fwd.hh>
00036 #include <paludis/spec_tree-fwd.hh>
00037 #include <paludis/environment-fwd.hh>
00038 #include <paludis/package_id-fwd.hh>
00039 #include <tr1/memory>
00040 
00041 namespace paludis
00042 {
00043     /**
00044      * Return whether the specified PackageID matches the specified
00045      * PackageDepSpec.
00046      *
00047      * \ingroup g_query
00048      */
00049     bool match_package(
00050             const Environment & env,
00051             const PackageDepSpec & spec,
00052             const PackageID & target,
00053             const MatchPackageOptions & options)
00054         PALUDIS_ATTRIBUTE((warn_unused_result)) PALUDIS_VISIBLE;
00055 
00056     /**
00057      * Return whether the specified PackageID matches any of the items in the
00058      * specified set.
00059      *
00060      * Named sets inside the set are expanded.
00061      *
00062      * \ingroup g_query
00063      */
00064     bool match_package_in_set(
00065             const Environment & env,
00066             const SetSpecTree & spec,
00067             const PackageID & target,
00068             const MatchPackageOptions & options)
00069         PALUDIS_ATTRIBUTE((warn_unused_result)) PALUDIS_VISIBLE;
00070 }
00071 
00072 #endif

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