///home/berryj/link/bin/genMethods "-g" "-t" "Graph*" "-h" "List" "-I" "LINK/basic/List.h" "-I" "LINK/graph/Graph.h" "-d" "graph" 
#include <stk.h>
#include <LINK/stkWrapper/LINK_STk.h>

#include <LINK/basic/List.h>

#include <LINK/graph/Graph.h>

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


typedef Graph* _Graph_;
typedef List<Graph* > _List_Graph__;
static List<Graph* > s__List_Graph__;

#define _List_Graph__DATA(x) ((List<Graph* >*) (EXTDATA(x)))
#define _List_Graph__IS_DATA(x) (TYPEP(x, tc_CXXwrapper) && \
		TYPEP(STk_slot_ref(x,val_scm), tc_CXXwrapper) && \
		(EXTID(STk_slot_ref(x,val_scm)) == Wrapper<List<Graph* > >::type))
#define _List_Graph__ISNT_DATA(x) (!_List_Graph__IS_DATA(x))

#define _List_Graph__CXX_DATA(x) (*(List<Graph* >*) (EXTDATA(VAL(x))))
#define _List_Graph__CXX_IS_DATA(x) (INSTANCEP(x) && \
		TYPEP(STk_slot_ref(x,val_scm), tc_CXXwrapper) && \
		(EXTID(STk_slot_ref(x,val_scm)) == Wrapper<List<Graph* > >::type))
#define _List_Graph__CXX_ISNT_DATA(x) (!_List_Graph__CXX_IS_DATA(x))


PRIMITIVE STk_init__List_Graph__()
{
	Wrapper<_List_Graph__>::type = STk_new_CXXwrapper_id(
			Wrapper<_List_Graph__>::name, 
			"",
			(void (*)(SCM x, SCM port, int mode))
			ListWrapper<_Graph_>::displayTypedList,
			(void (*)(SCM x))ListWrapper<_Graph_>::markTypedList,
			(void (*)(SCM x))ListWrapper<_Graph_>::freeTypedList);
	Tcl_InitHashTable(&Register<_List_Graph__>::objTable, TCL_ONE_WORD_KEYS);
	return UNDEFINED;
}

void genExtra_List_Graph__Methods(void);

PRIMITIVE STk_init_methods__List_Graph__()
{
	STk_add_new_cpp_primitive("List-Graph-make", tc_subr_0, 
	(PRIMITIVE (*)(...))  ListWrapper<_Graph_>::makeLinkList);
	STk_add_new_cpp_primitive("List-Graph?", tc_subr_1, 
	(PRIMITIVE (*)(...))  ListWrapper<_Graph_>::linkListP);
	STk_add_new_cpp_primitive("list->List-Graph", tc_subr_1, 
	(PRIMITIVE (*)(...))  ListWrapper<_Graph_>::stkList2LinkList);
	STk_add_new_cpp_primitive("List-Graph->list", tc_subr_1, 
	(PRIMITIVE (*)(...))  ListWrapper<_Graph_>::linkList2STkList);
	genExtra_List_Graph__Methods();
	return UNDEFINED;
}
