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

#include <LINK/graph/Vertex.h>

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

void display_vertex(SCM, SCM, int);
void free_vertex(SCM);

typedef Vertex _Vertex;

#define _VertexDATA(x) ((Vertex*) (EXTDATA(x)))
#define _VertexIS_DATA(x) (TYPEP(x, tc_CXXwrapper) && \
		TYPEP(STk_slot_ref(x,val_scm), tc_CXXwrapper) && \
		(EXTID(STk_slot_ref(x,val_scm)) == Wrapper<Vertex >::type))
#define _VertexISNT_DATA(x) (!_VertexIS_DATA(x))

#define _VertexCXX_DATA(x) (*(Vertex*) (EXTDATA(VAL(x))))
#define _VertexCXX_IS_DATA(x) (INSTANCEP(x) && \
		TYPEP(STk_slot_ref(x,val_scm), tc_CXXwrapper) && \
		(EXTID(STk_slot_ref(x,val_scm)) == Wrapper<Vertex >::type))
#define _VertexCXX_ISNT_DATA(x) (!_VertexCXX_IS_DATA(x))


PRIMITIVE STk_init__Vertex()
{
	Wrapper<_Vertex>::type = STk_new_CXXwrapper_id(
			Wrapper<_Vertex>::name, 
			"",
			(void (*)(SCM x, SCM port, int mode))
			display_vertex,
			(void (*)(SCM x))0,
			(void (*)(SCM x))free_vertex);
	Tcl_InitHashTable(&Register<_Vertex>::objTable, TCL_ONE_WORD_KEYS);
	return UNDEFINED;
}

void genExtra_VertexMethods(void);

PRIMITIVE STk_init_methods__Vertex()
{
	genExtra_VertexMethods();
	return UNDEFINED;
}
