//genMethods "-g" "-t" "Edge" "-I" "LINK/graph/Edge.h" "-d" "graph" "-y" "display_edge" "-w" "free_edge" 
#include <stk.h>
#include <LINK/stkWrapper/LINK_STk.h>
#include <LINK/graph/Edge.h>
#include <LINK/stkWrapper/Wrapper.h>
#include <LINK/stkWrapper/Register.h>
void display_edge(SCM, SCM, int);
void free_edge(SCM);
typedef Edge _Edge;
#define _EdgeDATA(x) ((Edge*) (EXTDATA(x)))
#define _EdgeIS_DATA(x) (TYPEP(x, tc_CXXwrapper) && \
		TYPEP(STk_slot_ref(x,val_scm), tc_CXXwrapper) && \
		(EXTID(STk_slot_ref(x,val_scm)) == Wrapper<Edge >::type))
#define _EdgeISNT_DATA(x) (!IS_DATA(x))
#define _EdgeCXX_DATA(x) (*(Edge*) (EXTDATA(VAL(x))))
#define _EdgeCXX_IS_DATA(x) (INSTANCEP(x) && \
		TYPEP(STk_slot_ref(x,val_scm), tc_CXXwrapper) && \
		(EXTID(STk_slot_ref(x,val_scm)) == Wrapper<Edge >::type))
#define _EdgeCXX_ISNT_DATA(x) (!CXX_IS_DATA(x))
#include<strstream.h>
void display_edge(SCM c, SCM port, int mode)
{
        ostrstream oss;
	if (_EdgeDATA(c))
        	oss << *_EdgeDATA(c);
        oss << ends;
        char *buffer = oss.str();
        Puts(buffer, (port));
        delete buffer;
}
void free_edge(SCM p)
{
        //cout << "free_edge" << endl;
        if (!EXTSTATICP(p))
                Register<Edge>::deleteEntry(_EdgeDATA(p));
}
// define your new methods above 
// and register them using STk_add_new_cpp_primitive() below
void genExtra_EdgeMethods() {}
