aboutsummaryrefslogtreecommitdiff
path: root/paludis/repositories/e/info_metadata_key.hh
blob: 3ebfe2f3e131998143844ac8f0f19d8bf49738ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
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