00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef PALUDIS_GUARD_PALUDIS_DEP_LABEL_HH
00021 #define PALUDIS_GUARD_PALUDIS_DEP_LABEL_HH 1
00022
00023 #include <paludis/dep_label-fwd.hh>
00024 #include <paludis/dep_spec-fwd.hh>
00025 #include <paludis/util/simple_visitor.hh>
00026 #include <paludis/util/instantiation_policy.hh>
00027 #include <paludis/util/private_implementation_pattern.hh>
00028 #include <paludis/util/attributes.hh>
00029 #include <paludis/util/type_list.hh>
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044 namespace paludis
00045 {
00046
00047
00048
00049
00050
00051
00052
00053 class PALUDIS_VISIBLE URILabel :
00054 private InstantiationPolicy<URILabel, instantiation_method::NonCopyableTag>,
00055 public virtual DeclareAbstractAcceptMethods<URILabel, MakeTypeList<
00056 URIMirrorsThenListedLabel, URIMirrorsOnlyLabel, URIListedOnlyLabel, URIListedThenMirrorsLabel,
00057 URILocalMirrorsOnlyLabel, URIManualOnlyLabel>::Type>
00058 {
00059 public:
00060
00061
00062
00063 virtual ~URILabel() = 0;
00064
00065
00066
00067
00068 virtual const std::string text() const PALUDIS_ATTRIBUTE((warn_unused_result)) = 0;
00069 };
00070
00071
00072
00073
00074
00075
00076
00077
00078 template <typename T_>
00079 class PALUDIS_VISIBLE ConcreteURILabel :
00080 public URILabel,
00081 public ImplementAcceptMethods<URILabel, ConcreteURILabel<T_> >,
00082 private PrivateImplementationPattern<ConcreteURILabel<T_> >
00083 {
00084 private:
00085 using PrivateImplementationPattern<ConcreteURILabel<T_> >::_imp;
00086
00087 public:
00088
00089
00090
00091 ConcreteURILabel(const std::string &);
00092 ~ConcreteURILabel();
00093
00094
00095
00096 virtual const std::string text() const PALUDIS_ATTRIBUTE((warn_unused_result));
00097
00098
00099 typedef T_ Tag;
00100 };
00101
00102
00103
00104
00105
00106
00107
00108
00109 class PALUDIS_VISIBLE DependencyLabel :
00110 private InstantiationPolicy<DependencyLabel, instantiation_method::NonCopyableTag>,
00111 public virtual DeclareAbstractAcceptMethods<DependencyLabel, MakeTypeList<
00112 DependencySystemLabel, DependencyTypeLabel, DependencySuggestLabel, DependencyABIsLabel>::Type>
00113 {
00114 public:
00115
00116
00117
00118 virtual ~DependencyLabel() = 0;
00119
00120
00121
00122
00123 virtual const std::string text() const PALUDIS_ATTRIBUTE((warn_unused_result)) = 0;
00124 };
00125
00126
00127
00128
00129
00130
00131
00132
00133 struct PALUDIS_VISIBLE DependencySystemLabel :
00134 public DependencyLabel,
00135 public ImplementAcceptMethods<DependencyLabel, DependencySystemLabel>,
00136 public virtual DeclareAbstractAcceptMethods<DependencySystemLabel, MakeTypeList<
00137 DependencyHostLabel, DependencyTargetLabel>::Type>
00138 {
00139 typedef DeclareAbstractAcceptMethods<DependencySystemLabel, MakeTypeList<
00140 DependencyHostLabel, DependencyTargetLabel>::Type>::VisitableTypeList VisitableTypeList;
00141
00142 using DeclareAbstractAcceptMethods<DependencySystemLabel, MakeTypeList<
00143 DependencyHostLabel, DependencyTargetLabel>::Type>::accept;
00144 using DeclareAbstractAcceptMethods<DependencySystemLabel, MakeTypeList<
00145 DependencyHostLabel, DependencyTargetLabel>::Type>::accept_returning;
00146 };
00147
00148
00149
00150
00151
00152
00153
00154
00155 struct PALUDIS_VISIBLE DependencyTypeLabel :
00156 public DependencyLabel,
00157 public ImplementAcceptMethods<DependencyLabel, DependencyTypeLabel>,
00158 public virtual DeclareAbstractAcceptMethods<DependencyTypeLabel, MakeTypeList<
00159 DependencyBuildLabel, DependencyRunLabel, DependencyPostLabel, DependencyInstallLabel,
00160 DependencyCompileLabel>::Type>
00161 {
00162 typedef DeclareAbstractAcceptMethods<DependencyTypeLabel, MakeTypeList<
00163 DependencyBuildLabel, DependencyRunLabel, DependencyPostLabel, DependencyInstallLabel,
00164 DependencyCompileLabel>::Type>::VisitableTypeList VisitableTypeList;
00165
00166 using DeclareAbstractAcceptMethods<DependencyTypeLabel, MakeTypeList<
00167 DependencyBuildLabel, DependencyRunLabel, DependencyPostLabel, DependencyInstallLabel,
00168 DependencyCompileLabel>::Type>::accept;
00169 using DeclareAbstractAcceptMethods<DependencyTypeLabel, MakeTypeList<
00170 DependencyBuildLabel, DependencyRunLabel, DependencyPostLabel, DependencyInstallLabel,
00171 DependencyCompileLabel>::Type>::accept_returning;
00172 };
00173
00174
00175
00176
00177
00178
00179
00180
00181 struct PALUDIS_VISIBLE DependencySuggestLabel :
00182 public DependencyLabel,
00183 public ImplementAcceptMethods<DependencyLabel, DependencySuggestLabel>,
00184 public virtual DeclareAbstractAcceptMethods<DependencySuggestLabel, MakeTypeList<
00185 DependencySuggestedLabel, DependencyRecommendedLabel, DependencyRequiredLabel>::Type>
00186 {
00187 typedef DeclareAbstractAcceptMethods<DependencySuggestLabel, MakeTypeList<
00188 DependencySuggestedLabel, DependencyRecommendedLabel,
00189 DependencyRequiredLabel>::Type>::VisitableTypeList VisitableTypeList;
00190
00191 using DeclareAbstractAcceptMethods<DependencySuggestLabel, MakeTypeList<
00192 DependencySuggestedLabel, DependencyRecommendedLabel,
00193 DependencyRequiredLabel>::Type>::accept;
00194 using DeclareAbstractAcceptMethods<DependencySuggestLabel, MakeTypeList<
00195 DependencySuggestedLabel, DependencyRecommendedLabel,
00196 DependencyRequiredLabel>::Type>::accept_returning;
00197 };
00198
00199
00200
00201
00202
00203
00204
00205
00206 struct PALUDIS_VISIBLE DependencyABIsLabel :
00207 public DependencyLabel,
00208 public ImplementAcceptMethods<DependencyLabel, DependencyABIsLabel>,
00209 public virtual DeclareAbstractAcceptMethods<DependencyABIsLabel, MakeTypeList<
00210 DependencyAnyLabel, DependencyMineLabel, DependencyPrimaryLabel, DependencyABILabel>::Type>
00211 {
00212 typedef DeclareAbstractAcceptMethods<DependencyABIsLabel, MakeTypeList<
00213 DependencyAnyLabel, DependencyMineLabel, DependencyPrimaryLabel,
00214 DependencyABILabel>::Type>::VisitableTypeList VisitableTypeList;
00215
00216 using DeclareAbstractAcceptMethods<DependencyABIsLabel, MakeTypeList<
00217 DependencyAnyLabel, DependencyMineLabel, DependencyPrimaryLabel,
00218 DependencyABILabel>::Type>::accept;
00219 using DeclareAbstractAcceptMethods<DependencyABIsLabel, MakeTypeList<
00220 DependencyAnyLabel, DependencyMineLabel, DependencyPrimaryLabel,
00221 DependencyABILabel>::Type>::accept_returning;
00222 };
00223
00224
00225
00226
00227
00228
00229
00230
00231 template <typename T_, typename C_>
00232 class PALUDIS_VISIBLE ConcreteDependencyLabel :
00233 public C_,
00234 public ImplementAcceptMethods<C_, ConcreteDependencyLabel<T_, C_> >,
00235 private PrivateImplementationPattern<ConcreteDependencyLabel<T_, C_> >
00236 {
00237 private:
00238 using PrivateImplementationPattern<ConcreteDependencyLabel<T_, C_> >::_imp;
00239
00240 public:
00241
00242
00243
00244 ConcreteDependencyLabel(const std::string &);
00245 ~ConcreteDependencyLabel();
00246
00247
00248
00249 virtual const std::string text() const PALUDIS_ATTRIBUTE((warn_unused_result));
00250
00251
00252 typedef T_ Tag;
00253 };
00254
00255
00256
00257
00258
00259
00260
00261 class PALUDIS_VISIBLE ActiveDependencyLabels :
00262 private PrivateImplementationPattern<ActiveDependencyLabels>
00263 {
00264 public:
00265
00266
00267
00268 ActiveDependencyLabels(const DependencyLabelsDepSpec &);
00269 ActiveDependencyLabels(const DependencyLabelSequence &);
00270 ActiveDependencyLabels(const ActiveDependencyLabels &);
00271 ActiveDependencyLabels(const ActiveDependencyLabels &, const DependencyLabelsDepSpec &);
00272 ~ActiveDependencyLabels();
00273
00274 ActiveDependencyLabels & operator= (const ActiveDependencyLabels &);
00275
00276
00277
00278
00279
00280
00281 const std::tr1::shared_ptr<const DependencySystemLabelSequence> system_labels() const PALUDIS_ATTRIBUTE((warn_unused_result));
00282 const std::tr1::shared_ptr<const DependencyTypeLabelSequence> type_labels() const PALUDIS_ATTRIBUTE((warn_unused_result));
00283 const std::tr1::shared_ptr<const DependencyABIsLabelSequence> abi_labels() const PALUDIS_ATTRIBUTE((warn_unused_result));
00284 const std::tr1::shared_ptr<const DependencySuggestLabelSequence> suggest_labels() const PALUDIS_ATTRIBUTE((warn_unused_result));
00285
00286
00287 };
00288
00289 #ifdef PALUDIS_HAVE_EXTERN_TEMPLATE
00290 extern template class InstantiationPolicy<DependencyLabel, instantiation_method::NonCopyableTag>;
00291 extern template class InstantiationPolicy<URILabel, instantiation_method::NonCopyableTag>;
00292
00293 extern template class ConcreteDependencyLabel<DependencyHostLabelTag, DependencySystemLabel>;
00294 extern template class ConcreteDependencyLabel<DependencyTargetLabelTag, DependencySystemLabel>;
00295 extern template class ConcreteDependencyLabel<DependencyBuildLabelTag, DependencyTypeLabel>;
00296 extern template class ConcreteDependencyLabel<DependencyRunLabelTag, DependencyTypeLabel>;
00297 extern template class ConcreteDependencyLabel<DependencyPostLabelTag, DependencyTypeLabel>;
00298 extern template class ConcreteDependencyLabel<DependencyInstallLabelTag, DependencyTypeLabel>;
00299 extern template class ConcreteDependencyLabel<DependencyCompileLabelTag, DependencyTypeLabel>;
00300 extern template class ConcreteDependencyLabel<DependencySuggestedLabelTag, DependencySuggestLabel>;
00301 extern template class ConcreteDependencyLabel<DependencyRecommendedLabelTag, DependencySuggestLabel>;
00302 extern template class ConcreteDependencyLabel<DependencyRequiredLabelTag, DependencySuggestLabel>;
00303 extern template class ConcreteDependencyLabel<DependencyAnyLabelTag, DependencyABIsLabel>;
00304 extern template class ConcreteDependencyLabel<DependencyMineLabelTag, DependencyABIsLabel>;
00305 extern template class ConcreteDependencyLabel<DependencyPrimaryLabelTag, DependencyABIsLabel>;
00306 extern template class ConcreteDependencyLabel<DependencyABILabelTag, DependencyABIsLabel>;
00307
00308 extern template class ConcreteURILabel<URIMirrorsThenListedLabelTag>;
00309 extern template class ConcreteURILabel<URIMirrorsOnlyLabelTag>;
00310 extern template class ConcreteURILabel<URIListedOnlyLabelTag>;
00311 extern template class ConcreteURILabel<URIListedThenMirrorsLabelTag>;
00312 extern template class ConcreteURILabel<URILocalMirrorsOnlyLabelTag>;
00313 extern template class ConcreteURILabel<URIManualOnlyLabelTag>;
00314
00315 extern template class PrivateImplementationPattern<ConcreteURILabel<URIMirrorsThenListedLabel> >;
00316 extern template class PrivateImplementationPattern<ConcreteURILabel<URIMirrorsOnlyLabel> >;
00317 extern template class PrivateImplementationPattern<ConcreteURILabel<URIListedOnlyLabel> >;
00318 extern template class PrivateImplementationPattern<ConcreteURILabel<URIListedThenMirrorsLabel> >;
00319 extern template class PrivateImplementationPattern<ConcreteURILabel<URILocalMirrorsOnlyLabel> >;
00320 extern template class PrivateImplementationPattern<ConcreteURILabel<URIManualOnlyLabel> >;
00321
00322 extern template class PrivateImplementationPattern<ConcreteDependencyLabel<DependencyHostLabelTag, DependencySystemLabel> >;
00323 extern template class PrivateImplementationPattern<ConcreteDependencyLabel<DependencyTargetLabelTag, DependencySystemLabel> >;
00324 extern template class PrivateImplementationPattern<ConcreteDependencyLabel<DependencyBuildLabelTag, DependencyTypeLabel> >;
00325 extern template class PrivateImplementationPattern<ConcreteDependencyLabel<DependencyRunLabelTag, DependencyTypeLabel> >;
00326 extern template class PrivateImplementationPattern<ConcreteDependencyLabel<DependencyPostLabelTag, DependencyTypeLabel> >;
00327 extern template class PrivateImplementationPattern<ConcreteDependencyLabel<DependencyInstallLabelTag, DependencyTypeLabel> >;
00328 extern template class PrivateImplementationPattern<ConcreteDependencyLabel<DependencyCompileLabelTag, DependencyTypeLabel> >;
00329 extern template class PrivateImplementationPattern<ConcreteDependencyLabel<DependencySuggestedLabelTag, DependencySuggestLabel> >;
00330 extern template class PrivateImplementationPattern<ConcreteDependencyLabel<DependencyRecommendedLabelTag, DependencySuggestLabel> >;
00331 extern template class PrivateImplementationPattern<ConcreteDependencyLabel<DependencyRequiredLabelTag, DependencySuggestLabel> >;
00332 extern template class PrivateImplementationPattern<ConcreteDependencyLabel<DependencyAnyLabelTag, DependencyABIsLabel> >;
00333 extern template class PrivateImplementationPattern<ConcreteDependencyLabel<DependencyMineLabelTag, DependencyABIsLabel> >;
00334 extern template class PrivateImplementationPattern<ConcreteDependencyLabel<DependencyPrimaryLabelTag, DependencyABIsLabel> >;
00335 extern template class PrivateImplementationPattern<ConcreteDependencyLabel<DependencyABILabelTag, DependencyABIsLabel> >;
00336
00337 extern template class PrivateImplementationPattern<ActiveDependencyLabels>;
00338 #endif
00339 }
00340
00341 #endif