| 317 | }; |
| 318 | |
| 319 | void StepBrepAsyncReadWorker::WorkComplete() { |
| 320 | |
| 321 | Nan::HandleScope scope; |
| 322 | if (this->_retValue == 0) { |
| 323 | |
| 324 | try { |
| 325 | |
| 326 | std::list<v8::Local<v8::Object> > jsshapes; |
| 327 | |
| 328 | for (std::list<TopoDS_Shape >::iterator it = shapes.begin(); it != shapes.end(); it++) { |
| 329 | const TopoDS_Shape& aShape = (*it); |
| 330 | extractShape(aShape, jsshapes); |
| 331 | } |
| 332 | |
| 333 | v8::Local<v8::Array> arr = convert(jsshapes); |
| 334 | |
| 335 | v8::Local<v8::Value> err = Nan::Null(); |
| 336 | v8::Local<v8::Value> argv[2] = { err, arr }; |
| 337 | |
| 338 | callback->Call(2, argv, async_resource); |
| 339 | |
| 340 | } |
| 341 | catch (...) { |
| 342 | this->SetErrorMessage(" exception in trying to build shapes"); |
| 343 | return this->AsyncWorkerWithProgress::WorkComplete(); |
| 344 | } |
| 345 | } |
| 346 | else { |
| 347 | return this->AsyncWorkerWithProgress::WorkComplete(); |
| 348 | } |
| 349 | } |
| 350 | |
| 351 | class StepAsyncReadWorker : public StepBrepAsyncReadWorker { |
| 352 | public: |
nothing calls this directly
no test coverage detected