aboutsummaryrefslogtreecommitdiff
path: root/paludis/resolver/labels_classifier.hh
diff options
context:
space:
mode:
Diffstat (limited to 'paludis/resolver/labels_classifier.hh')
-rw-r--r--paludis/resolver/labels_classifier.hh61
1 files changed, 40 insertions, 21 deletions
diff --git a/paludis/resolver/labels_classifier.hh b/paludis/resolver/labels_classifier.hh
index 797b4d621..75c1f47d4 100644
--- a/paludis/resolver/labels_classifier.hh
+++ b/paludis/resolver/labels_classifier.hh
@@ -29,28 +29,50 @@ namespace paludis
{
namespace resolver
{
- class LabelsClassifier
+ struct LabelsClassifier
{
- private:
- Pimp<LabelsClassifier> _imp;
+ LabelsClassifier(
+ bool any_enabled,
+ bool includes_buildish,
+ bool includes_compile_against,
+ bool includes_fetch,
+ bool includes_non_post_runish,
+ bool includes_non_test_buildish,
+ bool includes_post,
+ bool includes_postish,
+ bool is_recommendation,
+ bool is_requirement,
+ bool is_suggestion
+ );
- public:
- LabelsClassifier(const Environment * const, const std::shared_ptr<const PackageID> &);
- ~LabelsClassifier();
+ bool any_enabled;
+
+ bool includes_buildish;
+ bool includes_compile_against;
+ bool includes_fetch;
+ bool includes_non_post_runish;
+ bool includes_non_test_buildish;
+ bool includes_post;
+ bool includes_postish;
+
+ bool is_recommendation;
+ bool is_requirement;
+ bool is_suggestion;
+
+ void serialise(Serialiser &) const;
- bool any_enabled;
+ static const std::shared_ptr<const LabelsClassifier> deserialise(
+ Deserialisation & d) PALUDIS_ATTRIBUTE((warn_unused_result));
+ };
- bool includes_buildish;
- bool includes_compile_against;
- bool includes_fetch;
- bool includes_non_post_runish;
- bool includes_non_test_buildish;
- bool includes_post;
- bool includes_postish;
+ class LabelsClassifierBuilder
+ {
+ private:
+ Pimp<LabelsClassifierBuilder> _imp;
- bool is_recommendation;
- bool is_requirement;
- bool is_suggestion;
+ public:
+ LabelsClassifierBuilder(const Environment * const, const std::shared_ptr<const PackageID> &);
+ ~LabelsClassifierBuilder();
void visit(const DependenciesBuildLabel &);
void visit(const DependenciesCompileAgainstLabel &);
@@ -62,10 +84,7 @@ namespace paludis
void visit(const DependenciesSuggestionLabel &);
void visit(const DependenciesTestLabel &);
- void serialise(Serialiser &) const;
-
- static const std::shared_ptr<LabelsClassifier> deserialise(
- Deserialisation & d) PALUDIS_ATTRIBUTE((warn_unused_result));
+ const std::shared_ptr<const LabelsClassifier> create() const PALUDIS_ATTRIBUTE((warn_unused_result));
};
}
}