[ 
https://issues.apache.org/jira/browse/ARROW-5508?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16863415#comment-16863415
 ] 

Wes McKinney commented on ARROW-5508:
-------------------------------------

I added a prototype for this here, see the comment on the Next method

https://github.com/apache/arrow/blob/master/cpp/src/arrow/util/iterator.h

I notice that I missed the virtual destructor.

If this is the preferred Iterator interface, then I would suggest refactoring 
one or two of our ad hoc iterator classes in the codebase to use 
{{arrow::Iterator<T>}} as a path to resolving this issue. Thoughts?

> [C++] Create reusable Iterator<T> interface 
> --------------------------------------------
>
>                 Key: ARROW-5508
>                 URL: https://issues.apache.org/jira/browse/ARROW-5508
>             Project: Apache Arrow
>          Issue Type: Improvement
>          Components: C++
>            Reporter: Wes McKinney
>            Assignee: Wes McKinney
>            Priority: Major
>             Fix For: 0.14.0
>
>
> We have various iterator-like classes. I envision a reusable interface like
> {code}
> template <typename T>
> class Iterator {
>  public:
>   virtual ~Iterator() = default;
>   virtual Status Next(T* out) = 0;
> }
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to