Lines Matching refs:OUTPUT

271                 print OUTPUT "  CONFcouple *p".$num." = NULL;\n";
272 print OUTPUT " pm.makeCouples(&p".$num.");\n";
279 print OUTPUT " const char *p".$num." = ";
289 print OUTPUT " $obj *p".$num." = ";
294 print OUTPUT " $type *p".$num." = ";
299 print OUTPUT " $type p".$num." = ";
301 print OUTPUT castFrom($type);
302 print OUTPUT ";\n";
319 print OUTPUT "tp_obj ".$getName."(tp_vm *vm)\n";
320 print OUTPUT "{\n";
322 print OUTPUT " tp_obj self = tp_getraw(vm);\n";
323 …print OUTPUT " IScriptEngine *engine = (IScriptEngine*)tp_get(vm, vm->builtins, tp_string(\"userd…
324 print OUTPUT " IEditor *editor = engine->editor();\n";
325 print OUTPUT " TinyParams pm(vm);\n";
326 print OUTPUT " $cookieName *me=($cookieName *)pm.asThis(&self, $cookieId);\n";
327 print OUTPUT " char const *key = pm.asString();\n";
332 print OUTPUT " if (!strcmp(key, \"$v\"))\n";
333 print OUTPUT " {\n";
337 print OUTPUT " return tp_number(".$getVar{$v}."(";
341 print OUTPUT "editor";
344 print OUTPUT "));\n";
348 print OUTPUT " if(!me) pm.raise(\"$className:No this!\");\n";
349 print OUTPUT " return tp_number(me->".$getVar{$v}."());\n";
352 print OUTPUT " }\n";
362 print OUTPUT " if (!strcmp(key, \"$pyFunc\"))\n";
363 print OUTPUT " {\n";
364 print OUTPUT " return tp_method(vm, self, ".$cfunk.");\n";
365 print OUTPUT " }\n";
369 print OUTPUT " return tp_get(vm, self, tp_string(key));\n";
370 print OUTPUT "}\n";
373 print OUTPUT "tp_obj ".$setName."(tp_vm *vm)\n";
374 print OUTPUT "{\n";
376 print OUTPUT " tp_obj self = tp_getraw(vm);\n";
377 …print OUTPUT " IScriptEngine *engine = (IScriptEngine*)tp_get(vm, vm->builtins, tp_string(\"userd…
378 print OUTPUT " IEditor *editor = engine->editor();\n";
379 print OUTPUT " TinyParams pm(vm);\n";
380 print OUTPUT " $cookieName *me = ($cookieName *)pm.asThis(&self, $cookieId);\n";
381 print OUTPUT " char const *key = pm.asString();\n";
386 print OUTPUT " if (!strcmp(key, \"$v\"))\n";
387 print OUTPUT " {\n";
390 print OUTPUT " ".$typeVars{$v}." val = ".castFrom($typeVars{$v}).";\n";
391 print OUTPUT " ".$setVar{$v}."(";
395 print OUTPUT "editor, ";
398 print OUTPUT "val);\n";
399 print OUTPUT " return tp_None;\n";
402 print OUTPUT " if(!me) pm.raise(\"$className:No this!\");\n";
403 print OUTPUT " ".$typeVars{$v}." val = ".castFrom($typeVars{$v}).";\n";
404 print OUTPUT " me->".$setVar{$v}."(val);\n";
405 print OUTPUT " return tp_None;\n";
408 print OUTPUT " }\n";
412 print OUTPUT " return tp_None;\n";
413 print OUTPUT "}\n";
439 print OUTPUT "// $pyFunc -> $ret $cfunc (@params ) \n";
441 print OUTPUT "static tp_obj ".$glueprefix.$f."(TP)\n {\n";
444 … print OUTPUT " tp_obj self = tp_getraw(tp);\n"; # We need a this as we only deal with instance!
448 …print OUTPUT " IScriptEngine *engine = (IScriptEngine*)tp_get(tp, tp->builtins, tp_string(\"userd…
449 print OUTPUT " IEditor *editor = engine->editor();\n";
452 print OUTPUT " TinyParams pm(tp);\n";
453 print OUTPUT " $cookieName *me = ($cookieName *)pm.asThis(&self, $cookieId);\n\n";
472 print OUTPUT " char *r = ";
475 print OUTPUT " ".$ret." r = ";
480 print OUTPUT " ".$functionPrefix.$cfunc."(";
483 print OUTPUT " me->".$functionPrefix.$cfunc."(";
489 print OUTPUT ",";
491 print OUTPUT "p".$i;
493 print OUTPUT "); \n";
495 print OUTPUT genReturn($ret);
496 print OUTPUT "\n}\n";
509 print OUTPUT "// Dctor\n";
510 print OUTPUT "static void ".$dtor."(tp_vm *vm,tp_obj self)\n";
511 print OUTPUT "{\n";
518 print OUTPUT " $cookieName *cookie = ($cookieName *)self.data.val;\n";
519 print OUTPUT " if (cookie) delete cookie;\n";
520 print OUTPUT " self.data.val = NULL;\n";
522 print OUTPUT "}\n";
528 print OUTPUT "// Ctor (@ctorParams)\n";
529 print OUTPUT "static tp_obj myCtor".$className."(tp_vm *vm)\n";
530 print OUTPUT "{\n";
532 print OUTPUT " tp_obj self = tp_getraw(vm);\n";
533 print OUTPUT " TinyParams pm(vm);\n";
537 print OUTPUT " void *me = NULL;\n";
547 print OUTPUT " $cookieName *me = new $cookieName(";
552 print OUTPUT ",";
554 print OUTPUT "p".$i;
556 print OUTPUT ");\n";
558 print OUTPUT " tp_obj cdata = tp_data(vm, $cookieId, me);\n";
559 print OUTPUT " cdata.data.info->xfree = $dtor;\n";
560 print OUTPUT " tp_set(vm, self, tp_string(\"cdata\"), cdata);\n";
561 print OUTPUT " return tp_None;\n";
562 print OUTPUT "}\n";
574 print OUTPUT "static tp_obj ".$helpName."(TP)\n{\n";
575 …print OUTPUT "\tPythonEngine *engine = (PythonEngine*)tp_get(tp, tp->builtins, tp_string(\"userdat…
580 …print OUTPUT "\tengine->callEventHandlers(IScriptEngine::Information, NULL, -1, \"$f(".join(",",@p…
582 print OUTPUT "\n\treturn tp_None;\n";
583 print OUTPUT "};\n";
590 print OUTPUT "tp_obj initClass".$className."(tp_vm *vm)\n";
591 print OUTPUT "{\n";
592 print OUTPUT " tp_obj myClass = tp_class(vm);\n";
593 … print OUTPUT " tp_set(vm,myClass, tp_string(\"__init__\"), tp_fnc(vm,myCtor".$className."));\n";
594 print OUTPUT " tp_set(vm,myClass, tp_string(\"__set__\"), tp_fnc(vm,".$setName."));\n";
595 print OUTPUT " tp_set(vm,myClass, tp_string(\"__get__\"), tp_fnc(vm,".$getName."));\n";
596 print OUTPUT " tp_set(vm,myClass, tp_string(\"help\"), tp_fnc(vm,$helpName));\n";
597 print OUTPUT " return myClass;\n";
598 print OUTPUT "}\n";
615 open(OUTPUT,">$output") or die("Cannot open $output");
616 print OUTPUT "// Generated by admPyClass.pl do not edit !\n";
626 close(OUTPUT);