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

Method RegisterScriptFunctionFromNode

sdk/angelscript/source/as_builder.cpp:5147–5171  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5145
5146#ifndef AS_NO_COMPILER
5147int asCBuilder::RegisterScriptFunctionFromNode(asCScriptNode *node, asCScriptCode *file, asCObjectType *objType, bool isInterface, bool isGlobalFunction, asSNameSpace *ns, bool isExistingShared, bool isMixin, sClassDeclaration* decl)
5148{
5149 asCString name;
5150 asCDataType returnType;
5151 asCArray<asCString> parameterNames;
5152 asCArray<asCDataType> parameterTypes;
5153 asCArray<asETypeModifiers> inOutFlags;
5154 asCArray<asCString *> defaultArgs;
5155 asSFunctionTraits funcTraits;
5156
5157 asASSERT( (objType && ns == 0) || isGlobalFunction || isMixin );
5158
5159 // Set the default namespace
5160 if( ns == 0 )
5161 {
5162 if( objType )
5163 ns = objType->nameSpace;
5164 else
5165 ns = engine->nameSpaces[0];
5166 }
5167
5168 GetParsedFunctionDetails(node, file, objType, name, returnType, parameterNames, parameterTypes, inOutFlags, defaultArgs, funcTraits, ns);
5169
5170 return RegisterScriptFunction(node, file, objType, isInterface, isGlobalFunction, ns, isExistingShared, isMixin, name, returnType, parameterNames, parameterTypes, inOutFlags, defaultArgs, funcTraits, decl);
5171}
5172
5173asCScriptFunction *asCBuilder::RegisterLambda(asCScriptNode *node, asCScriptCode *file, asCScriptFunction *funcDef, const asCString &name, asSNameSpace *ns, bool isShared)
5174{

Callers

nothing calls this directly

Calls 1

RegisterScriptFunctionFunction · 0.85

Tested by

no test coverage detected