aboutsummaryrefslogtreecommitdiff
path: root/paludis/repositories/e/info_metadata_key.hh
blob: c988eaadcdbbb7ae7d96d4fc5537d5dfca76faf7 (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
56
57
58
59
60
61
62
63
/* 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/set.hh>
#include <paludis/util/pimp.hh>

namespace paludis
{
    struct ERepository;

    namespace erepository
    {
        class InfoPkgsMetadataKey :
            public MetadataSectionKey
        {
            private:
                Pimp<InfoPkgsMetadataKey> _imp;

            protected:
                virtual void need_keys_added() const;

            public:
                InfoPkgsMetadataKey(const Environment * const e,
                        const std::shared_ptr<const FSPathSequence> & f,
                        const ERepository * const);
                ~InfoPkgsMetadataKey();

                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));
        };

        class InfoVarsMetadataKey :
            public MetadataCollectionKey<Set<std::string> >
        {
            private:
                Pimp<InfoVarsMetadataKey> _imp;

            public:
                InfoVarsMetadataKey(const std::shared_ptr<const FSPathSequence> &);
                ~InfoVarsMetadataKey();

                const std::shared_ptr<const Set<std::string> > parse_value() const;

                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));
        };
    }

    extern template class Pimp<erepository::InfoPkgsMetadataKey>;
    extern template class Pimp<erepository::InfoVarsMetadataKey>;
}

#endif