| 403 | } |
| 404 | |
| 405 | struct CArrayObjPyIterator { |
| 406 | CArrayObjPyIterator(CArrayObj& Obj, py::object Ref): |
| 407 | Obj_(Obj), |
| 408 | Ref_(Ref) |
| 409 | { } |
| 410 | |
| 411 | py::object next() { |
| 412 | if (Index_ == Obj_.getNumElements()) |
| 413 | throw py::stop_iteration(); |
| 414 | return Obj_.get(Index_++); |
| 415 | } |
| 416 | |
| 417 | private: |
| 418 | CArrayObj& Obj_; |
| 419 | py::object Ref_; // keep a reference |
| 420 | size_t Index_ = 0; |
| 421 | }; |
| 422 | |
| 423 | } // anonymous |
| 424 |
nothing calls this directly
no outgoing calls
no test coverage detected