23 #include "pybind11/pybind11.h" 35 using PyAliasMap = py::class_<AliasMap, std::shared_ptr<AliasMap>>;
38 PyAliasMap
cls(mod,
"AliasMap");
40 cls.def(py::init<>());
41 cls.def(py::init<AliasMap const &>());
43 cls.def(
"__len__", &AliasMap::size);
44 cls.def(
"empty", &AliasMap::empty);
45 cls.def(
"apply", &AliasMap::apply,
"name"_a);
46 cls.def(
"get", &AliasMap::get,
"alias"_a);
47 cls.def(
"__getitem__", &AliasMap::get,
"alias"_a);
52 cls.def(
"__eq__", [](AliasMap &
self, AliasMap &
other) {
return self ==
other; });
53 cls.def(
"__ne__", [](AliasMap &
self, AliasMap &other) {
return self !=
other; });
56 cls.def(
"items", [](AliasMap &
self) {
return py::make_iterator(
self.
begin(),
self.
end()); },
57 py::keep_alive<0, 1>());
bool contains(VertexIterator const begin, VertexIterator const end, UnitVector3d const &v)
PYBIND11_MODULE(camera, mod)
daf::base::PropertySet * set
A base class for image defects.
ItemVariant const * other