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

Function JsArrayToWinrtVectorView

src/NodeRTLib/ProjectFiles/CollectionsConverter.h:133–146  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

131
132 template <class V>
133 static ::Platform::Collections::VectorView<V> ^
134 JsArrayToWinrtVectorView(
135 v8::Local<v8::Array> arr,
136 const std::function<bool(v8::Local<v8::Value>)>& checkValueTypeFunc,
137 const std::function<V(v8::Local<v8::Value>)>& convertToValueTypeFunc) {
138 std::vector<V> vec(arr->Length());
139
140 if (!FillVector<std::vector<V>&, V>(arr, checkValueTypeFunc,
141 convertToValueTypeFunc, vec)) {
142 return nullptr;
143 }
144
145 return ref new ::Platform::Collections::VectorView<V>(vec);
146 }
147
148 template <class V>
149 static ::Platform::Array<V> ^

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected