aboutsummaryrefslogtreecommitdiff
path: root/paludis/dep_label.hh
diff options
context:
space:
mode:
authorAvatar Stephen P. Bennett <spb@exherbo.org> 2007-09-07 20:53:51 +0000
committerAvatar Stephen P. Bennett <spb@exherbo.org> 2007-09-07 20:53:51 +0000
commit702c036aa4155f93007f628410ea612e946e0ef4 (patch)
treebd60f3f5ae5fb55f8b8bdb9ac5b065f31a449a45 /paludis/dep_label.hh
parentcbd0cba9208c2712506d35b74974ba61bbe78d1d (diff)
downloadpaludis-702c036aa4155f93007f628410ea612e946e0ef4.tar.gz
paludis-702c036aa4155f93007f628410ea612e946e0ef4.tar.xz
Initial (parser) support for dependency labels
Diffstat (limited to 'paludis/dep_label.hh')
-rw-r--r--paludis/dep_label.hh49
1 files changed, 49 insertions, 0 deletions
diff --git a/paludis/dep_label.hh b/paludis/dep_label.hh
index 22ae2019d..b48f7660c 100644
--- a/paludis/dep_label.hh
+++ b/paludis/dep_label.hh
@@ -42,6 +42,27 @@ namespace paludis
{
};
+ struct DependencyLabelVisitorTypes :
+ VisitorTypes<
+ DependencyLabelVisitorTypes,
+ DependencyLabel,
+ DependencyHostLabel,
+ DependencyTargetLabel,
+ DependencyBuildLabel,
+ DependencyRunLabel,
+ DependencyInstallLabel,
+ DependencyCompileLabel,
+ DependencySuggestedLabel,
+ DependencyRecommendedLabel,
+ DependencyRequiredLabel,
+ DependencyAnyLabel,
+ DependencyMineLabel,
+ DependencyPrimaryLabel,
+ DependencyABILabel
+ >
+ {
+ };
+
class PALUDIS_VISIBLE URILabel :
private InstantiationPolicy<URILabel, instantiation_method::NonCopyableTag>,
public virtual ConstAcceptInterface<URILabelVisitorTypes>
@@ -69,6 +90,34 @@ namespace paludis
typedef T_ Tag;
};
+
+ class PALUDIS_VISIBLE DependencyLabel :
+ private InstantiationPolicy<DependencyLabel, instantiation_method::NonCopyableTag>,
+ public virtual ConstAcceptInterface<DependencyLabelVisitorTypes>
+ {
+ public:
+ virtual ~DependencyLabel() = 0;
+
+ virtual const std::string text() const PALUDIS_ATTRIBUTE((warn_unused_result)) = 0;
+ };
+
+ template <typename T_>
+ class PALUDIS_VISIBLE ConcreteDependencyLabel :
+ public DependencyLabel,
+ public ConstAcceptInterfaceVisitsThis<DependencyLabelVisitorTypes, ConcreteDependencyLabel<T_> >,
+ private PrivateImplementationPattern<ConcreteDependencyLabel<T_> >
+ {
+ private:
+ using PrivateImplementationPattern<ConcreteDependencyLabel<T_> >::_imp;
+
+ public:
+ ConcreteDependencyLabel(const std::string &);
+ ~ConcreteDependencyLabel();
+
+ virtual const std::string text() const PALUDIS_ATTRIBUTE((warn_unused_result));
+
+ typedef T_ Tag;
+ };
}
#endif