TclInterp.h
上传用户:shenzhenrh
上传日期:2013-05-12
资源大小:2904k
文件大小:3k
源码类别:

信息检索与抽取

开发平台:

Unix_Linux

  1. /* Interface for Objective-C Tcl interpreter object
  2.    Copyright (C) 1993,1994  R. Andrew McCallum
  3.    Written by:  R. Andrew McCallum <mccallum@cs.rochester.edu>
  4.    Dept. of Computer Science, U. of Rochester, Rochester, NY  14627
  5.    This file is part of the Tcl/Objective-C interface library.
  6.    This library is free software; you can redistribute it and/or
  7.    modify it under the terms of the GNU Library General Public
  8.    License as published by the Free Software Foundation; either
  9.    version 2 of the License, or (at your option) any later version.
  10.    
  11.    This library is distributed in the hope that it will be useful,
  12.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  13.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  14.    Library General Public License for more details.
  15.    You should have received a copy of the GNU Library General Public
  16.    License along with this library; if not, write to the Free
  17.    Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  18. */ 
  19. #ifndef _TclInterp_h
  20. #define _TclInterp_h
  21. #include <objc/Object.h>
  22. #include <tcl.h>
  23. #include <tclObjc.h>
  24. #if !((TCL_MAJOR_VERSION == 7 && TCL_MINOR_VERSION >= 4) || TCL_MAJOR_VERSION >= 8)
  25. #   define TCLVERSIONLT74 1
  26. #else
  27. #   define TCLVERSIONLT74 0
  28. #endif
  29. #if ((TCL_MAJOR_VERSION == 7 && TCL_MINOR_VERSION > 4) || TCL_MAJOR_VERSION >= 8)
  30. #   define TCLVERSIONGT74 1
  31. #else
  32. #   define TCLVERSIONGT74 0
  33. #endif
  34. @interface TclInterp: Object
  35. {
  36.   @public
  37.   Tcl_Interp *interp;
  38.   int code;
  39.   id namesToObjects;
  40.   id objectsToNames;
  41.   BOOL evalDebugPrint;
  42.   const char *secondaryPath;
  43. }
  44. + initialize;
  45. + firstTcl;
  46. + tclAtIndex: (unsigned)index;
  47. + (unsigned) tclCount;
  48. - initWithArgc: (int)argc argv: (const char **)argv;
  49. - setSecondaryLibraryPath: (const char *)path;
  50. - (const char *)checkTclLibrary;
  51. - (const char *)checkPath: (const char *)base
  52.              subdirectory: (const char *)subdirectory
  53.                      file: (const char *)file;
  54. - (const char *)preInitWithArgc: (int)argc argv: (const char **)argv;
  55. - init;
  56. - free;
  57. - eval: (const char *)fmt, ...;
  58. - globalEval: (const char *)fmt, ...;
  59. - evalFile: (const char *)filename;
  60. - promptAndEval;
  61. - (BOOL)variableExists: (const char *)varName;
  62. - (const char *)variableValue: (const char *)varName;
  63. - (BOOL) globalVariableExists: (const char *)varName;
  64. - (const char *)globalVariableValue: (const char *)varName;
  65. - (int)code;
  66. - (const char *)result;
  67. - (Tcl_Interp *)interp;
  68. - registerObject: anObject withName: (const char *)aName;
  69. - unregisterObject: anObject;
  70. - unregisterObjectNamed: (const char *)aName;
  71. - (const char *)nameForObject:anObject;
  72. - objectNamed: (const char *)aName;
  73. - (BOOL)objectIsRegistered: anObject;
  74. - (BOOL)nameIsRegistered: (const char *)aName;
  75. - setEvalDebugPrint: (BOOL) value;
  76. @end
  77. #endif /* _TclInterp_h */