00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef PALUDIS_GUARD_PALUDIS_ELIKE_PACKAGE_DEP_SPEC_FWD_HH
00021 #define PALUDIS_GUARD_PALUDIS_ELIKE_PACKAGE_DEP_SPEC_FWD_HH 1
00022
00023 #include <paludis/util/attributes.hh>
00024 #include <paludis/util/options-fwd.hh>
00025 #include <paludis/dep_spec-fwd.hh>
00026 #include <paludis/package_id-fwd.hh>
00027 #include <paludis/version_operator-fwd.hh>
00028 #include <paludis/version_spec-fwd.hh>
00029 #include <tr1/functional>
00030 #include <iosfwd>
00031
00032 namespace paludis
00033 {
00034
00035 #include <paludis/elike_package_dep_spec-se.hh>
00036
00037 typedef Options<ELikePackageDepSpecOption> ELikePackageDepSpecOptions;
00038
00039 struct GenericELikePackageDepSpecParseFunctions;
00040
00041 PackageDepSpec parse_generic_elike_package_dep_spec(const std::string & ss, const GenericELikePackageDepSpecParseFunctions & fns)
00042 PALUDIS_ATTRIBUTE((warn_unused_result)) PALUDIS_VISIBLE;
00043
00044 PartiallyMadePackageDepSpec partial_parse_generic_elike_package_dep_spec(const std::string & ss,
00045 const GenericELikePackageDepSpecParseFunctions & fns)
00046 PALUDIS_ATTRIBUTE((warn_unused_result)) PALUDIS_VISIBLE;
00047
00048 PackageDepSpec parse_elike_package_dep_spec(const std::string & ss, const ELikePackageDepSpecOptions &,
00049 const VersionSpecOptions &,
00050 const std::tr1::shared_ptr<const PackageID> &)
00051 PALUDIS_ATTRIBUTE((warn_unused_result)) PALUDIS_VISIBLE;
00052
00053 PartiallyMadePackageDepSpec partial_parse_elike_package_dep_spec(const std::string & ss,
00054 const ELikePackageDepSpecOptions &,
00055 const VersionSpecOptions &,
00056 const std::tr1::shared_ptr<const PackageID> &)
00057 PALUDIS_ATTRIBUTE((warn_unused_result)) PALUDIS_VISIBLE;
00058
00059 void elike_check_sanity(const std::string & s) PALUDIS_VISIBLE;
00060
00061 bool elike_remove_trailing_square_bracket_if_exists(std::string & s, PartiallyMadePackageDepSpec & result,
00062 const ELikePackageDepSpecOptions & options,
00063 const VersionSpecOptions & version_options,
00064 bool & had_bracket_version_requirements,
00065 bool & had_use_requirements, const std::tr1::shared_ptr<const PackageID> & id) PALUDIS_VISIBLE;
00066
00067 void elike_remove_trailing_repo_if_exists(std::string & s, PartiallyMadePackageDepSpec & result,
00068 const ELikePackageDepSpecOptions & options) PALUDIS_VISIBLE;
00069
00070 void elike_remove_trailing_slot_if_exists(std::string & s, PartiallyMadePackageDepSpec & result,
00071 const ELikePackageDepSpecOptions & options) PALUDIS_VISIBLE;
00072
00073 bool elike_has_version_operator(const std::string & s, const bool had_bracket_version_requirements,
00074 const ELikePackageDepSpecOptions & options) PALUDIS_VISIBLE;
00075
00076 VersionOperator elike_get_remove_version_operator(std::string & s,
00077 const ELikePackageDepSpecOptions & options) PALUDIS_VISIBLE;
00078
00079 VersionSpec elike_get_remove_trailing_version(std::string & s,
00080 const VersionSpecOptions &) PALUDIS_VISIBLE;
00081
00082 void elike_add_version_requirement(const VersionOperator & op, const VersionSpec & spec, PartiallyMadePackageDepSpec & result)
00083 PALUDIS_VISIBLE;
00084
00085 void elike_add_package_requirement(const std::string & s, PartiallyMadePackageDepSpec & result) PALUDIS_VISIBLE;
00086 }
00087
00088 #endif