MCPcopy Create free account
hub / github.com/Redot-Engine/redot-engine / Iterator

Class Iterator

core/variant/array.h:85–114  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

83 };
84
85 struct Iterator {
86 _FORCE_INLINE_ Variant &operator*() const;
87 _FORCE_INLINE_ Variant *operator->() const;
88
89 _FORCE_INLINE_ Iterator &operator++();
90 _FORCE_INLINE_ Iterator &operator--();
91
92 _FORCE_INLINE_ bool operator==(const Iterator &p_other) const { return element_ptr == p_other.element_ptr; }
93 _FORCE_INLINE_ bool operator!=(const Iterator &p_other) const { return element_ptr != p_other.element_ptr; }
94
95 _FORCE_INLINE_ Iterator(Variant *p_element_ptr, Variant *p_read_only = nullptr) :
96 element_ptr(p_element_ptr), read_only(p_read_only) {}
97 _FORCE_INLINE_ Iterator() {}
98 _FORCE_INLINE_ Iterator(const Iterator &p_other) :
99 element_ptr(p_other.element_ptr), read_only(p_other.read_only) {}
100
101 _FORCE_INLINE_ Iterator &operator=(const Iterator &p_other) {
102 element_ptr = p_other.element_ptr;
103 read_only = p_other.read_only;
104 return *this;
105 }
106
107 operator ConstIterator() const {
108 return ConstIterator(element_ptr);
109 }
110
111 private:
112 Variant *element_ptr = nullptr;
113 Variant *read_only = nullptr;
114 };
115
116 Iterator begin();
117 Iterator end();

Callers 2

beginMethod · 0.70
endMethod · 0.70

Calls 1

ConstIteratorClass · 0.70

Tested by

no test coverage detected