MCPcopy Create free account
hub / github.com/HaxeFoundation/hxcpp / ArrayKeyValueIterator

Class ArrayKeyValueIterator

include/Array.h:101–125  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

99// --- ArrayKeyValueIterator -------------------------------------------
100template<typename FROM,typename TO>
101class ArrayKeyValueIterator : public cpp::FastIterator_obj<Dynamic>
102{
103public:
104 HX_IS_INSTANCE_OF enum { _hx_ClassId = hx::clsIdArrayIterator };
105
106 ArrayKeyValueIterator(Array<FROM> inArray) : mArray(inArray), mIdx(0) { }
107
108 bool hasNext() HXCPP_OVERRIDE { return mIdx < mArray->length; }
109
110 inline TO toTo(const Dynamic &inD) { return inD.StaticCast<TO>(); }
111
112 template<typename T>
113 inline TO toTo(T inT) { return inT; }
114
115
116 Dynamic next() HXCPP_OVERRIDE;
117
118 void __Mark(hx::MarkContext *__inCtx) HXCPP_OVERRIDE { HX_MARK_MEMBER_NAME(mArray,"mArray"); }
119 #ifdef HXCPP_VISIT_ALLOCS
120 void __Visit(hx::VisitContext *__inCtx) HXCPP_OVERRIDE { HX_VISIT_MEMBER_NAME(mArray,"mArray"); }
121 #endif
122
123 int mIdx;
124 Array<FROM> mArray;
125};
126
127}
128

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected