///home/berryj/link/bin/genMethods "-g" "-t" "BinGraph*" "-r" "MBinGraph*" "-I" "LINK/graph/BinGraph.h" "-y" "display_graphptr" "-m" "mark_graphptr" "-w" "free_graphptr" "-d" "graph" "-f" "__binGraph_" 
#include <stk.h>
#include <LINK/stkWrapper/LINK_STk.h>

#include <LINK/graph/BinGraph.h>

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

void display_graphptr(SCM, SCM, int);
void mark_graphptr(SCM);
void free_graphptr(SCM);

typedef BinGraph* _BinGraph_;

#define _BinGraph_DATA(x) ((BinGraph**) (EXTDATA(x)))
#define _BinGraph_IS_DATA(x) (TYPEP(x, tc_CXXwrapper) && \
		TYPEP(STk_slot_ref(x,val_scm), tc_CXXwrapper) && \
		(EXTID(STk_slot_ref(x,val_scm)) == Wrapper<BinGraph* >::type))
#define _BinGraph_ISNT_DATA(x) (!_BinGraph_IS_DATA(x))

#define _BinGraph_CXX_DATA(x) (*(BinGraph**) (EXTDATA(VAL(x))))
#define _BinGraph_CXX_IS_DATA(x) (INSTANCEP(x) && \
		TYPEP(STk_slot_ref(x,val_scm), tc_CXXwrapper) && \
		(EXTID(STk_slot_ref(x,val_scm)) == Wrapper<BinGraph* >::type))
#define _BinGraph_CXX_ISNT_DATA(x) (!_BinGraph_CXX_IS_DATA(x))


static SCM is_BinGraph_(SCM i)
{
	if (_BinGraph_CXX_IS_DATA(i))
		return Truth;
	return Ntruth;
}

PRIMITIVE STk_init___binGraph_()
{
	Wrapper<_BinGraph_>::type = STk_new_CXXwrapper_id(
			Wrapper<_BinGraph_>::name, 
			Wrapper<MBinGraph* >::name,
			(void (*)(SCM x, SCM port, int mode))
			display_graphptr,
			(void (*)(SCM x))mark_graphptr,
			(void (*)(SCM x))free_graphptr);
	Tcl_InitHashTable(&Register<_BinGraph_>::objTable, TCL_ONE_WORD_KEYS);
	STk_add_new_cpp_primitive("BinGraph?", tc_subr_1,
	(PRIMITIVE (*)(...))  is_BinGraph_);
	return UNDEFINED;
}

void genExtra__binGraph_Methods(void);

PRIMITIVE STk_init_methods___binGraph_()
{
	genExtra__binGraph_Methods();
	return UNDEFINED;
}
