aboutsummaryrefslogtreecommitdiff
path: root/paludis/repositories/fake/fake_package_id.hh
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-12-30 22:48:34 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-01-01 03:57:53 +0000
commit3dd53676acf85d7b3d9758f2def081d20c00b3b9 (patch)
tree7214265998b38ce234a4198a4c2b9533aeea5f4d /paludis/repositories/fake/fake_package_id.hh
parentcdaf7c2138035625d99ee5be127f427943b66e09 (diff)
downloadpaludis-3dd53676acf85d7b3d9758f2def081d20c00b3b9.tar.gz
paludis-3dd53676acf85d7b3d9758f2def081d20c00b3b9.tar.xz
Better pretty printing mechanism
Diffstat (limited to 'paludis/repositories/fake/fake_package_id.hh')
-rw-r--r--paludis/repositories/fake/fake_package_id.hh46
1 files changed, 20 insertions, 26 deletions
diff --git a/paludis/repositories/fake/fake_package_id.hh b/paludis/repositories/fake/fake_package_id.hh
index ad2ecb354..fe27a4324 100644
--- a/paludis/repositories/fake/fake_package_id.hh
+++ b/paludis/repositories/fake/fake_package_id.hh
@@ -31,31 +31,6 @@ namespace paludis
class FakeRepositoryBase;
template <typename C_>
- class PALUDIS_VISIBLE FakeMetadataValueKey :
- public MetadataValueKey<C_>,
- private Pimp<FakeMetadataValueKey<C_> >
- {
- protected:
- typename Pimp<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 Pimp<FakeMetadataCollectionKey<C_> >
@@ -74,6 +49,10 @@ namespace paludis
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 const std::string pretty_print_value(
+ const PrettyPrinter &,
+ const PrettyPrintOptions &) const PALUDIS_ATTRIBUTE((warn_unused_result));
};
class PALUDIS_VISIBLE FakeMetadataKeywordSetKey :
@@ -87,6 +66,10 @@ namespace paludis
virtual std::string pretty_print_flat(const Formatter<KeywordName> &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
+
+ virtual const std::string pretty_print_value(
+ const PrettyPrinter &,
+ const PrettyPrintOptions &) const PALUDIS_ATTRIBUTE((warn_unused_result));
};
template <typename C_>
@@ -116,6 +99,10 @@ namespace paludis
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 const std::string pretty_print_value(
+ const PrettyPrinter &,
+ const PrettyPrintOptions &) const PALUDIS_ATTRIBUTE((warn_unused_result));
};
template <>
@@ -149,6 +136,10 @@ namespace paludis
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 const std::string pretty_print_value(
+ const PrettyPrinter &,
+ const PrettyPrintOptions &) const PALUDIS_ATTRIBUTE((warn_unused_result));
};
template <>
@@ -183,6 +174,10 @@ namespace paludis
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 const std::string pretty_print_value(
+ const PrettyPrinter &,
+ const PrettyPrintOptions &) const PALUDIS_ATTRIBUTE((warn_unused_result));
};
class PALUDIS_VISIBLE FakeMetadataChoicesKey :
@@ -307,7 +302,6 @@ namespace paludis
const std::shared_ptr<FakeMetadataSpecTreeKey<FetchableURISpecTree> > fetches_key();
const std::shared_ptr<FakeMetadataSpecTreeKey<SimpleURISpecTree> > homepage_key();
const std::shared_ptr<FakeMetadataChoicesKey> choices_key();
- const std::shared_ptr<FakeMetadataValueKey<long> > hitchhiker_key();
const std::shared_ptr<Set<std::string> > behaviours_set();