MCPcopy Create free account
hub / github.com/NodeRT/NodeRT / MoveNext

Method MoveNext

src/NodeRTLib/ProjectFiles/CollectionsWrap.h:274–300  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

272 }
273
274 static void MoveNext(Nan::NAN_METHOD_ARGS_TYPE info) {
275 HandleScope scope;
276
277 if (!NodeRT::Utils::IsWinRtWrapperOf<
278 ::Windows::Foundation::Collections::IIterator<T> ^>(info.This())) {
279 return;
280 }
281
282 IteratorWrapper<T>* wrapper =
283 IteratorWrapper<T>::Unwrap<IteratorWrapper<T>>(info.This());
284
285 if (info.Length() == 0) {
286 try {
287 bool result;
288 result = wrapper->_instance->MoveNext();
289 info.GetReturnValue().Set(Nan::New<Boolean>(result));
290 return;
291 } catch (Platform::Exception ^ exception) {
292 NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
293 return;
294 }
295 } else {
296 Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(
297 L"Bad arguments: no suitable overload found")));
298 return;
299 }
300 }
301
302 // Not supporting this for now since we need to initialize the array ourselves
303 // and don't know which size to use

Callers

nothing calls this directly

Calls 2

NewStringFunction · 0.85
SetMethod · 0.45

Tested by

no test coverage detected