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

#include <LINK/basic/Array.h>

#include <LINK/graph/Vertex.h>

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


typedef Vertex* _Vertex_;
typedef Array<Vertex* > _Array_Vertex__;
static Array<Vertex* > s__Array_Vertex__;

#define _Array_Vertex__DATA(x) ((Array<Vertex* >*) (EXTDATA(x)))
#define _Array_Vertex__IS_DATA(x) (TYPEP(x, tc_CXXwrapper) && \
		TYPEP(STk_slot_ref(x,val_scm), tc_CXXwrapper) && \
		(EXTID(STk_slot_ref(x,val_scm)) == Wrapper<Array<Vertex* > >::type))
#define _Array_Vertex__ISNT_DATA(x) (!_Array_Vertex__IS_DATA(x))

#define _Array_Vertex__CXX_DATA(x) (*(Array<Vertex* >*) (EXTDATA(VAL(x))))
#define _Array_Vertex__CXX_IS_DATA(x) (INSTANCEP(x) && \
		TYPEP(STk_slot_ref(x,val_scm), tc_CXXwrapper) && \
		(EXTID(STk_slot_ref(x,val_scm)) == Wrapper<Array<Vertex* > >::type))
#define _Array_Vertex__CXX_ISNT_DATA(x) (!_Array_Vertex__CXX_IS_DATA(x))


PRIMITIVE STk_init__Array_Vertex__()
{
	Wrapper<_Array_Vertex__>::type = STk_new_CXXwrapper_id(
			Wrapper<_Array_Vertex__>::name, 
			"",
			(void (*)(SCM x, SCM port, int mode))
			ArrayWrapper<_Vertex_>::displayTypedArray,
			(void (*)(SCM x))ArrayWrapper<_Vertex_>::markTypedArray,
			(void (*)(SCM x))ArrayWrapper<_Vertex_>::freeTypedArray);
	Tcl_InitHashTable(&Register<_Array_Vertex__>::objTable, TCL_ONE_WORD_KEYS);
	return UNDEFINED;
}

void genExtra_Array_Vertex__Methods(void);

PRIMITIVE STk_init_methods__Array_Vertex__()
{
	STk_add_new_cpp_primitive("Vector-Vertex-make", tc_subr_1, 
	(PRIMITIVE (*)(...))  ArrayWrapper<_Vertex_>::makeLinkArray);
	STk_add_new_cpp_primitive("Vector-Vertex-make2", tc_subr_2, 
	(PRIMITIVE (*)(...))  ArrayWrapper<_Vertex_>::makeFilledLinkArray);
	STk_add_new_cpp_primitive("Vector-Vertex-vector-ref", tc_subr_2, 
	(PRIMITIVE (*)(...))  ArrayWrapper<_Vertex_>::refLinkArray);
	STk_add_new_cpp_primitive("Vector-Vertex?", tc_subr_1, 
	(PRIMITIVE (*)(...))  ArrayWrapper<_Vertex_>::linkArrayP);
	STk_add_new_cpp_primitive("vector-Vertex", tc_subr_1, 
	(PRIMITIVE (*)(...))  ArrayWrapper<_Vertex_>::buildLinkArray);
	STk_add_new_cpp_primitive("Vector-Vertex-vector-fill!", tc_subr_2, 
	(PRIMITIVE (*)(...))  ArrayWrapper<_Vertex_>::fillLinkArray);
	STk_add_new_cpp_primitive("Vector-Vertex-vector-copy", tc_subr_1, 
	(PRIMITIVE (*)(...))  ArrayWrapper<_Vertex_>::copyLinkArray);
	STk_add_new_cpp_primitive("Vector-Vertex-vector-set!", tc_subr_3, 
	(PRIMITIVE (*)(...))  ArrayWrapper<_Vertex_>::setLinkArray);
	STk_add_new_cpp_primitive("Vector-Vertex-vector-length", tc_subr_1, 
	(PRIMITIVE (*)(...))  ArrayWrapper<_Vertex_>::lengthLinkArray);
	STk_add_new_cpp_primitive("Vector-Vertex-eqv?", tc_subr_2, 
	(PRIMITIVE (*)(...))  ArrayWrapper<_Vertex_>::eqvLinkArray);
	STk_add_new_cpp_primitive("Vector-Vertex-<", tc_subr_2, 
	(PRIMITIVE (*)(...))  ArrayWrapper<_Vertex_>::lthLinkArray);
	STk_add_new_cpp_primitive("Vector-Vertex-<=", tc_subr_2, 
	(PRIMITIVE (*)(...))  ArrayWrapper<_Vertex_>::leLinkArray);
	STk_add_new_cpp_primitive("Vector-Vertex->", tc_subr_2, 
	(PRIMITIVE (*)(...))  ArrayWrapper<_Vertex_>::grLinkArray);
	STk_add_new_cpp_primitive("Vector-Vertex->=", tc_subr_2, 
	(PRIMITIVE (*)(...))  ArrayWrapper<_Vertex_>::geLinkArray);
	STk_add_new_cpp_primitive("Vector-Vertex-vector-resize", tc_subr_2, 
	(PRIMITIVE (*)(...))  ArrayWrapper<_Vertex_>::resizeLinkArray);
	STk_add_new_cpp_primitive("list->Vector-Vertex", tc_subr_1, 
	(PRIMITIVE (*)(...))  ArrayWrapper<_Vertex_>::stkList2LinkArray);
	STk_add_new_cpp_primitive("Vector-Vertex->list", tc_subr_1, 
	(PRIMITIVE (*)(...))  ArrayWrapper<_Vertex_>::linkArray2STkList);

	addOneArgMethod("vector-copy",
		Wrapper<_Array_Vertex__ >::name, 
		"Vector-Vertex-vector-copy", LINK_OVL);
	addOneArgMethod("vector->list",
		Wrapper<_Array_Vertex__ >::name, 
		"Vector-Vertex-vector->list", LINK_OVL);
	addOneArgMethod("vector-length",
		Wrapper<_Array_Vertex__ >::name, 
		"Vector-Vertex-vector-length", LINK_OVL);
	addTwoArgMethod("vector-ref",
		Wrapper<_Array_Vertex__ >::name, 
		"<integer>",
		"Vector-Vertex-vector-ref", LINK_OVL);
	addTwoArgMethod("vector-fill!",
		Wrapper<_Array_Vertex__ >::name, 
		Wrapper<_Vertex_ >::name, 
		"Vector-Vertex-vector-fill!", LINK_OVL);
	addTwoArgMethod("vector-resize",
		Wrapper<_Array_Vertex__ >::name, 
		"<integer>",
		"Vector-Vertex-vector-resize", LINK_OVL);
	addThreeArgMethod("vector-set!",
		Wrapper<_Array_Vertex__ >::name, 
		"<integer>",
		Wrapper<_Vertex_ >::name, 
		"Vector-Vertex-vector-set!", LINK_OVL);
	addTwoArgMethod("eqv?",
		Wrapper<_Array_Vertex__ >::name, 
		Wrapper<_Array_Vertex__ >::name, 
		"Vector-Vertex-eqv?", LINK_OVL);
	addBooleanMethod("<",
		Wrapper<_Array_Vertex__ >::name, 
		"Vector-Vertex-<", LINK_OVL);
	addBooleanMethod("<=",
		Wrapper<_Array_Vertex__ >::name, 
		"Vector-Vertex-<=", LINK_OVL);
	addBooleanMethod(">",
		Wrapper<_Array_Vertex__ >::name, 
		"Vector-Vertex->", LINK_OVL);
	addBooleanMethod(">=",
		Wrapper<_Array_Vertex__ >::name, 
		"Vector-Vertex->=", LINK_OVL);
	genExtra_Array_Vertex__Methods();
	return UNDEFINED;
}
