File: patch-007.diff

package info (click to toggle)
mrpt 1%3A2.15.2%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 92,456 kB
  • sloc: cpp: 555,366; ansic: 36,840; xml: 3,872; python: 2,195; sh: 524; makefile: 232
file content (93 lines) | stat: -rw-r--r-- 14,925 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
diff --git a/python/src/std/stl_deque.cpp b/python/src/std/stl_deque.cpp
index 1638b4d29..4c5984034 100644
--- a/python/src/std/stl_deque.cpp
+++ b/python/src/std/stl_deque.cpp
@@ -56,6 +56,11 @@ void bind_std_stl_deque(std::function< pybind11::module &(std::string const &nam
 		cl.def("pop_back", (void (std::deque<mrpt::bayes::CProbabilityParticle<mrpt::math::TPose3D, mrpt::bayes::particle_storage_mode::VALUE>>::*)()) &std::deque<mrpt::bayes::CProbabilityParticle<mrpt::math::TPose3D, mrpt::bayes::particle_storage_mode::VALUE>>::pop_back, "C++: std::deque<mrpt::bayes::CProbabilityParticle<mrpt::math::TPose3D, mrpt::bayes::particle_storage_mode::VALUE>>::pop_back() --> void");
 		cl.def("swap", (void (std::deque<mrpt::bayes::CProbabilityParticle<mrpt::math::TPose3D, mrpt::bayes::particle_storage_mode::VALUE>>::*)(class std::deque<struct mrpt::bayes::CProbabilityParticle<struct mrpt::math::TPose3D, mrpt::bayes::particle_storage_mode::VALUE> > &)) &std::deque<mrpt::bayes::CProbabilityParticle<mrpt::math::TPose3D, mrpt::bayes::particle_storage_mode::VALUE>>::swap, "C++: std::deque<mrpt::bayes::CProbabilityParticle<mrpt::math::TPose3D, mrpt::bayes::particle_storage_mode::VALUE>>::swap(class std::deque<struct mrpt::bayes::CProbabilityParticle<struct mrpt::math::TPose3D, mrpt::bayes::particle_storage_mode::VALUE> > &) --> void", pybind11::arg("__x"));
 		cl.def("clear", (void (std::deque<mrpt::bayes::CProbabilityParticle<mrpt::math::TPose3D, mrpt::bayes::particle_storage_mode::VALUE>>::*)()) &std::deque<mrpt::bayes::CProbabilityParticle<mrpt::math::TPose3D, mrpt::bayes::particle_storage_mode::VALUE>>::clear, "C++: std::deque<mrpt::bayes::CProbabilityParticle<mrpt::math::TPose3D, mrpt::bayes::particle_storage_mode::VALUE>>::clear() --> void");
+
+		cl.def("__iter__", [](const std::deque<mrpt::bayes::CProbabilityParticle<mrpt::math::TPose3D, mrpt::bayes::particle_storage_mode::VALUE>> &o) {
+			return pybind11::make_iterator(o.begin(), o.end());
+			}, pybind11::keep_alive<0, 1>());
+
 	}
 	{ // std::deque file:bits/stl_deque.h line:767
 		pybind11::class_<std::deque<mrpt::bayes::CProbabilityParticle<mrpt::math::TPose2D, mrpt::bayes::particle_storage_mode::VALUE>>, std::shared_ptr<std::deque<mrpt::bayes::CProbabilityParticle<mrpt::math::TPose2D, mrpt::bayes::particle_storage_mode::VALUE>>>> cl(M("std"), "deque_mrpt_bayes_CProbabilityParticle_mrpt_math_TPose2D_mrpt_bayes_particle_storage_mode_VALUE_t", "");
@@ -90,5 +95,10 @@ void bind_std_stl_deque(std::function< pybind11::module &(std::string const &nam
 		cl.def("pop_back", (void (std::deque<mrpt::bayes::CProbabilityParticle<mrpt::math::TPose2D, mrpt::bayes::particle_storage_mode::VALUE>>::*)()) &std::deque<mrpt::bayes::CProbabilityParticle<mrpt::math::TPose2D, mrpt::bayes::particle_storage_mode::VALUE>>::pop_back, "C++: std::deque<mrpt::bayes::CProbabilityParticle<mrpt::math::TPose2D, mrpt::bayes::particle_storage_mode::VALUE>>::pop_back() --> void");
 		cl.def("swap", (void (std::deque<mrpt::bayes::CProbabilityParticle<mrpt::math::TPose2D, mrpt::bayes::particle_storage_mode::VALUE>>::*)(class std::deque<struct mrpt::bayes::CProbabilityParticle<struct mrpt::math::TPose2D, mrpt::bayes::particle_storage_mode::VALUE> > &)) &std::deque<mrpt::bayes::CProbabilityParticle<mrpt::math::TPose2D, mrpt::bayes::particle_storage_mode::VALUE>>::swap, "C++: std::deque<mrpt::bayes::CProbabilityParticle<mrpt::math::TPose2D, mrpt::bayes::particle_storage_mode::VALUE>>::swap(class std::deque<struct mrpt::bayes::CProbabilityParticle<struct mrpt::math::TPose2D, mrpt::bayes::particle_storage_mode::VALUE> > &) --> void", pybind11::arg("__x"));
 		cl.def("clear", (void (std::deque<mrpt::bayes::CProbabilityParticle<mrpt::math::TPose2D, mrpt::bayes::particle_storage_mode::VALUE>>::*)()) &std::deque<mrpt::bayes::CProbabilityParticle<mrpt::math::TPose2D, mrpt::bayes::particle_storage_mode::VALUE>>::clear, "C++: std::deque<mrpt::bayes::CProbabilityParticle<mrpt::math::TPose2D, mrpt::bayes::particle_storage_mode::VALUE>>::clear() --> void");
+
+		cl.def("__iter__", [](const std::deque<mrpt::bayes::CProbabilityParticle<mrpt::math::TPose2D, mrpt::bayes::particle_storage_mode::VALUE>> &o) {
+			return pybind11::make_iterator(o.begin(), o.end());
+			}, pybind11::keep_alive<0, 1>());
+
 	}
 }
diff --git a/python/src/std/stl_deque_1.cpp b/python/src/std/stl_deque_1.cpp
index b16449336..69668158e 100644
--- a/python/src/std/stl_deque_1.cpp
+++ b/python/src/std/stl_deque_1.cpp
@@ -64,6 +64,11 @@ void bind_std_stl_deque_1(std::function< pybind11::module &(std::string const &n
 		cl.def("pop_back", (void (std::deque<mrpt::math::TPose3D>::*)()) &std::deque<mrpt::math::TPose3D>::pop_back, "C++: std::deque<mrpt::math::TPose3D>::pop_back() --> void");
 		cl.def("swap", (void (std::deque<mrpt::math::TPose3D>::*)(class std::deque<struct mrpt::math::TPose3D> &)) &std::deque<mrpt::math::TPose3D>::swap, "C++: std::deque<mrpt::math::TPose3D>::swap(class std::deque<struct mrpt::math::TPose3D> &) --> void", pybind11::arg("__x"));
 		cl.def("clear", (void (std::deque<mrpt::math::TPose3D>::*)()) &std::deque<mrpt::math::TPose3D>::clear, "C++: std::deque<mrpt::math::TPose3D>::clear() --> void");
+
+		cl.def("__iter__", [](const std::deque<mrpt::math::TPose3D> &o) {
+			return pybind11::make_iterator(o.begin(), o.end());
+			}, pybind11::keep_alive<0, 1>());
+
 	}
 	{ // std::deque file:bits/stl_deque.h line:767
 		pybind11::class_<std::deque<mrpt::bayes::CProbabilityParticle<mrpt::maps::CRBPFParticleData, mrpt::bayes::particle_storage_mode::POINTER>>, std::shared_ptr<std::deque<mrpt::bayes::CProbabilityParticle<mrpt::maps::CRBPFParticleData, mrpt::bayes::particle_storage_mode::POINTER>>>> cl(M("std"), "deque_mrpt_bayes_CProbabilityParticle_mrpt_maps_CRBPFParticleData_mrpt_bayes_particle_storage_mode_POINTER_t", "");
@@ -91,5 +96,10 @@ void bind_std_stl_deque_1(std::function< pybind11::module &(std::string const &n
 		cl.def("pop_back", (void (std::deque<mrpt::bayes::CProbabilityParticle<mrpt::maps::CRBPFParticleData, mrpt::bayes::particle_storage_mode::POINTER>>::*)()) &std::deque<mrpt::bayes::CProbabilityParticle<mrpt::maps::CRBPFParticleData, mrpt::bayes::particle_storage_mode::POINTER>>::pop_back, "C++: std::deque<mrpt::bayes::CProbabilityParticle<mrpt::maps::CRBPFParticleData, mrpt::bayes::particle_storage_mode::POINTER>>::pop_back() --> void");
 		cl.def("swap", (void (std::deque<mrpt::bayes::CProbabilityParticle<mrpt::maps::CRBPFParticleData, mrpt::bayes::particle_storage_mode::POINTER>>::*)(class std::deque<struct mrpt::bayes::CProbabilityParticle<class mrpt::maps::CRBPFParticleData, mrpt::bayes::particle_storage_mode::POINTER> > &)) &std::deque<mrpt::bayes::CProbabilityParticle<mrpt::maps::CRBPFParticleData, mrpt::bayes::particle_storage_mode::POINTER>>::swap, "C++: std::deque<mrpt::bayes::CProbabilityParticle<mrpt::maps::CRBPFParticleData, mrpt::bayes::particle_storage_mode::POINTER>>::swap(class std::deque<struct mrpt::bayes::CProbabilityParticle<class mrpt::maps::CRBPFParticleData, mrpt::bayes::particle_storage_mode::POINTER> > &) --> void", pybind11::arg("__x"));
 		cl.def("clear", (void (std::deque<mrpt::bayes::CProbabilityParticle<mrpt::maps::CRBPFParticleData, mrpt::bayes::particle_storage_mode::POINTER>>::*)()) &std::deque<mrpt::bayes::CProbabilityParticle<mrpt::maps::CRBPFParticleData, mrpt::bayes::particle_storage_mode::POINTER>>::clear, "C++: std::deque<mrpt::bayes::CProbabilityParticle<mrpt::maps::CRBPFParticleData, mrpt::bayes::particle_storage_mode::POINTER>>::clear() --> void");
+
+		cl.def("__iter__", [](const std::deque<mrpt::bayes::CProbabilityParticle<mrpt::maps::CRBPFParticleData, mrpt::bayes::particle_storage_mode::POINTER>> &o) {
+			return pybind11::make_iterator(o.begin(), o.end());
+			}, pybind11::keep_alive<0, 1>());
+
 	}
 }
diff --git a/python/src/std/stl_multimap.cpp b/python/src/std/stl_multimap.cpp
index ccfa54684..2b4e8b2ab 100644
--- a/python/src/std/stl_multimap.cpp
+++ b/python/src/std/stl_multimap.cpp
@@ -56,6 +56,10 @@ void bind_std_stl_multimap(std::function< pybind11::module &(std::string const &
 		cl.def("key_comp", (struct std::less<mrpt::Clock::time_point > (std::multimap<std::chrono::time_point<mrpt::Clock, std::chrono::duration<int64_t, std::ratio<1, 10000000> > >,std::shared_ptr<mrpt::serialization::CSerializable>>::*)() const) &std::multimap<std::chrono::time_point<mrpt::Clock, std::chrono::duration<int64_t, std::ratio<1, 10000000>>>, std::shared_ptr<mrpt::serialization::CSerializable>>::key_comp, "C++: std::multimap<std::chrono::time_point<mrpt::Clock, std::chrono::duration<int64_t, std::ratio<1, 10000000>>>, std::shared_ptr<mrpt::serialization::CSerializable>>::key_comp() const --> struct std::less<mrpt::Clock::time_point >");
 		cl.def("count", (size_t (std::multimap<std::chrono::time_point<mrpt::Clock, std::chrono::duration<int64_t, std::ratio<1, 10000000> > >,std::shared_ptr<mrpt::serialization::CSerializable>>::*)(const mrpt::Clock::time_point &) const) &std::multimap<std::chrono::time_point<mrpt::Clock, std::chrono::duration<int64_t, std::ratio<1, 10000000>>>, std::shared_ptr<mrpt::serialization::CSerializable>>::count, "C++: std::multimap<std::chrono::time_point<mrpt::Clock, std::chrono::duration<int64_t, std::ratio<1, 10000000>>>, std::shared_ptr<mrpt::serialization::CSerializable>>::count(const mrpt::Clock::time_point &) const --> size_t", pybind11::arg("__x"));
 		cl.def("equal_range", (struct std::pair<struct std::_Rb_tree_iterator<struct std::pair<const mrpt::Clock::time_point, class std::shared_ptr<class mrpt::serialization::CSerializable> > >, struct std::_Rb_tree_iterator<struct std::pair<const mrpt::Clock::time_point, class std::shared_ptr<class mrpt::serialization::CSerializable> > > > (std::multimap<std::chrono::time_point<mrpt::Clock, std::chrono::duration<int64_t, std::ratio<1, 10000000> > >,std::shared_ptr<mrpt::serialization::CSerializable>>::*)(const mrpt::Clock::time_point &)) &std::multimap<std::chrono::time_point<mrpt::Clock, std::chrono::duration<int64_t, std::ratio<1, 10000000>>>, std::shared_ptr<mrpt::serialization::CSerializable>>::equal_range, "C++: std::multimap<std::chrono::time_point<mrpt::Clock, std::chrono::duration<int64_t, std::ratio<1, 10000000>>>, std::shared_ptr<mrpt::serialization::CSerializable>>::equal_range(const mrpt::Clock::time_point &) --> struct std::pair<struct std::_Rb_tree_iterator<struct std::pair<const mrpt::Clock::time_point, class std::shared_ptr<class mrpt::serialization::CSerializable> > >, struct std::_Rb_tree_iterator<struct std::pair<const mrpt::Clock::time_point, class std::shared_ptr<class mrpt::serialization::CSerializable> > > >", pybind11::arg("__x"));
+
+		cl.def("__iter__", [](const std::multimap<std::chrono::time_point<mrpt::Clock, std::chrono::duration<int64_t, std::ratio<1, 10000000> > >,std::shared_ptr<mrpt::serialization::CSerializable>> &o) {
+			return pybind11::make_iterator(o.begin(), o.end());
+			}, pybind11::keep_alive<0, 1>());
 	}
 	{ // std::map file:bits/stl_map.h line:100
 		pybind11::class_<std::map<mrpt::containers::yaml::node_t,mrpt::containers::yaml::node_t>, std::shared_ptr<std::map<mrpt::containers::yaml::node_t,mrpt::containers::yaml::node_t>>> cl(M("std"), "map_mrpt_containers_yaml_node_t_mrpt_containers_yaml_node_t_t", "");
@@ -82,5 +86,9 @@ void bind_std_stl_multimap(std::function< pybind11::module &(std::string const &
 		cl.def("key_comp", (struct std::less<struct mrpt::containers::yaml::node_t> (std::map<mrpt::containers::yaml::node_t,mrpt::containers::yaml::node_t>::*)() const) &std::map<mrpt::containers::yaml::node_t, mrpt::containers::yaml::node_t>::key_comp, "C++: std::map<mrpt::containers::yaml::node_t, mrpt::containers::yaml::node_t>::key_comp() const --> struct std::less<struct mrpt::containers::yaml::node_t>");
 		cl.def("count", (size_t (std::map<mrpt::containers::yaml::node_t,mrpt::containers::yaml::node_t>::*)(const struct mrpt::containers::yaml::node_t &) const) &std::map<mrpt::containers::yaml::node_t, mrpt::containers::yaml::node_t>::count, "C++: std::map<mrpt::containers::yaml::node_t, mrpt::containers::yaml::node_t>::count(const struct mrpt::containers::yaml::node_t &) const --> size_t", pybind11::arg("__x"));
 		cl.def("equal_range", (struct std::pair<struct std::_Rb_tree_iterator<struct std::pair<const struct mrpt::containers::yaml::node_t, struct mrpt::containers::yaml::node_t> >, struct std::_Rb_tree_iterator<struct std::pair<const struct mrpt::containers::yaml::node_t, struct mrpt::containers::yaml::node_t> > > (std::map<mrpt::containers::yaml::node_t,mrpt::containers::yaml::node_t>::*)(const struct mrpt::containers::yaml::node_t &)) &std::map<mrpt::containers::yaml::node_t, mrpt::containers::yaml::node_t>::equal_range, "C++: std::map<mrpt::containers::yaml::node_t, mrpt::containers::yaml::node_t>::equal_range(const struct mrpt::containers::yaml::node_t &) --> struct std::pair<struct std::_Rb_tree_iterator<struct std::pair<const struct mrpt::containers::yaml::node_t, struct mrpt::containers::yaml::node_t> >, struct std::_Rb_tree_iterator<struct std::pair<const struct mrpt::containers::yaml::node_t, struct mrpt::containers::yaml::node_t> > >", pybind11::arg("__x"));
+
+		cl.def("__iter__", [](const std::map<mrpt::containers::yaml::node_t,mrpt::containers::yaml::node_t> &o) {
+			return pybind11::make_iterator(o.begin(), o.end());
+			}, pybind11::keep_alive<0, 1>());
 	}
 }
diff --git a/python/src/std/stl_vector.cpp b/python/src/std/stl_vector.cpp
index f4c9f4013..6d067dc27 100644
--- a/python/src/std/stl_vector.cpp
+++ b/python/src/std/stl_vector.cpp
@@ -62,5 +62,9 @@ void bind_std_stl_vector(std::function< pybind11::module &(std::string const &na
 		cl.def("erase", (class __gnu_cxx::__normal_iterator<std::string *, class std::vector<std::string > > (std::vector<std::string>::*)(class __gnu_cxx::__normal_iterator<const std::string *, class std::vector<std::string > >, class __gnu_cxx::__normal_iterator<const std::string *, class std::vector<std::string > >)) &std::vector<std::string>::erase, "C++: std::vector<std::string>::erase(class __gnu_cxx::__normal_iterator<const std::string *, class std::vector<std::string > >, class __gnu_cxx::__normal_iterator<const std::string *, class std::vector<std::string > >) --> class __gnu_cxx::__normal_iterator<std::string *, class std::vector<std::string > >", pybind11::arg("__first"), pybind11::arg("__last"));
 		cl.def("swap", (void (std::vector<std::string>::*)(class std::vector<std::string > &)) &std::vector<std::string>::swap, "C++: std::vector<std::string>::swap(class std::vector<std::string > &) --> void", pybind11::arg("__x"));
 		cl.def("clear", (void (std::vector<std::string>::*)()) &std::vector<std::string>::clear, "C++: std::vector<std::string>::clear() --> void");
+
+		cl.def("__iter__", [](const std::vector<std::string> &o) {
+			return pybind11::make_iterator(o.begin(), o.end());
+			}, pybind11::keep_alive<0, 1>());
 	}
 }