| 4442 | } |
| 4443 | |
| 4444 | int asCBuilder::CreateVirtualFunction(asCScriptFunction *func, int idx) |
| 4445 | { |
| 4446 | asCScriptFunction *vf = asNEW(asCScriptFunction)(engine, module, asFUNC_VIRTUAL); |
| 4447 | if( vf == 0 ) |
| 4448 | return asOUT_OF_MEMORY; |
| 4449 | |
| 4450 | vf->name = func->name; |
| 4451 | vf->nameSpace = func->nameSpace; |
| 4452 | vf->returnType = func->returnType; |
| 4453 | vf->parameterTypes = func->parameterTypes; |
| 4454 | vf->inOutFlags = func->inOutFlags; |
| 4455 | vf->id = engine->GetNextScriptFunctionId(); |
| 4456 | vf->objectType = func->objectType; |
| 4457 | vf->objectType->AddRefInternal(); |
| 4458 | vf->signatureId = func->signatureId; |
| 4459 | vf->vfTableIdx = idx; |
| 4460 | vf->traits = func->traits; |
| 4461 | |
| 4462 | // Clear the shared trait since the virtual function should not have that |
| 4463 | vf->SetShared(false); |
| 4464 | |
| 4465 | // It is not necessary to copy the default args, as they have no meaning in the virtual function |
| 4466 | |
| 4467 | module->AddScriptFunction(vf); |
| 4468 | |
| 4469 | // Add a dummy to the builder so that it doesn't mix up function ids |
| 4470 | functions.PushLast(0); |
| 4471 | |
| 4472 | return vf->id; |
| 4473 | } |
| 4474 | |
| 4475 | asCObjectProperty *asCBuilder::AddPropertyToClass(sClassDeclaration *decl, const asCString &name, const asCDataType &dt, bool isPrivate, bool isProtected, bool isInherited, asCScriptCode *file, asCScriptNode *node) |
| 4476 | { |
nothing calls this directly
no test coverage detected