dep_parser.hh

00001 /* vim: set sw=4 sts=4 et foldmethod=syntax : */
00002 
00003 /*
00004  * Copyright (c) 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_REPOSITORIES_FAKE_DEP_PARSER_HH
00021 #define PALUDIS_GUARD_PALUDIS_REPOSITORIES_FAKE_DEP_PARSER_HH 1
00022 
00023 #include <paludis/util/exception.hh>
00024 #include <paludis/spec_tree.hh>
00025 #include <paludis/package_id-fwd.hh>
00026 #include <paludis/environment-fwd.hh>
00027 #include <string>
00028 #include <tr1/functional>
00029 
00030 namespace paludis
00031 {
00032     namespace fakerepository
00033     {
00034         class PALUDIS_VISIBLE FakeDepParseError :
00035             public Exception
00036         {
00037             public:
00038                 /**
00039                  * Constructor.
00040                  */
00041                 FakeDepParseError(const std::string & dep_string,
00042                         const std::string & message) throw ();
00043         };
00044 
00045         /**
00046          * Parse a dependency heirarchy.
00047          */
00048         std::tr1::shared_ptr<DependencySpecTree> parse_depend(const std::string & s,
00049                 const Environment * const, const std::tr1::shared_ptr<const PackageID> &) PALUDIS_VISIBLE;
00050 
00051         /**
00052          * Parse a provide heirarchy.
00053          */
00054         std::tr1::shared_ptr<ProvideSpecTree> parse_provide(const std::string & s,
00055                 const Environment * const, const std::tr1::shared_ptr<const PackageID> &) PALUDIS_VISIBLE;
00056 
00057         /**
00058          * Parse a fetchable uri heirarchy.
00059          */
00060         std::tr1::shared_ptr<FetchableURISpecTree> parse_fetchable_uri(const std::string & s,
00061                 const Environment * const, const std::tr1::shared_ptr<const PackageID> &) PALUDIS_VISIBLE;
00062 
00063         /**
00064          * Parse a simple uri heirarchy.
00065          */
00066         std::tr1::shared_ptr<SimpleURISpecTree> parse_simple_uri(const std::string & s,
00067                 const Environment * const, const std::tr1::shared_ptr<const PackageID> &) PALUDIS_VISIBLE;
00068 
00069         /**
00070          * Parse a license heirarchy.
00071          */
00072         std::tr1::shared_ptr<LicenseSpecTree> parse_license(const std::string & s,
00073                 const Environment * const, const std::tr1::shared_ptr<const PackageID> &) PALUDIS_VISIBLE;
00074     }
00075 }
00076 
00077 #endif

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