diff options
Diffstat (limited to 'paludis')
-rw-r--r-- | paludis/dep_spec.cc | 12 | ||||
-rw-r--r-- | paludis/dep_spec.hh | 20 |
2 files changed, 30 insertions, 2 deletions
diff --git a/paludis/dep_spec.cc b/paludis/dep_spec.cc index 10482c889..f6acb350b 100644 --- a/paludis/dep_spec.cc +++ b/paludis/dep_spec.cc @@ -224,6 +224,18 @@ BlockDepSpec::BlockDepSpec(const BlockDepSpec & other) : set_annotations(other.maybe_annotations()); } +const std::shared_ptr<const DepSpecAnnotations> +BlockDepSpec::maybe_annotations() const +{ + return _spec.maybe_annotations(); +} + +void +BlockDepSpec::set_annotations(const std::shared_ptr<const DepSpecAnnotations> & anno) +{ + _spec.set_annotations(anno); +} + std::ostream & paludis::operator<< (std::ostream & s, const PlainTextDepSpec & a) { diff --git a/paludis/dep_spec.hh b/paludis/dep_spec.hh index 68b5c70e1..07a307683 100644 --- a/paludis/dep_spec.hh +++ b/paludis/dep_spec.hh @@ -88,14 +88,14 @@ namespace paludis * * \since 0.58 */ - const std::shared_ptr<const DepSpecAnnotations> maybe_annotations() const PALUDIS_ATTRIBUTE((warn_unused_result)); + virtual const std::shared_ptr<const DepSpecAnnotations> maybe_annotations() const PALUDIS_ATTRIBUTE((warn_unused_result)); /** * Change our annotations, may be null. * * \since 0.58 */ - void set_annotations(const std::shared_ptr<const DepSpecAnnotations> &); + virtual void set_annotations(const std::shared_ptr<const DepSpecAnnotations> &); }; /** @@ -601,6 +601,22 @@ namespace paludis */ const PackageDepSpec blocking() const PALUDIS_ATTRIBUTE((warn_unused_result)); + /** + * Our annotations, may be null. Forwards to the + * underlying PackageDepSpec. + * + * \since 0.73 + */ + virtual const std::shared_ptr<const DepSpecAnnotations> maybe_annotations() const PALUDIS_ATTRIBUTE((warn_unused_result)); + + /** + * Change our annotations, may be null. Forwards to the + * underlying PackageDepSpec. + * + * \since 0.73 + */ + virtual void set_annotations(const std::shared_ptr<const DepSpecAnnotations> &); + virtual std::shared_ptr<DepSpec> clone() const PALUDIS_ATTRIBUTE((warn_unused_result)); }; |