aboutsummaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-09-04 23:30:07 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-09-04 23:30:07 +0100
commit27d57d9ed2f2a24a86b91029638563cd8ccfabab (patch)
treecc8bd72c1be1741d3206735ca591bffac9c49d75 /python
parentb5280212886a3a31703600c12608c5a5a8be5555 (diff)
downloadpaludis-27d57d9ed2f2a24a86b91029638563cd8ccfabab.tar.gz
paludis-27d57d9ed2f2a24a86b91029638563cd8ccfabab.tar.xz
Contents is not a MetadataKey
Diffstat (limited to 'python')
-rw-r--r--python/metadata_key.cc92
1 files changed, 0 insertions, 92 deletions
diff --git a/python/metadata_key.cc b/python/metadata_key.cc
index 4b362836c..a41f1f65b 100644
--- a/python/metadata_key.cc
+++ b/python/metadata_key.cc
@@ -75,11 +75,6 @@ class MetadataKeySptrToPythonVisitor
obj = bp::object(std::static_pointer_cast<const MetadataTimeKey>(_m_ptr));
}
- void visit(const MetadataValueKey<std::shared_ptr<const Contents> > & k)
- {
- obj = bp::object(std::static_pointer_cast<const MetadataValueKey<std::shared_ptr<const Contents> > >(_m_ptr));
- }
-
void visit(const MetadataValueKey<std::shared_ptr<const Choices> > & k)
{
obj = bp::object(std::static_pointer_cast<const MetadataValueKey<std::shared_ptr<const Choices> > >(_m_ptr));
@@ -428,52 +423,6 @@ struct MetadataTimeKeyWrapper :
}
};
-struct MetadataContentsKeyWrapper :
- MetadataValueKey<std::shared_ptr<const Contents> > ,
- bp::wrapper<MetadataValueKey<std::shared_ptr<const Contents> > >
-{
- virtual const std::shared_ptr<const Contents> parse_value() const
- PALUDIS_ATTRIBUTE((warn_unused_result))
- {
- Lock l(get_mutex());
-
- if (bp::override f = get_override("parse_value"))
- return f();
- else
- throw PythonMethodNotImplemented("MetadataContentsKey", "parse_value");
- }
-
- virtual const std::string raw_name() const
- {
- Lock l(get_mutex());
-
- if (bp::override f = get_override("raw_name"))
- return f();
- else
- throw PythonMethodNotImplemented("MetadataContentsKey", "raw_name");
- }
-
- virtual const std::string human_name() const
- {
- Lock l(get_mutex());
-
- if (bp::override f = get_override("human_name"))
- return f();
- else
- throw PythonMethodNotImplemented("MetadataContentsKey", "human_name");
- }
-
- virtual MetadataKeyType type() const
- {
- Lock l(get_mutex());
-
- if (bp::override f = get_override("type"))
- return f();
- else
- throw PythonMethodNotImplemented("MetadataContentsKey", "type");
- }
-};
-
struct MetadataChoicesKeyWrapper :
MetadataValueKey<std::shared_ptr<const Choices> > ,
bp::wrapper<MetadataValueKey<std::shared_ptr<const Choices> > >
@@ -1137,47 +1086,6 @@ void expose_metadata_key()
;
/**
- * MetadataContentsKey
- */
- bp::register_ptr_to_python<std::shared_ptr<const MetadataValueKey<std::shared_ptr<const Contents> > > >();
- bp::implicitly_convertible<std::shared_ptr<MetadataContentsKeyWrapper>,
- std::shared_ptr<MetadataKey> >();
- bp::class_<MetadataContentsKeyWrapper, std::shared_ptr<MetadataContentsKeyWrapper>,
- bp::bases<MetadataKey>, boost::noncopyable>
- (
- "MetadataContentsKey",
- "A MetadataContentsKey is a MetadataKey that holds a Contents heirarchy.\n\n"
-
- "This class can be subclassed in Python.",
- bp::init<>(
- "__init__()"
- )
- )
- .def("parse_value", bp::pure_virtual(&MetadataValueKey<std::shared_ptr<const Contents> > ::parse_value),
- "parse_value() -> Contents\n"
- "Fetch our value."
- )
-
- //Work around epydoc bug
- .def("raw_name", bp::pure_virtual(&MetadataKey::raw_name),
- "raw_name() -> string\n"
- "Fetch our raw name."
- )
-
- //Work around epydoc bug
- .def("human_name", bp::pure_virtual(&MetadataKey::human_name),
- "human_name() -> string\n"
- "Fetch our human name."
- )
-
- //Work around epydoc bug
- .def("type", bp::pure_virtual(&MetadataKey::type),
- "type() -> MetadataKeyType\n"
- "Fetch our key type."
- )
- ;
-
- /**
* MetadataChoicesKey
*/
bp::register_ptr_to_python<std::shared_ptr<const MetadataValueKey<std::shared_ptr<const Choices> > > >();