MCPcopy Create free account
hub / github.com/anjo76/angelscript / CreateDelegate

Function CreateDelegate

sdk/angelscript/source/as_scriptfunction.cpp:172–187  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

170}
171
172asCScriptFunction *CreateDelegate(asCScriptFunction *func, void *obj)
173{
174 if( func == 0 || obj == 0 )
175 {
176 // TODO: delegate: Should set script exception
177 return 0;
178 }
179
180 // Create an instance of a asCScriptFunction with the type asFUNC_DELEGATE
181 // The delegate shouldn't have a function id and is not added to the engine->scriptFunctions
182 asCScriptFunction *delegate = asNEW(asCScriptFunction)(static_cast<asCScriptEngine*>(func->GetEngine()), 0, asFUNC_DELEGATE);
183 if( delegate )
184 delegate->MakeDelegate(func, obj);
185
186 return delegate;
187}
188
189// internal
190void asCScriptFunction::MakeDelegate(asCScriptFunction *func, void *obj)

Callers 1

Calls 2

MakeDelegateMethod · 0.80
GetEngineMethod · 0.45

Tested by

no test coverage detected