Back to index

plt-scheme  4.2.1
Functions
wxs_obj.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void objscheme_setup_wxObject (Scheme_Env *env)
int objscheme_istype_wxObject (Scheme_Object *obj, const char *stop, int nullOK)
Scheme_Objectobjscheme_bundle_wxObject (class wxObject *realobj)
class wxObjectobjscheme_unbundle_wxObject (Scheme_Object *obj, const char *where, int nullOK)

Function Documentation

Definition at line 133 of file wxs_obj.cxx.

{
  Scheme_Class_Object *obj INIT_NULLED_OUT;
  Scheme_Object *sobj INIT_NULLED_OUT;

  if (!realobj) return XC_SCHEME_NULL;

  if (realobj->__gc_external)
    return (Scheme_Object *)realobj->__gc_external;

  SETUP_VAR_STACK(2);
  VAR_STACK_PUSH(0, obj);
  VAR_STACK_PUSH(1, realobj);

  if ((sobj = WITH_VAR_STACK(objscheme_bundle_by_type(realobj, realobj->__type))))
    { READY_TO_RETURN; return sobj; }
  obj = (Scheme_Class_Object *)WITH_VAR_STACK(scheme_make_uninited_object(os_wxObject_class));

  obj->primdata = realobj;
  WITH_VAR_STACK(objscheme_register_primpointer(obj, &obj->primdata));
  obj->primflag = 0;

  realobj->__gc_external = (void *)obj;
  READY_TO_RETURN;
  return (Scheme_Object *)obj;
}

Here is the call graph for this function:

Here is the caller graph for this function:

int objscheme_istype_wxObject ( Scheme_Object obj,
const char *  stop,
int  nullOK 
)

Definition at line 119 of file wxs_obj.cxx.

{
  REMEMBER_VAR_STACK();
  if (nullOK && XC_SCHEME_NULLP(obj)) return 1;
  if (objscheme_is_a(obj,  os_wxObject_class))
    return 1;
  else {
    if (!stop)
       return 0;
    WITH_REMEMBERED_STACK(scheme_wrong_type(stop, nullOK ? "object% object or " XC_NULL_STR: "object% object", -1, 0, &obj));
    return 0;
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 102 of file wxs_obj.cxx.

Here is the call graph for this function:

Here is the caller graph for this function:

class wxObject* objscheme_unbundle_wxObject ( Scheme_Object obj,
const char *  where,
int  nullOK 
)

Definition at line 160 of file wxs_obj.cxx.

{
  if (nullOK && XC_SCHEME_NULLP(obj)) return NULL;

  REMEMBER_VAR_STACK();

  (void)objscheme_istype_wxObject(obj, where, nullOK);
  Scheme_Class_Object *o = (Scheme_Class_Object *)obj;
  WITH_REMEMBERED_STACK(objscheme_check_valid(NULL, NULL, 0, &obj));
  if (o->primflag)
    return (os_wxObject *)o->primdata;
  else
    return (wxObject *)o->primdata;
}

Here is the call graph for this function: