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

#include <LINK/basic/Array.h>

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


typedef char* _char_;
typedef Array<char* > _Array_char__;
static Array<char* > s__Array_char__;

#define _Array_char__DATA(x) ((Array<char* >*) (EXTDATA(x)))
#define _Array_char__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<char* > >::type))
#define _Array_char__ISNT_DATA(x) (!_Array_char__IS_DATA(x))

#define _Array_char__CXX_DATA(x) (*(Array<char* >*) (EXTDATA(VAL(x))))
#define _Array_char__CXX_IS_DATA(x) (INSTANCEP(x) && \
		TYPEP(STk_slot_ref(x,val_scm), tc_CXXwrapper) && \
		(EXTID(STk_slot_ref(x,val_scm)) == Wrapper<Array<char* > >::type))
#define _Array_char__CXX_ISNT_DATA(x) (!_Array_char__CXX_IS_DATA(x))


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

void genExtra_Array_char__Methods(void);

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

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