MCPcopy Create free account
hub / github.com/HaxeFoundation/hxcpp / getScriptableValue

Method getScriptableValue

src/hx/cppia/CppiaFunction.cpp:220–241  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

218
219
220bool ScriptCallable::getScriptableValue(unsigned char *inStack, String inName, ::Dynamic &outValue)
221{
222 unsigned char *frame = inStack - stackSize;
223 if (inName == HX_CSTRING("this"))
224 {
225 outValue = *(hx::Object **)frame;
226 return true;
227 }
228
229
230 for(CppiaStackVarMap::iterator i=varMap.begin();i!=varMap.end();++i)
231 {
232 CppiaStackVar *var = i->second;
233 if ( var->module->strings[ var->nameId]==inName)
234 {
235 outValue = var->getInFrame(frame);
236 return true;
237 }
238 }
239
240 return false;
241}
242
243
244bool ScriptCallable::setScriptableValue(unsigned char *inStack, String inName, ::Dynamic inValue)

Callers 1

Calls 1

getInFrameMethod · 0.80

Tested by

no test coverage detected