
/*
**  This file forms part of the GOBLIN C++ Class Library.
**
**  Written by Christian Fremuth-Paeger, March 2001.
**  
**  Copying, compiling, distribution and modification
**  of this source code is permitted only in accordance
**  with the GOBLIN general licence information.
*/             


#include <goblin.h>
#include <tcl.h>
#include <tk.h>


extern "C" int Goblin_Init(Tcl_Interp* interp);
void Goblin_Config() throw();

void *Goblin_Thread(void*);
void Goblin_MasterEventHandler();
void Goblin_TraceEventHandler(char*);
void Goblin_LogEventHandler(msgType,THandle,char*);
bool Goblin_StopSignalHandler();

int Goblin_Cmd (ClientData clientData,Tcl_Interp* interp,
    int argc,char* argv[]) throw();
int Goblin_Delete (ClientData clientData) throw();

int Goblin_Exit (ClientData clientData,Tcl_Interp* interp,
    int argc,char* argv[]) throw();

int Goblin_Generic_Cmd (goblinDataObject* X,Tcl_Interp* interp,
    int argc,char* argv[]) throw(ERRejected,ERRange);

goblinDataObject* Goblin_Read_Object(char*,goblinController&) throw();
int Goblin_Propagate_Exception(Tcl_Interp* interp) throw();


    // Support of GOBLIN Polymorphism

int Goblin_Mixed_Graph_Cmd (ClientData clientData,Tcl_Interp* interp,
    int argc,char* argv[]) throw();
int Goblin_Delete_Mixed_Graph (ClientData clientData) throw();

int Goblin_Sparse_Graph_Cmd (ClientData clientData,Tcl_Interp* interp,
    int argc,char* argv[]) throw();
int Goblin_Delete_Sparse_Graph (ClientData clientData) throw();

int Goblin_Dense_Graph_Cmd (ClientData clientData,Tcl_Interp* interp,
    int argc,char* argv[]) throw();
int Goblin_Delete_Dense_Graph (ClientData clientData) throw();

int Goblin_Sparse_Digraph_Cmd (ClientData clientData,Tcl_Interp* interp,
    int argc,char* argv[]) throw();
int Goblin_Delete_Sparse_Digraph (ClientData clientData) throw();

int Goblin_Dense_Digraph_Cmd (ClientData clientData,Tcl_Interp* interp,
    int argc,char* argv[]) throw();
int Goblin_Delete_Dense_Digraph (ClientData clientData) throw();

int Goblin_Sparse_Bigraph_Cmd (ClientData clientData,Tcl_Interp* interp,
    int argc,char* argv[]) throw();
int Goblin_Delete_Sparse_Bigraph (ClientData clientData) throw();

int Goblin_Dense_Bigraph_Cmd (ClientData clientData,Tcl_Interp* interp,
    int argc,char* argv[]) throw();
int Goblin_Delete_Dense_Bigraph (ClientData clientData) throw();

int Goblin_Balanced_FNW_Cmd (ClientData clientData,Tcl_Interp* interp,
    int argc,char* argv[]) throw();
int Goblin_Delete_Balanced_FNW (ClientData clientData) throw();


    //  Class Dependent Graph Optimization Commands

int Goblin_Undirected_Cmd (abstractGraph* G,Tcl_Interp* interp,
    int argc,char* argv[]) throw(ERRejected,ERRange);

int Goblin_Directed_Cmd (abstractDiGraph* G,Tcl_Interp* interp,
    int argc,char* argv[]) throw(ERRejected,ERRange);


    //  General Commands for Graph Manipulation

int Goblin_Generic_Graph_Cmd (abstractMixedGraph* G,Tcl_Interp* interp,
    int argc,char* argv[]) throw(ERRejected,ERRange);
int Goblin_Node_Cmd (abstractMixedGraph* G,Tcl_Interp* interp,
    int argc,char* argv[]) throw(ERRejected,ERRange);
int Goblin_Arc_Cmd (abstractMixedGraph* G,Tcl_Interp* interp,
    int argc,char* argv[]) throw(ERRejected,ERRange);


    //  Commands for LP/ILP manipulation

int Goblin_Ilp_Cmd (ClientData clientData,Tcl_Interp* interp,
    int argc,char* argv[]) throw();
int Goblin_Row_Cmd (goblinILPWrapper* XLP,Tcl_Interp* interp,
    int argc,char* argv[]) throw(ERRejected,ERRange);
int Goblin_Variable_Cmd (goblinILPWrapper* XLP,Tcl_Interp* interp,
    int argc,char* argv[]) throw(ERRejected,ERRange);
int Goblin_Delete_Ilp (ClientData clientData) throw();
