MCPcopy Create free account
hub / github.com/Siv3D/OpenSiv3D / CopyObject

Method CopyObject

Siv3D/src/ThirdParty/angelscript/as_scriptobject.cpp:1101–1118  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1099}
1100
1101void asCScriptObject::CopyObject(const void *src, void *dst, asCObjectType *in_objType, asCScriptEngine *engine)
1102{
1103 int funcIndex = in_objType->beh.copy;
1104 if( funcIndex )
1105 {
1106 asCScriptFunction *func = engine->scriptFunctions[in_objType->beh.copy];
1107 if( func->funcType == asFUNC_SYSTEM )
1108 engine->CallObjectMethod(dst, const_cast<void*>(src), funcIndex);
1109 else
1110 {
1111 // Call the script class' opAssign method
1112 asASSERT(in_objType->flags & asOBJ_SCRIPT_OBJECT );
1113 reinterpret_cast<asCScriptObject*>(dst)->CopyFrom(reinterpret_cast<const asCScriptObject*>(src));
1114 }
1115 }
1116 else if( in_objType->size && (in_objType->flags & asOBJ_POD) )
1117 memcpy(dst, src, in_objType->size);
1118}
1119
1120void asCScriptObject::CopyHandle(asPWORD *src, asPWORD *dst, asCObjectType *in_objType, asCScriptEngine *engine)
1121{

Callers

nothing calls this directly

Calls 2

CallObjectMethodMethod · 0.80
CopyFromMethod · 0.80

Tested by

no test coverage detected