Loading...
Searching...
No Matches
Iterator.h
Go to the documentation of this file.
1// BSD 3-Clause License; see https://github.com/scikit-hep/awkward-1.0/blob/main/LICENSE
2
3#ifndef AWKWARD_ITERATOR_H_
4#define AWKWARD_ITERATOR_H_
5
6#include "awkward/common.h"
7
8namespace awkward {
9 class Content;
10 using ContentPtr = std::shared_ptr<Content>;
11
21 public:
25 Iterator(const ContentPtr& content);
26
28 const ContentPtr
29 content() const;
30
32 const int64_t
33 at() const;
34
38 const bool
39 isdone() const;
40
42 const ContentPtr
44
51 const std::string
52 tostring_part(const std::string& indent,
53 const std::string& pre,
54 const std::string& post) const;
55
57 const std::string
58 tostring() const;
59
60 private:
62 const ContentPtr content_;
64 int64_t at_;
65 };
66}
67
68#endif // AWKWARD_ITERATOR_H_
Represents the current state of iteration over a Content array.
Definition: Iterator.h:20
const std::string tostring() const
Returns a string representation of this array (single-line XML).
const bool isdone() const
If true, the Iterator has reached the end of the array and calling next again would raise an error....
const std::string tostring_part(const std::string &indent, const std::string &pre, const std::string &post) const
Internal function to build an output string for tostring.
const int64_t at() const
The current position of the Iterator.
Iterator(const ContentPtr &content)
Creates an Iterator from a full set of parameters.
const ContentPtr next()
Return the current item and then move the pointer to the next.
const ContentPtr content() const
The array to iterate over.
#define LIBAWKWARD_EXPORT_SYMBOL
Definition: common.h:45
Definition: BitMaskedArray.h:15
std::shared_ptr< Content > ContentPtr
Definition: Content.h:15