///home/berryj/link/bin/genMethods "-g" "-t" "int" "-h" "Collection" "-I" "LINK/basic/SetFuncs.h" "-I" "LINK/basic/Collection.h" "-d" "basic" 
#include <stk.h>
#include <LINK/stkWrapper/LINK_STk.h>

#include <LINK/basic/SetFuncs.h>

#include <LINK/basic/Collection.h>

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


typedef int _int;
typedef Collection<int > _Collection_int_;

#define _Collection_int_DATA(x) ((Collection<int >*) (EXTDATA(x)))
#define _Collection_int_IS_DATA(x) (TYPEP(x, tc_CXXwrapper) && \
		TYPEP(STk_slot_ref(x,val_scm), tc_CXXwrapper) && \
		(EXTID(STk_slot_ref(x,val_scm)) == Wrapper<Collection<int > >::type))
#define _Collection_int_ISNT_DATA(x) (!_Collection_int_IS_DATA(x))

#define _Collection_int_CXX_DATA(x) (*(Collection<int >*) (EXTDATA(VAL(x))))
#define _Collection_int_CXX_IS_DATA(x) (INSTANCEP(x) && \
		TYPEP(STk_slot_ref(x,val_scm), tc_CXXwrapper) && \
		(EXTID(STk_slot_ref(x,val_scm)) == Wrapper<Collection<int > >::type))
#define _Collection_int_CXX_ISNT_DATA(x) (!_Collection_int_CXX_IS_DATA(x))


PRIMITIVE STk_init__Collection_int_()
{
	Wrapper<_Collection_int_>::type = STk_new_CXXwrapper_id(
			Wrapper<_Collection_int_>::name, 
			"",
			(void (*)(SCM x, SCM port, int mode))
			CollectionWrapper<_int>::displayTypedCollection,
			(void (*)(SCM x))CollectionWrapper<_int>::markTypedCollection,
			(void (*)(SCM x))CollectionWrapper<_int>::freeTypedCollection);
	Tcl_InitHashTable(&Register<_Collection_int_>::objTable, TCL_ONE_WORD_KEYS);
	return UNDEFINED;
}

void genExtra_Collection_int_Methods(void);

PRIMITIVE STk_init_methods__Collection_int_()
{
	STk_add_new_cpp_primitive("collection-int?", tc_subr_1, 
	(PRIMITIVE (*)(...))  CollectionWrapper<_int>::collectionP);
	STk_add_new_cpp_primitive("mset-int1", tc_subr_1, 
	(PRIMITIVE (*)(...))  CollectionWrapper<_int>::buildMSet);
	STk_add_new_cpp_primitive("set-int1", tc_subr_1, 
	(PRIMITIVE (*)(...))  CollectionWrapper<_int>::buildSet);
	STk_add_new_cpp_primitive("sequence-int1", tc_subr_1, 
	(PRIMITIVE (*)(...))  CollectionWrapper<_int>::buildSequence);
	STk_add_new_cpp_primitive("Collection-int-sorted?", tc_subr_1, 
	(PRIMITIVE (*)(...))  CollectionWrapper<_int>::sortedLinkCollection);
	STk_add_new_cpp_primitive("Collection-int-size", tc_subr_1, 
	(PRIMITIVE (*)(...))  CollectionWrapper<_int>::sizeLinkCollection);
	STk_add_new_cpp_primitive("Collection-int-null?", tc_subr_1, 
	(PRIMITIVE (*)(...))  CollectionWrapper<_int>::nullLinkCollection);
	STk_add_new_cpp_primitive("Collection-int-eqv?", tc_subr_2, 
	(PRIMITIVE (*)(...))  CollectionWrapper<_int>::eqvLinkCollection);
	STk_add_new_cpp_primitive("Collection-int-<", tc_subr_2, 
	(PRIMITIVE (*)(...))  CollectionWrapper<_int>::lthLinkCollection);
	STk_add_new_cpp_primitive("Collection-int-<=", tc_subr_2, 
	(PRIMITIVE (*)(...))  CollectionWrapper<_int>::leLinkCollection);
	STk_add_new_cpp_primitive("Collection-int->", tc_subr_2, 
	(PRIMITIVE (*)(...))  CollectionWrapper<_int>::grLinkCollection);
	STk_add_new_cpp_primitive("Collection-int->=", tc_subr_2, 
	(PRIMITIVE (*)(...))  CollectionWrapper<_int>::geLinkCollection);
	STk_add_new_cpp_primitive("Collection-int-member", tc_subr_2, 
	(PRIMITIVE (*)(...))  CollectionWrapper<_int>::memberLinkCollection);
	STk_add_new_cpp_primitive("Collection-int-clear!", tc_subr_1, 
	(PRIMITIVE (*)(...))  CollectionWrapper<_int>::clearLinkCollection);
	STk_add_new_cpp_primitive("Collection-int-insert!", tc_subr_2, 
	(PRIMITIVE (*)(...))  CollectionWrapper<_int>::insertLinkCollection);
	STk_add_new_cpp_primitive("Collection-int-append!", tc_subr_2, 
	(PRIMITIVE (*)(...))  CollectionWrapper<_int>::appendLinkCollection);
	STk_add_new_cpp_primitive("Collection-int-remove!", tc_subr_2, 
	(PRIMITIVE (*)(...))  CollectionWrapper<_int>::removeLinkCollection);
	STk_add_new_cpp_primitive("Collection-int-occurrences", tc_subr_2, 
	(PRIMITIVE (*)(...))  CollectionWrapper<_int>::occurrencesLinkCollection);
	STk_add_new_cpp_primitive("Collection-int-ref", tc_subr_2, 
	(PRIMITIVE (*)(...))  CollectionWrapper<_int>::refLinkCollection);
	STk_add_new_cpp_primitive("Collection-int-rank", tc_subr_2, 
	(PRIMITIVE (*)(...))  CollectionWrapper<_int>::rankLinkCollection);
	STk_add_new_cpp_primitive("Collection-int-+", tc_subr_1_or_2, 
	(PRIMITIVE (*)(...))  CollectionWrapper<_int>::unionLinkCollection);
	STk_add_new_cpp_primitive("Collection-int-^", tc_subr_1_or_2, 
	(PRIMITIVE (*)(...))  CollectionWrapper<_int>::intersectionLinkCollection);
	STk_add_new_cpp_primitive("Collection-int--", tc_subr_1_or_2, 
	(PRIMITIVE (*)(...))  CollectionWrapper<_int>::differenceLinkCollection);
	STk_add_new_cpp_primitive("Collection-int-subset", tc_subr_2, 
	(PRIMITIVE (*)(...))  CollectionWrapper<_int>::subsetLinkCollection);
	STk_add_new_cpp_primitive("Collection-int-proper-subset", tc_subr_2, 
	(PRIMITIVE (*)(...))  CollectionWrapper<_int>::properSubsetLinkCollection);
	STk_add_new_cpp_primitive("list->mset-int", tc_subr_1, 
	(PRIMITIVE (*)(...))  CollectionWrapper<_int>::stkList2LinkMSet);
	STk_add_new_cpp_primitive("list->set-int", tc_subr_1, 
	(PRIMITIVE (*)(...))  CollectionWrapper<_int>::stkList2LinkSet);
	STk_add_new_cpp_primitive("list->sequence-int", tc_subr_1, 
	(PRIMITIVE (*)(...))  CollectionWrapper<_int>::stkList2LinkSequence);
	STk_add_new_cpp_primitive("mset-int->list", tc_subr_1, 
	(PRIMITIVE (*)(...))  CollectionWrapper<_int>::collection2STkList);
	STk_add_new_cpp_primitive("set-int->list", tc_subr_1, 
	(PRIMITIVE (*)(...))  CollectionWrapper<_int>::collection2STkList);
	STk_add_new_cpp_primitive("sequence-int->list", tc_subr_1, 
	(PRIMITIVE (*)(...))  CollectionWrapper<_int>::collection2STkList);
	STk_add_new_cpp_primitive("mset-int->string", tc_subr_1, 
	(PRIMITIVE (*)(...))  CollectionWrapper<_int>::collection2STkString);
	STk_add_new_cpp_primitive("set-int->string", tc_subr_1, 
	(PRIMITIVE (*)(...))  CollectionWrapper<_int>::collection2STkString);
	STk_add_new_cpp_primitive("sequence-int->string", tc_subr_1, 
	(PRIMITIVE (*)(...))  CollectionWrapper<_int>::collection2STkString);

	addListMethod("mset-int",
		"mset-int1", LINK_NEW);
	addListMethod("set-int",
		"set-int1", LINK_NEW);
	addListMethod("sequence-int",
		"sequence-int1", LINK_NEW);
	addOneArgMethod("null?",
		Wrapper<_Collection_int_ >::name, 
		"Collection-int-null?", LINK_OVL);
	addOneArgMethod("size",
		Wrapper<_Collection_int_ >::name, 
		"Collection-int-size", LINK_NEW);
	addTwoArgMethod("eqv?",
		Wrapper<_Collection_int_ >::name, 
		Wrapper<_Collection_int_ >::name, 
		"Collection-int-eqv?", LINK_OVL);
	addBooleanMethod("<",
		Wrapper<_Collection_int_ >::name, 
		"Collection-int-<", LINK_OVL);
	addBooleanMethod("<=",
		Wrapper<_Collection_int_ >::name, 
		"Collection-int-<=", LINK_OVL);
	addBooleanMethod(">",
		Wrapper<_Collection_int_ >::name, 
		"Collection-int->", LINK_OVL);
	addBooleanMethod(">=",
		Wrapper<_Collection_int_ >::name, 
		"Collection-int->=", LINK_OVL);
	addTwoArgMethod("member",
		Wrapper<_int >::name, 
		Wrapper<_Collection_int_ >::name, 
		"Collection-int-member", LINK_OVL);
	addTwoArgMethod("ref",
		Wrapper<_Collection_int_ >::name, 
		"<integer>",
		"Collection-int-ref", LINK_NEW);
	addOneArgMethod("clear!",
		Wrapper<_Collection_int_ >::name, 
		"Collection-int-clear!", LINK_NEW);
	addTwoArgMethod("insert!",
		Wrapper<_int >::name, 
		Wrapper<_Collection_int_ >::name, 
		"Collection-int-insert!", LINK_NEW);
	addTwoArgMethod("append!",
		Wrapper<_int >::name, 
		Wrapper<_Collection_int_ >::name, 
		"Collection-int-append!", LINK_NEW);
	addTwoArgMethod("remove!",
		Wrapper<_int >::name, 
		Wrapper<_Collection_int_ >::name, 
		"Collection-int-remove!", LINK_NEW);
	addArbMethod("+",
		Wrapper<_Collection_int_ >::name, 
		"Collection-int-+", LINK_OVL);
	addArbMethod("^",
		Wrapper<_Collection_int_ >::name, 
		"Collection-int-^", LINK_NEW);
	addArbMethod("-",
		Wrapper<_Collection_int_ >::name, 
		"Collection-int--", LINK_OVL);
	genExtra_Collection_int_Methods();
	return UNDEFINED;
}
