///home/berryj/link/bin/genMethods "-g" "-t" "Graph" "-I" "LINK/graph/Graph.h" "-d" "graph" "-y" "display_graph" "-w" "free_graph" 
#include <stk.h>
#include <LINK/stkWrapper/LINK_STk.h>

#include <LINK/graph/Graph.h>

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

void display_graph(SCM, SCM, int);
void free_graph(SCM);

typedef Graph _Graph;

#define _GraphDATA(x) ((Graph*) (EXTDATA(x)))
#define _GraphIS_DATA(x) (TYPEP(x, tc_CXXwrapper) && \
		TYPEP(STk_slot_ref(x,val_scm), tc_CXXwrapper) && \
		(EXTID(STk_slot_ref(x,val_scm)) == Wrapper<Graph >::type))
#define _GraphISNT_DATA(x) (!_GraphIS_DATA(x))

#define _GraphCXX_DATA(x) (*(Graph*) (EXTDATA(VAL(x))))
#define _GraphCXX_IS_DATA(x) (INSTANCEP(x) && \
		TYPEP(STk_slot_ref(x,val_scm), tc_CXXwrapper) && \
		(EXTID(STk_slot_ref(x,val_scm)) == Wrapper<Graph >::type))
#define _GraphCXX_ISNT_DATA(x) (!_GraphCXX_IS_DATA(x))


PRIMITIVE STk_init__Graph()
{
	Wrapper<_Graph>::type = STk_new_CXXwrapper_id(
			Wrapper<_Graph>::name, 
			"",
			(void (*)(SCM x, SCM port, int mode))
			display_graph,
			(void (*)(SCM x))0,
			(void (*)(SCM x))free_graph);
	Tcl_InitHashTable(&Register<_Graph>::objTable, TCL_ONE_WORD_KEYS);
	return UNDEFINED;
}

void genExtra_GraphMethods(void);

PRIMITIVE STk_init_methods__Graph()
{
	genExtra_GraphMethods();
	return UNDEFINED;
}
