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

Method WriteMessage

sdk/angelscript/source/as_scriptengine.cpp:1361–1404  ·  view source on GitHub ↗

interface

Source from the content-addressed store, hash-verified

1359
1360// interface
1361int asCScriptEngine::WriteMessage(const char *section, int row, int col, asEMsgType type, const char *message)
1362{
1363 // Validate input parameters
1364 if( section == 0 ||
1365 message == 0 )
1366 return asINVALID_ARG;
1367
1368 // If there is no callback then there's nothing to do
1369 if( !msgCallback )
1370 return 0;
1371
1372 // If a pre-message has been set, then write that first
1373 if( preMessage.isSet )
1374 {
1375 asSMessageInfo msg;
1376 msg.section = preMessage.scriptname.AddressOf();
1377 msg.row = preMessage.r;
1378 msg.col = preMessage.c;
1379 msg.type = asMSGTYPE_INFORMATION;
1380 msg.message = preMessage.message.AddressOf();
1381
1382 if( msgCallbackFunc.callConv < ICC_THISCALL )
1383 CallGlobalFunction(&msg, msgCallbackObj, &msgCallbackFunc, 0);
1384 else
1385 CallObjectMethod(msgCallbackObj, &msg, &msgCallbackFunc, 0);
1386
1387 preMessage.isSet = false;
1388 }
1389
1390 // Write the message to the callback
1391 asSMessageInfo msg;
1392 msg.section = section;
1393 msg.row = row;
1394 msg.col = col;
1395 msg.type = type;
1396 msg.message = message;
1397
1398 if( msgCallbackFunc.callConv < ICC_THISCALL )
1399 CallGlobalFunction(&msg, msgCallbackObj, &msgCallbackFunc, 0);
1400 else
1401 CallObjectMethod(msgCallbackObj, &msg, &msgCallbackFunc, 0);
1402
1403 return 0;
1404}
1405
1406int asCScriptEngine::SetJITCompiler(asIJITCompilerAbstract *compiler)
1407{

Callers 15

CompileScriptFunction · 0.80
ExecuteScriptFunction · 0.80
ConfigureEngineFunction · 0.80
CompileScriptFunction · 0.80
SaveBytecodeFunction · 0.80
AddRefMethod · 0.80
ErrorMethod · 0.80
ReadInnerMethod · 0.80
ReadFunctionMethod · 0.80
ReadTypeDeclarationMethod · 0.80
ReadTypeInfoMethod · 0.80
WriteInfoMethod · 0.80

Calls 1

AddressOfMethod · 0.45

Tested by 1

TestCreateEngineFunction · 0.64