///home/berryj/link/bin/genMethods "-g" "-t" "double" "-d" "basic" "-y" "display_double" "-w" "free_double" 
#include <stk.h>
#include <LINK/stkWrapper/LINK_STk.h>

#include <LINK/stkWrapper/Wrapper.h>
#include <LINK/stkWrapper/Register.h>

void display_double(SCM, SCM, int);
void free_double(SCM);

typedef double _double;

#define _doubleDATA(x) ((double*) (EXTDATA(x)))
#define _doubleIS_DATA(x) (TYPEP(x, tc_CXXwrapper) && \
		TYPEP(STk_slot_ref(x,val_scm), tc_CXXwrapper) && \
		(EXTID(STk_slot_ref(x,val_scm)) == Wrapper<double >::type))
#define _doubleISNT_DATA(x) (!_doubleIS_DATA(x))

#define _doubleCXX_DATA(x) (*(double*) (EXTDATA(VAL(x))))
#define _doubleCXX_IS_DATA(x) (INSTANCEP(x) && \
		TYPEP(STk_slot_ref(x,val_scm), tc_CXXwrapper) && \
		(EXTID(STk_slot_ref(x,val_scm)) == Wrapper<double >::type))
#define _doubleCXX_ISNT_DATA(x) (!_doubleCXX_IS_DATA(x))


PRIMITIVE STk_init__double()
{
	Wrapper<_double>::type = STk_new_CXXwrapper_id(
			Wrapper<_double>::name, 
			"",
			(void (*)(SCM x, SCM port, int mode))
			display_double,
			(void (*)(SCM x))0,
			(void (*)(SCM x))free_double);
	Tcl_InitHashTable(&Register<_double>::objTable, TCL_ONE_WORD_KEYS);
	return UNDEFINED;
}

void genExtra_doubleMethods(void);

PRIMITIVE STk_init_methods__double()
{
	genExtra_doubleMethods();
	return UNDEFINED;
}
