MCPcopy Create free account
hub / github.com/OpenWebCAD/node-occ / extractArg

Function extractArg

src/Base.h:62–74  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

60
61template<class ClassType>
62bool extractArg(const v8::Local<v8::Value>& value, ClassType*& pObj)
63{
64 assert(pObj == 0);
65 if (value.IsEmpty()) return false;
66 if (!value->IsObject()) return false;
67
68 auto lo = Nan::To<v8::Object>(value).ToLocalChecked();
69 if (IsInstanceOf<ClassType>(lo)) {
70 pObj = Nan::ObjectWrap::Unwrap<ClassType>(lo);
71 return true;
72 }
73 return false;
74}
75
76
77template<class ClassType>

Callers 3

NAN_METHODFunction · 0.85
extractListOfFacesFunction · 0.85
NAN_METHODFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected