aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-12-04 22:55:38 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-12-04 22:55:38 +0000
commitcd3a942035f61f0d42b743698209236c83747e78 (patch)
tree348ea8a63586db62ca47419596c4cccfbf4c1380
parent57211c15f04a7fd382263319a154a555c757f09f (diff)
downloadpaludis-cd3a942035f61f0d42b743698209236c83747e78.tar.gz
paludis-cd3a942035f61f0d42b743698209236c83747e78.tar.xz
RequiredUseSpecTree
-rw-r--r--paludis/spec_tree-fwd.hh8
-rw-r--r--paludis/spec_tree.cc52
-rw-r--r--paludis/spec_tree.hh2
-rw-r--r--python/dep_spec.cc12
-rw-r--r--python/nice_names.nn1
-rw-r--r--ruby/dep_spec.cc1
-rw-r--r--ruby/nice_names.nn1
7 files changed, 77 insertions, 0 deletions
diff --git a/paludis/spec_tree-fwd.hh b/paludis/spec_tree-fwd.hh
index f4da151..5a43da3 100644
--- a/paludis/spec_tree-fwd.hh
+++ b/paludis/spec_tree-fwd.hh
@@ -115,6 +115,14 @@ namespace paludis
typedef SpecTree<MakeTypeList<
SpecTreeLeafNodeType<PlainTextDepSpec>,
+ SpecTreeInnerNodeType<AllDepSpec>,
+ SpecTreeInnerNodeType<AnyDepSpec>,
+ SpecTreeInnerNodeType<ExactlyOneDepSpec>,
+ SpecTreeInnerNodeType<ConditionalDepSpec>
+ >::Type, AllDepSpec> RequiredUseSpecTree;
+
+ typedef SpecTree<MakeTypeList<
+ SpecTreeLeafNodeType<PlainTextDepSpec>,
SpecTreeLeafNodeType<PlainTextLabelDepSpec>,
SpecTreeInnerNodeType<AllDepSpec>,
SpecTreeInnerNodeType<ConditionalDepSpec>
diff --git a/paludis/spec_tree.cc b/paludis/spec_tree.cc
index 2166aba..51f1f60 100644
--- a/paludis/spec_tree.cc
+++ b/paludis/spec_tree.cc
@@ -227,6 +227,14 @@ template class SpecTree<MakeTypeList<
>::Type, AllDepSpec>;
template class SpecTree<MakeTypeList<
+ SpecTreeLeafNodeType<PlainTextDepSpec>,
+ SpecTreeInnerNodeType<AllDepSpec>,
+ SpecTreeInnerNodeType<AnyDepSpec>,
+ SpecTreeInnerNodeType<ExactlyOneDepSpec>,
+ SpecTreeInnerNodeType<ConditionalDepSpec>
+ >::Type, AllDepSpec>;
+
+template class SpecTree<MakeTypeList<
SpecTreeLeafNodeType<PackageDepSpec>,
SpecTreeLeafNodeType<BlockDepSpec>,
SpecTreeLeafNodeType<DependenciesLabelsDepSpec>,
@@ -377,6 +385,42 @@ template class LeafNode<PlainTextSpecTree, PlainTextLabelDepSpec>;
template class InnerNode<PlainTextSpecTree, AllDepSpec>;
template class InnerNode<PlainTextSpecTree, ConditionalDepSpec>;
+/* RequiredUseSpecTree */
+
+template const std::shared_ptr<RequiredUseSpecTree::NodeType<PlainTextDepSpec>::Type>
+ BasicInnerNode<RequiredUseSpecTree>::append<PlainTextDepSpec>(const std::shared_ptr<const PlainTextDepSpec> &);
+template const std::shared_ptr<RequiredUseSpecTree::NodeType<PlainTextDepSpec>::Type>
+ BasicInnerNode<RequiredUseSpecTree>::append<PlainTextDepSpec>(const std::shared_ptr<PlainTextDepSpec> &);
+
+template const std::shared_ptr<RequiredUseSpecTree::NodeType<AllDepSpec>::Type>
+ BasicInnerNode<RequiredUseSpecTree>::append<AllDepSpec>(const std::shared_ptr<const AllDepSpec> &);
+template const std::shared_ptr<RequiredUseSpecTree::NodeType<AllDepSpec>::Type>
+ BasicInnerNode<RequiredUseSpecTree>::append<AllDepSpec>(const std::shared_ptr<AllDepSpec> &);
+
+template const std::shared_ptr<RequiredUseSpecTree::NodeType<AnyDepSpec>::Type>
+ BasicInnerNode<RequiredUseSpecTree>::append<AnyDepSpec>(const std::shared_ptr<const AnyDepSpec> &);
+template const std::shared_ptr<RequiredUseSpecTree::NodeType<AnyDepSpec>::Type>
+ BasicInnerNode<RequiredUseSpecTree>::append<AnyDepSpec>(const std::shared_ptr<AnyDepSpec> &);
+
+template const std::shared_ptr<RequiredUseSpecTree::NodeType<ExactlyOneDepSpec>::Type>
+ BasicInnerNode<RequiredUseSpecTree>::append<ExactlyOneDepSpec>(const std::shared_ptr<const ExactlyOneDepSpec> &);
+template const std::shared_ptr<RequiredUseSpecTree::NodeType<ExactlyOneDepSpec>::Type>
+ BasicInnerNode<RequiredUseSpecTree>::append<ExactlyOneDepSpec>(const std::shared_ptr<ExactlyOneDepSpec> &);
+
+template const std::shared_ptr<RequiredUseSpecTree::NodeType<ConditionalDepSpec>::Type>
+ BasicInnerNode<RequiredUseSpecTree>::append<ConditionalDepSpec>(const std::shared_ptr<const ConditionalDepSpec> &);
+template const std::shared_ptr<RequiredUseSpecTree::NodeType<ConditionalDepSpec>::Type>
+ BasicInnerNode<RequiredUseSpecTree>::append<ConditionalDepSpec>(const std::shared_ptr<ConditionalDepSpec> &);
+
+template class BasicInnerNode<RequiredUseSpecTree>;
+template class WrappedForwardIterator<BasicInnerNode<RequiredUseSpecTree>::ConstIteratorTag,
+ const std::shared_ptr<const BasicNode<RequiredUseSpecTree> > >;
+template class LeafNode<RequiredUseSpecTree, PlainTextDepSpec>;
+template class InnerNode<RequiredUseSpecTree, AllDepSpec>;
+template class InnerNode<RequiredUseSpecTree, AnyDepSpec>;
+template class InnerNode<RequiredUseSpecTree, ExactlyOneDepSpec>;
+template class InnerNode<RequiredUseSpecTree, ConditionalDepSpec>;
+
/* ProvideSpecTree */
template const std::shared_ptr<ProvideSpecTree::NodeType<PackageDepSpec>::Type>
@@ -536,6 +580,14 @@ template InnerNode<PlainTextSpecTree, ConditionalDepSpec>::operator InnerNode<Ge
template LeafNode<PlainTextSpecTree, PlainTextDepSpec>::operator LeafNode<GenericSpecTree, PlainTextDepSpec> () const;
template LeafNode<PlainTextSpecTree, PlainTextLabelDepSpec>::operator LeafNode<GenericSpecTree, PlainTextLabelDepSpec> () const;
+/* RequiredUseSpecTree -> GenericSpecTree */
+
+template InnerNode<RequiredUseSpecTree, AllDepSpec>::operator InnerNode<GenericSpecTree, AllDepSpec> () const;
+template InnerNode<RequiredUseSpecTree, AnyDepSpec>::operator InnerNode<GenericSpecTree, AnyDepSpec> () const;
+template InnerNode<RequiredUseSpecTree, ExactlyOneDepSpec>::operator InnerNode<GenericSpecTree, ExactlyOneDepSpec> () const;
+template InnerNode<RequiredUseSpecTree, ConditionalDepSpec>::operator InnerNode<GenericSpecTree, ConditionalDepSpec> () const;
+template LeafNode<RequiredUseSpecTree, PlainTextDepSpec>::operator LeafNode<GenericSpecTree, PlainTextDepSpec> () const;
+
/* ProvideSpecTree -> GenericSpecTree */
template InnerNode<ProvideSpecTree, AllDepSpec>::operator InnerNode<GenericSpecTree, AllDepSpec> () const;
diff --git a/paludis/spec_tree.hh b/paludis/spec_tree.hh
index f9c405a..1a32b7e 100644
--- a/paludis/spec_tree.hh
+++ b/paludis/spec_tree.hh
@@ -211,6 +211,8 @@ namespace paludis
const std::shared_ptr<const spec_tree_internals::BasicNode<SetSpecTree> > >;
extern template class WrappedForwardIterator<spec_tree_internals::BasicInnerNode<PlainTextSpecTree>::ConstIteratorTag,
const std::shared_ptr<const spec_tree_internals::BasicNode<PlainTextSpecTree> > >;
+ extern template class WrappedForwardIterator<spec_tree_internals::BasicInnerNode<RequiredUseSpecTree>::ConstIteratorTag,
+ const std::shared_ptr<const spec_tree_internals::BasicNode<RequiredUseSpecTree> > >;
extern template class WrappedForwardIterator<spec_tree_internals::BasicInnerNode<ProvideSpecTree>::ConstIteratorTag,
const std::shared_ptr<const spec_tree_internals::BasicNode<ProvideSpecTree> > >;
extern template class WrappedForwardIterator<spec_tree_internals::BasicInnerNode<SimpleURISpecTree>::ConstIteratorTag,
diff --git a/python/dep_spec.cc b/python/dep_spec.cc
index a631f58..a427307 100644
--- a/python/dep_spec.cc
+++ b/python/dep_spec.cc
@@ -686,6 +686,16 @@ struct AllowedTypes<PlainTextSpecTree>
};
template<>
+struct AllowedTypes<RequiredUseSpecTree>
+{
+ AllowedTypes(const AllDepSpec &) {};
+ AllowedTypes(const AnyDepSpec &) {};
+ AllowedTypes(const ExactlyOneDepSpec &) {};
+ AllowedTypes(const ConditionalDepSpec &) {};
+ AllowedTypes(const PlainTextDepSpec &) {};
+};
+
+template<>
struct AllowedTypes<DependencySpecTree>
{
AllowedTypes(const AllDepSpec &) {};
@@ -1089,6 +1099,7 @@ void expose_dep_spec()
RegisterSpecTreeToPython<DependencySpecTree>();
RegisterSpecTreeToPython<ProvideSpecTree>();
RegisterSpecTreeToPython<PlainTextSpecTree>();
+ RegisterSpecTreeToPython<RequiredUseSpecTree>();
RegisterSpecTreeToPython<FetchableURISpecTree>();
RegisterSpecTreeToPython<SimpleURISpecTree>();
RegisterSpecTreeToPython<LicenseSpecTree>();
@@ -1097,6 +1108,7 @@ void expose_dep_spec()
RegisterSpecTreeSharedPtrFromPython<DependencySpecTree>();
RegisterSpecTreeSharedPtrFromPython<ProvideSpecTree>();
RegisterSpecTreeSharedPtrFromPython<PlainTextSpecTree>();
+ RegisterSpecTreeSharedPtrFromPython<RequiredUseSpecTree>();
RegisterSpecTreeSharedPtrFromPython<FetchableURISpecTree>();
RegisterSpecTreeSharedPtrFromPython<SimpleURISpecTree>();
RegisterSpecTreeSharedPtrFromPython<LicenseSpecTree>();
diff --git a/python/nice_names.nn b/python/nice_names.nn
index 5ef30e6..8473eed 100644
--- a/python/nice_names.nn
+++ b/python/nice_names.nn
@@ -43,6 +43,7 @@ make_nn_NiceNames() {
name "SimpleURISpecTree"
name "ProvideSpecTree"
name "PlainTextSpecTree"
+ name "RequiredUseSpecTree"
name "DependencySpecTree"
name "SetSpecTree"
diff --git a/ruby/dep_spec.cc b/ruby/dep_spec.cc
index 1550683..0350e82 100644
--- a/ruby/dep_spec.cc
+++ b/ruby/dep_spec.cc
@@ -1472,6 +1472,7 @@ template VALUE paludis::ruby::dep_tree_to_value<DependencySpecTree> (const std::
template VALUE paludis::ruby::dep_tree_to_value<FetchableURISpecTree> (const std::shared_ptr<const FetchableURISpecTree> &);
template VALUE paludis::ruby::dep_tree_to_value<SimpleURISpecTree> (const std::shared_ptr<const SimpleURISpecTree> &);
template VALUE paludis::ruby::dep_tree_to_value<PlainTextSpecTree> (const std::shared_ptr<const PlainTextSpecTree> &);
+template VALUE paludis::ruby::dep_tree_to_value<RequiredUseSpecTree> (const std::shared_ptr<const RequiredUseSpecTree> &);
template VALUE paludis::ruby::dep_tree_to_value<ProvideSpecTree> (const std::shared_ptr<const ProvideSpecTree> &);
template VALUE paludis::ruby::dep_tree_to_value<LicenseSpecTree> (const std::shared_ptr<const LicenseSpecTree> &);
diff --git a/ruby/nice_names.nn b/ruby/nice_names.nn
index 3752a25..55abea2 100644
--- a/ruby/nice_names.nn
+++ b/ruby/nice_names.nn
@@ -40,6 +40,7 @@ make_nn_NiceNames() {
name "SimpleURISpecTree"
name "ProvideSpecTree"
name "PlainTextSpecTree"
+ name "RequiredUseSpecTree"
name "DependencySpecTree"
name "SetSpecTree"
}