aboutsummaryrefslogtreecommitdiff
path: root/paludis/repositories/e/info_metadata_key.hh
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2008-07-11 03:06:09 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2008-07-11 03:06:09 +0100
commitb55f8208939c94c4cb723a151061ca09dc7ea7c4 (patch)
tree2b108491d87e3cac35bcec87f00bb2194a0756a1 /paludis/repositories/e/info_metadata_key.hh
parent7ce03892066f69d3bf0be2e942d2a0e0e1932345 (diff)
downloadpaludis-b55f8208939c94c4cb723a151061ca09dc7ea7c4.tar.gz
paludis-b55f8208939c94c4cb723a151061ca09dc7ea7c4.tar.xz
Reduce E interface. Refactor and exheresify info pkgs, vars.
Exheres now uses metadata/info/{packages,variables}.conf.
Diffstat (limited to 'paludis/repositories/e/info_metadata_key.hh')
-rw-r--r--paludis/repositories/e/info_metadata_key.hh55
1 files changed, 55 insertions, 0 deletions
diff --git a/paludis/repositories/e/info_metadata_key.hh b/paludis/repositories/e/info_metadata_key.hh
new file mode 100644
index 000000000..3ebfe2f3e
--- /dev/null
+++ b/paludis/repositories/e/info_metadata_key.hh
@@ -0,0 +1,55 @@
+/* vim: set sw=4 sts=4 et foldmethod=syntax : */
+
+#ifndef PALUDIS_GUARD_PALUDIS_REPOSITORIES_E_INFO_METADATA_KEY_HH
+#define PALUDIS_GUARD_PALUDIS_REPOSITORIES_E_INFO_METADATA_KEY_HH 1
+
+#include <paludis/metadata_key.hh>
+#include <paludis/environment-fwd.hh>
+#include <paludis/util/fs_entry-fwd.hh>
+#include <paludis/util/set.hh>
+#include <paludis/util/private_implementation_pattern.hh>
+
+namespace paludis
+{
+ namespace erepository
+ {
+ class InfoPkgsMetadataKey :
+ public MetadataSectionKey,
+ private PrivateImplementationPattern<InfoPkgsMetadataKey>
+ {
+ private:
+ PrivateImplementationPattern<InfoPkgsMetadataKey>::ImpPtr & _imp;
+
+ protected:
+ virtual void need_keys_added() const;
+
+ public:
+ InfoPkgsMetadataKey(const Environment * const e,
+ const std::tr1::shared_ptr<const FSEntrySequence> & f, const std::string & p);
+ ~InfoPkgsMetadataKey();
+ };
+
+ class InfoVarsMetadataKey :
+ public MetadataCollectionKey<Set<std::string> >,
+ private PrivateImplementationPattern<InfoVarsMetadataKey>
+ {
+ private:
+ PrivateImplementationPattern<InfoVarsMetadataKey>::ImpPtr & _imp;
+
+ public:
+ InfoVarsMetadataKey(const std::tr1::shared_ptr<const FSEntrySequence> &);
+ ~InfoVarsMetadataKey();
+
+ const std::tr1::shared_ptr<const Set<std::string> > value() const;
+
+ std::string pretty_print_flat(const Formatter<std::string> &) const;
+ };
+ }
+
+#ifdef PALUDIS_HAVE_EXTERN_TEMPLATE
+ extern template class PrivateImplementationPattern<erepository::InfoPkgsMetadataKey>;
+ extern template class PrivateImplementationPattern<erepository::InfoVarsMetadataKey>;
+#endif
+}
+
+#endif