aboutsummaryrefslogtreecommitdiff
path: root/paludis/repositories/fake/fake_package_id.hh
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-12-16 19:09:18 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-12-16 19:09:18 +0000
commitd91e364ec2194766b7477cf482eedaa88d6acebc (patch)
tree479d9ac5ead34c630f0d771bdb527f54ebd8bc53 /paludis/repositories/fake/fake_package_id.hh
parenta71cdd3cdc1873659745b742ed1b1756c4aa2722 (diff)
downloadpaludis-d91e364ec2194766b7477cf482eedaa88d6acebc.tar.gz
paludis-d91e364ec2194766b7477cf482eedaa88d6acebc.tar.xz
Add initial_labels to the newly specialised MetadataSpecTreeKey<DependencySpecTree>. Add EAPI paludis-1 support for labels. Let FakeRepository's EAPI be overridden.
Diffstat (limited to 'paludis/repositories/fake/fake_package_id.hh')
-rw-r--r--paludis/repositories/fake/fake_package_id.hh32
1 files changed, 31 insertions, 1 deletions
diff --git a/paludis/repositories/fake/fake_package_id.hh b/paludis/repositories/fake/fake_package_id.hh
index 71a63d886..ccee19a00 100644
--- a/paludis/repositories/fake/fake_package_id.hh
+++ b/paludis/repositories/fake/fake_package_id.hh
@@ -134,6 +134,36 @@ namespace paludis
PALUDIS_ATTRIBUTE((warn_unused_result));
};
+ template <>
+ class PALUDIS_VISIBLE FakeMetadataSpecTreeKey<DependencySpecTree> :
+ public MetadataSpecTreeKey<DependencySpecTree>,
+ private PrivateImplementationPattern<FakeMetadataSpecTreeKey<DependencySpecTree> >
+ {
+ private:
+ PrivateImplementationPattern<FakeMetadataSpecTreeKey<DependencySpecTree> >::ImpPtr & _imp;
+
+ public:
+ FakeMetadataSpecTreeKey(const std::string &, const std::string &, const std::string &,
+ const tr1::function<const tr1::shared_ptr<const DependencySpecTree::ConstItem> (const std::string &)> &,
+ const tr1::shared_ptr<const DependencyLabelSequence> &,
+ const MetadataKeyType);
+ ~FakeMetadataSpecTreeKey();
+
+ virtual const tr1::shared_ptr<const DependencySpecTree::ConstItem> value() const
+ PALUDIS_ATTRIBUTE((warn_unused_result));
+
+ void set_from_string(const std::string &);
+
+ virtual std::string pretty_print(const DependencySpecTree::ItemFormatter &) const
+ PALUDIS_ATTRIBUTE((warn_unused_result));
+
+ virtual std::string pretty_print_flat(const DependencySpecTree::ItemFormatter &) const
+ PALUDIS_ATTRIBUTE((warn_unused_result));
+
+ virtual const tr1::shared_ptr<const DependencyLabelSequence> initial_labels() const
+ PALUDIS_ATTRIBUTE((warn_unused_result));
+ };
+
class PALUDIS_VISIBLE FakeUnacceptedMask :
public UnacceptedMask,
private PrivateImplementationPattern<FakeUnacceptedMask>
@@ -161,7 +191,7 @@ namespace paludis
public:
FakePackageID(const Environment * const e,
const tr1::shared_ptr<const FakeRepositoryBase> &,
- const QualifiedPackageName &, const VersionSpec &);
+ const QualifiedPackageName &, const VersionSpec &, const std::string & eapi);
~FakePackageID();
virtual const std::string canonical_form(const PackageIDCanonicalForm) const;