aboutsummaryrefslogtreecommitdiff
path: root/paludis/repositories/fake/fake_package_id.hh
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-02-05 12:58:56 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-02-05 12:58:56 +0000
commit8122449d5360fa0f07f18d69adcd21c4877e1899 (patch)
tree9d510ee857dfa52070615be58cd9ab1a7c540675 /paludis/repositories/fake/fake_package_id.hh
parent192ffbc8a58d7de78e936dc19ae63b84da868cb3 (diff)
downloadpaludis-8122449d5360fa0f07f18d69adcd21c4877e1899.tar.gz
paludis-8122449d5360fa0f07f18d69adcd21c4877e1899.tar.xz
Let FakePackageIDs be transient
Diffstat (limited to 'paludis/repositories/fake/fake_package_id.hh')
-rw-r--r--paludis/repositories/fake/fake_package_id.hh28
1 files changed, 27 insertions, 1 deletions
diff --git a/paludis/repositories/fake/fake_package_id.hh b/paludis/repositories/fake/fake_package_id.hh
index 4389261ce..547ce7d2c 100644
--- a/paludis/repositories/fake/fake_package_id.hh
+++ b/paludis/repositories/fake/fake_package_id.hh
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2007, 2008, 2009 Ciaran McCreesh
+ * Copyright (c) 2007, 2008, 2009, 2010 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -31,6 +31,31 @@ namespace paludis
class FakeRepositoryBase;
template <typename C_>
+ class PALUDIS_VISIBLE FakeMetadataValueKey :
+ public MetadataValueKey<C_>,
+ private PrivateImplementationPattern<FakeMetadataValueKey<C_> >
+ {
+ protected:
+ typename PrivateImplementationPattern<FakeMetadataValueKey<C_> >::ImpPtr & _imp;
+
+ public:
+ FakeMetadataValueKey(const std::string &, const std::string &, const MetadataKeyType,
+ const C_ &);
+
+ ~FakeMetadataValueKey();
+
+ virtual const C_ value() const PALUDIS_ATTRIBUTE((warn_unused_result));
+ void set_value(const C_ &);
+
+ virtual const std::string raw_name() const PALUDIS_ATTRIBUTE((warn_unused_result));
+ virtual const std::string human_name() const PALUDIS_ATTRIBUTE((warn_unused_result));
+ virtual MetadataKeyType type() const PALUDIS_ATTRIBUTE((warn_unused_result));
+
+ virtual std::string pretty_print() const
+ PALUDIS_ATTRIBUTE((warn_unused_result));
+ };
+
+ template <typename C_>
class PALUDIS_VISIBLE FakeMetadataCollectionKey :
public MetadataCollectionKey<C_>,
private PrivateImplementationPattern<FakeMetadataCollectionKey<C_> >
@@ -282,6 +307,7 @@ namespace paludis
const std::tr1::shared_ptr<FakeMetadataSpecTreeKey<FetchableURISpecTree> > fetches_key();
const std::tr1::shared_ptr<FakeMetadataSpecTreeKey<SimpleURISpecTree> > homepage_key();
const std::tr1::shared_ptr<FakeMetadataChoicesKey> choices_key();
+ const std::tr1::shared_ptr<FakeMetadataValueKey<bool> > transient_key();
void set_slot(const SlotName &);