1 /* methodcmd.swg : Tcl method invocation */
3 static int Tcl@CLASS@MethodCmd(ClientData clientData, Tcl_Interp *interp, int argc, char **argv) {
4 int (*cmd)(ClientData, Tcl_Interp *, int, char **) = 0;
5 char temp[256], *oldarg;
11 Tcl_SetResult(interp,"@CLASS@ methods : { @METHODLIST@ }",TCL_STATIC);
15 length = strlen(argv[1]);
16 SWIG_MakePtr(temp,(void *) clientData, "@CLASSMANGLE@");
19 else if ((c == 'c') && (strncmp(argv[1],"configure",length) == 0) && (length >= 2)) {
27 rcode = (*cmd)(clientData,interp,3,&argv[i-1]);
29 if (rcode == TCL_ERROR) return rcode;
32 Tcl_SetResult(interp,"Invalid configure option. Must be { @CONFIGLIST@ }",TCL_STATIC);
37 if ((i < argc) || (i == 2)) {
38 Tcl_SetResult(interp,"{ @CONFIGLIST@ }",TCL_STATIC);
42 } else if ((c == 'c') && (strncmp(argv[1],"cget",length) == 0) && (length >= 2)) {
46 else if (strcmp(argv[2],"-this") == 0) {
47 SWIG_MakePtr(interp->result,(void *) clientData, "@CLASSMANGLE@");
53 rcode = (*cmd)(clientData,interp,argc-1,&argv[1]);
57 Tcl_SetResult(interp,"Invalid cget option. Must be { -this @CGETLIST@ }",TCL_STATIC);
61 Tcl_SetResult(interp,"{ -this @CGETLIST@ }", TCL_STATIC);
66 Tcl_SetResult(interp,"Invalid Method. Must be { @METHODLIST@}",TCL_STATIC);
71 rcode = (*cmd)(clientData,interp,argc,argv);