MCPcopy Create free account
hub / github.com/christophhart/HISE / checkIfSynchronous

Method checkIfSynchronous

hi_scripting/scripting/api/ScriptingBaseObjects.cpp:83–95  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

81
82
83bool ScriptingObject::checkIfSynchronous(const Identifier &methodName) const
84{
85 const JavascriptMidiProcessor *sp = dynamic_cast<const JavascriptMidiProcessor*>(getScriptProcessor());
86
87 if (sp == nullptr) return true; // HardcodedScriptProcessors are always synchronous
88
89 if (sp->isDeferred())
90 {
91 reportScriptError("Illegal call of " + methodName.toString() + " (Can only be called in synchronous mode)");
92 }
93
94 return !sp->isDeferred();
95}
96
97void ScriptingObject::reportIllegalCall(const String &callName, const String &allowedCallback) const
98{

Callers

nothing calls this directly

Calls 2

isDeferredMethod · 0.80
toStringMethod · 0.45

Tested by

no test coverage detected