Yoba Perl
array_iterator.hpp
1 #ifndef YOBAPERL_ARRAY_ITERATOR_HPP
2 #define YOBAPERL_ARRAY_ITERATOR_HPP
3 
4 #include "yobaperl/common.hpp"
5 #include "yobaperl/scalar.hpp"
6 
7 namespace yoba {
8 
9 
10 
25 class YOBAPERL_EXPORT ArrayIterator
26 {
27  friend class Array;
28 
29 public:
30 
31 
32 
37  ArrayIterator(ArrayIterator && to_move);
38 
39 
40 
42 
43  Scalar operator* () const;
44  ArrayIterator & operator++ ();
45  ArrayIterator & operator-- ();
46  ArrayIterator operator++ (int);
47  ArrayIterator operator-- (int);
48  ArrayIterator operator+ (SSize_t diff) const;
49  ArrayIterator operator- (SSize_t diff) const;
50  ArrayIterator & operator+= (SSize_t diff);
51  ArrayIterator & operator-= (SSize_t diff);
52  bool operator== (const ArrayIterator & other) const;
53  bool operator!= (const ArrayIterator & other) const;
54 
56 
57 
58 
59 private:
60  ArrayIterator(Perl & perl, SV ** ptr);
61 
62  Perl & _perl;
63  SV ** _array_ptr;
64 };
65 
66 
67 
68 } // namespace yoba
69 
70 #endif // YOBAPERL_ARRAY_ITERATOR_HPP
Array reference
Definition: array.hpp:26
Definition: array.cpp:5
Array iterator.
Main class.
Definition: perl.hpp:32
Scalar reference
Definition: scalar.hpp:24