Java Doc for Var.java in  » Scripting » jacl » tcl » lang » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Scripting » jacl » tcl.lang 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   tcl.lang.Var

Var
public class Var (Code)


Field Summary
final static  intARRAY
    
final static  intARRAY_ELEMENT
    
final static  intEXPLICIT_LOCAL_NAME
    
final static  intIN_HASHTABLE
    
final static  intLINK
    
final static  intNAMESPACE_VAR
    
final static  intNON_LOCAL
    
final static  intNO_CACHE
    
final static  intSCALAR
     Flag bits for variables.
final static  intTRACE_ACTIVE
    
final static  intTRACE_EXISTS
    
final static  intUNDEFINED
    
 HashMaparraymap
    
final static  StringbadNamespace
    
final static  StringdanglingElement
    
final static  StringdanglingVar
    
 intflags
     Miscellaneous bits of information about variable.
 StringhashKey
     The key under which this variable is stored in the hash table.
final static  StringisArray
    
 Varlinkto
    
final static  StringmissingName
    
final static  StringneedArray
    
final static  StringnoSuchElement
    
final static  StringnoSuchVar
    
 Namespacens
     Reference to the namespace that contains this variable.
 intrefCount
     Counts number of active uses of this variable, not including its entry in the call frame or the hash table: 1 for each additional variable whose link points here, 1 for each nested trace active on variable, and 1 if the variable is a namespace variable.
 ArrayListsidVec
    
 HashMaptable
     If variable is in a hashtable, either the hash table entry that refers to this variable or null if the variable has been detached from its hash table (e.g.
 TclObjecttobj
     A Var object is one of the following three types.
  • Scalar variable - tobj is the object stored in the var.
  • Array variable - arraymap is the hashtable that stores all the elements.
  •  ArrayListtraces
        

    Constructor Summary
     Var()
         NewVar -> Var Construct a variable and initialize its fields.

    Method Summary
    static  voidAppendLocals(Interp interp, TclObject list, String pattern, boolean includeLinks)
        
    protected static  StringcallTraces(Interp interp, Var array, Var var, String part1, String part2, int flags)
         CallTraces -> callTraces This procedure is invoked to find and invoke relevant trace procedures associated with a particular operation on a variable.
    protected static  voidcleanupVar(Var var, Var array)
         CleanupVar -> cleanupVar This procedure is called when it looks like it may be OK to free up the variable's record and hash table entry, and those of its containing parent.
    final  voidclearVarInHashtable()
        
    final  voidclearVarTraceExists()
        
    final  voidclearVarUndefined()
        
    protected static  voiddeleteArray(Interp interp, String arrayName, Var var, int flags)
         DeleteArray -> deleteArray This procedure is called to free up everything in an array variable.
    protected static  voiddeleteSearches(Var arrayVar)
         DeleteSearches -> deleteSearches This procedure is called to free up all of the searches associated with an array variable.
    protected static  voiddeleteVar(Interp interp, Var var, int flags)
         deleteVar This procedure is called to recycle all the storage space associated with a single Var instance.
    protected static  voiddeleteVars(Interp interp, HashMap table)
         TclDeleteVars -> deleteVars This procedure is called to recycle all the storage space associated with a table of variables.
    protected static  voiddeleteVars(Interp interp, Var[] compiledLocals)
         // FIXME: Make more like TclDeleteCompiledLocalVars() TclDeleteVars -> deleteVars This procedure is called to recycle all the storage space associated with an array of variables.
    protected  intgetNextIndex()
         Used by ArrayCmd to create a unique searchId string.
    protected  IteratorgetSearch(String s)
         Find the SearchId that in the sidVec List that is equal the unique String s and returns the iterator associated with that SearchId.
    protected static  ArrayListgetTraces(Interp interp, String part1, String part2, int flags)
        
    static  TclObjectgetVar(Interp interp, String part1, String part2, int flags)
         Tcl_GetVar2Ex -> getVar Query the value of a variable, given a two-part name consisting of array name and element within array.
    Parameters:
      interp - the interp that holds the variable
    Parameters:
      part1 - 1st part of the variable name.
    Parameters:
      part2 - 2nd part of the variable name.
    Parameters:
      flags - misc flags that control the actions of this method.
    static  TclObjectgetVarCompiledLocalArray(Interp interp, String varname, String key, Var resolved, boolean leaveErrMsg)
        
    static  TclObjectgetVarCompiledLocalArrayInvalid(Interp interp, String varname, String key)
        
    static  TclObjectgetVarCompiledLocalScalarInvalid(Interp interp, String varname)
        
    static  TclObjectgetVarPtr(Interp interp, Var var, Var array, String part1, String part2, int flags)
         TclPtrGetVar -> getVarPtr Query the value of a variable, given refs to the variables Var objects.
    Parameters:
      interp - the interp that holds the variable
    Parameters:
      part1 - 1st part of the variable name.
    Parameters:
      part2 - 2nd part of the variable name.
    Parameters:
      flags - misc flags that control the actions of this method.
    public static  StringgetVariableFullName(Interp interp, Var var)
        
    static  TclObjectincrVar(Interp interp, String part1, String part2, int incrAmount, int flags)
         TclIncrVar2 -> incrVar Given a two-part variable name, which may refer either to a scalar variable or an element of an array, increment the Tcl object value of the variable by a specified amount.
    Parameters:
      part1 - 1st part of the variable name.
    Parameters:
      part2 - 2nd part of the variable name.
    Parameters:
      incrAmount - Amount to be added to variable.
    Parameters:
      flags - misc flags that control the actions of this methodResults:Returns a reference to the TclObject holding the new value of thevariable.
    static  TclObjectinitVarCompiledLocalArray(Interp interp, String varname, String key, TclObject newValue, Var[] compiledLocals, int localIndex)
        
    static  TclObjectinitVarCompiledLocalScalar(Interp interp, String varname, TclObject newValue, Var[] compiledLocals, int localIndex)
        
    final public static  booleanisArrayVarname(String varName)
        
    final  booleanisVarArray()
        
    final  booleanisVarArrayElement()
        
    final  booleanisVarInHashtable()
        
    final  booleanisVarLink()
        
    final  booleanisVarNamespace()
        
    final  booleanisVarNoCache()
        
    final  booleanisVarNonLocal()
        
    final  booleanisVarScalar()
        
    final  booleanisVarTraceExists()
        
    final  booleanisVarUndefined()
        
    static  Var[]lookupArrayElement(Interp interp, String part1, String part2, int flags, String msg, boolean createPart1, boolean createPart2, Var var)
        
    static  Var[]lookupVar(Interp interp, String part1, String part2, int flags, String msg, boolean createPart1, boolean createPart2)
         TclLookupVar -> lookupVar This procedure is used by virtually all of the variable code to locate a variable given its name(s).
    Parameters:
      part1 - if part2 isn't NULL, this is the name of an array.Otherwise, this is a full variable name that could include a parenthesized array elemnt or a scalar.
    Parameters:
      part2 - Name of an element within array, or null.
    Parameters:
      flags - Only the TCL.GLOBAL_ONLY bit matters.
    Parameters:
      msg - Verb to use in error messages, e.g.
    protected static  voidmakeUpvar(Interp interp, CallFrame frame, String otherP1, String otherP2, int otherFlags, String myName, int myFlags, int localIndex)
         MakeUpvar -> makeUpvar Create a reference of a variable in otherFrame in the current CallFrame, given a two-part name consisting of array name and element within array.
    Parameters:
      interp - Interp containing the variables
    Parameters:
      frame - CallFrame containing "other" variable.null means use global context.
    Parameters:
      otherP1 - the 1st part name of the variable in the "other" frame.
    Parameters:
      otherP2 - the 2nd part name of the variable in the "other" frame.
    Parameters:
      otherFlags - the flags for scaope of "other" variable
    Parameters:
      myName - Name of scalar variable which will refer to otherP1/otherP2.
    Parameters:
      myFlags - only the TCL.GLOBAL_ONLY bit matters, indicating the scope of myName.
    exception:
      TclException - if the upvar cannot be created.
    protected  booleanremoveSearch(String sid)
         Find the SearchId object in the sidVec list and remove it.
    static  VarresolveArray(Var v)
        
    static  VarresolveScalar(Var v)
        
    static  voidsetUndefinedToNull(Interp interp, String part1, String part2)
        
    static  TclObjectsetVar(Interp interp, String part1, String part2, TclObject newValue, int flags)
         Tcl_SetVar2Ex -> setVar Given a two-part variable name, which may refer either to a scalar variable or an element of an array, change the value of the variable to a new Tcl object value.
    final  voidsetVarArray()
        
    final  voidsetVarArrayElement()
        
    static  TclObjectsetVarCompiledLocalArray(Interp interp, String varname, String key, TclObject newValue, Var resolved)
        
    static  TclObjectsetVarCompiledLocalArrayInvalid(Interp interp, String varname, String key, TclObject newValue)
        
    static  TclObjectsetVarCompiledLocalScalarInvalid(Interp interp, String varname, TclObject newValue)
        
    final  voidsetVarInHashtable()
        
    final  voidsetVarLink()
        
    final  voidsetVarNamespace()
        
    final  voidsetVarNoCache()
        
    final  voidsetVarNonLocal()
        
    static  TclObjectsetVarPtr(Interp interp, Var var, Var array, String part1, String part2, TclObject newValue, int flags)
         TclPtrSetVar -> setVarPtr This method implements setting of a variable value that has already been resolved into Var refrences.
    final  voidsetVarScalar()
        
    final  voidsetVarTraceExists()
        
    final  voidsetVarUndefined()
        
    public  StringtoString()
         Used to create a String that describes this variable.
    static  voidtraceVar(Interp interp, String part1, String part2, int flags, VarTrace proc)
         Tcl_TraceVar2 -> traceVar Trace a variable, given a two-part name consisting of array name and element within array.
    static  voidunsetVar(Interp interp, String part1, String part2, int flags)
         Tcl_UnsetVar2 -> unsetVar Unset a variable, given a two-part name consisting of array name and element within array.
    Parameters:
      part1 - 1st part of the variable name.
    Parameters:
      part2 - 2nd part of the variable name.
    Parameters:
      flags - misc flags that control the actions of this method.If part1 and part2 indicate a local or global variable in interp,it is deleted.
    static  voiduntraceVar(Interp interp, String part1, String part2, int flags, VarTrace proc)
         Tcl_UntraceVar2 -> untraceVar Untrace a variable, given a two-part name consisting of array name and element within array.

    Field Detail
    ARRAY
    final static int ARRAY(Code)



    ARRAY_ELEMENT
    final static int ARRAY_ELEMENT(Code)



    EXPLICIT_LOCAL_NAME
    final static int EXPLICIT_LOCAL_NAME(Code)



    IN_HASHTABLE
    final static int IN_HASHTABLE(Code)



    LINK
    final static int LINK(Code)



    NAMESPACE_VAR
    final static int NAMESPACE_VAR(Code)



    NON_LOCAL
    final static int NON_LOCAL(Code)



    NO_CACHE
    final static int NO_CACHE(Code)



    SCALAR
    final static int SCALAR(Code)
    Flag bits for variables. The first three (SCALAR, ARRAY, and LINK) are mutually exclusive and give the "type" of the variable. UNDEFINED is independent of the variable's type. Note that using an int field here instead of allocating 9 boolean members makes the resulting object take up less memory. If there were only 8 boolean fields then the size of the Var object would be the same. SCALAR - 1 means this is a scalar variable and not an array or link. The tobj field contains the variable's value. ARRAY - 1 means this is an array variable rather than a scalar variable or link. The arraymap field points to the array's hashtable for its elements. LINK - 1 means this Var structure contains a reference to another Var structure that either has the real value or is itself another LINK pointer. Variables like this come about through "upvar" and "global" commands, or through references to variables in enclosing namespaces. UNDEFINED - 1 means that the variable is in the process of being deleted. An undefined variable logically does not exist and survives only while it has a trace, or if it is a global variable currently being used by some procedure. IN_HASHTABLE - 1 means this variable is in a hashtable. 0 if a local variable that was assigned a slot in a procedure frame by the compiler so the Var storage is part of the call frame. TRACE_EXISTS - 1 means that trace(s) exist on this scalar or array variable. This flag is set when (var.traces == null), it is cleared when there are no more traces. TRACE_ACTIVE - 1 means that trace processing is currently underway for a read or write access, so new read or write accesses should not cause trace procedures to be called and the variable can't be deleted. ARRAY_ELEMENT - 1 means that this variable is an array element, so it is not legal for it to be an array itself (the ARRAY flag had better not be set). NAMESPACE_VAR - 1 means that this variable was declared as a namespace variable. This flag ensures it persists until its namespace is destroyed or until the variable is unset; it will persist even if it has not been initialized and is marked undefined. The variable's refCount is incremented to reflect the "reference" from its namespace. NO_CACHE - 1 means that code should not be able to hold a cached reference to this variable. This flag is only set for Var objects returned by a namespace or interp resolver. It is not possible to clear this flag, so the variable can't be cached as long as it is alive. NON_LOCAL - 1 means that the variable exists in the compiled local table, but it is not a local or imported local. This flag is only set in compiled code when scoped global var refs like $::myvar are found. These variables are not considered part of a variable frame and can't be found at runtime.



    TRACE_ACTIVE
    final static int TRACE_ACTIVE(Code)



    TRACE_EXISTS
    final static int TRACE_EXISTS(Code)



    UNDEFINED
    final static int UNDEFINED(Code)



    arraymap
    HashMap arraymap(Code)



    badNamespace
    final static String badNamespace(Code)



    danglingElement
    final static String danglingElement(Code)



    danglingVar
    final static String danglingVar(Code)



    flags
    int flags(Code)
    Miscellaneous bits of information about variable.
    See Also:   Var.SCALAR
    See Also:   Var.ARRAY
    See Also:   Var.LINK
    See Also:   Var.UNDEFINED
    See Also:   Var.IN_HASHTABLE
    See Also:   Var.TRACE_ACTIVE
    See Also:   Var.ARRAY_ELEMENT
    See Also:   Var.NAMESPACE_VAR



    hashKey
    String hashKey(Code)
    The key under which this variable is stored in the hash table.



    isArray
    final static String isArray(Code)



    linkto
    Var linkto(Code)



    missingName
    final static String missingName(Code)



    needArray
    final static String needArray(Code)



    noSuchElement
    final static String noSuchElement(Code)



    noSuchVar
    final static String noSuchVar(Code)



    ns
    Namespace ns(Code)
    Reference to the namespace that contains this variable. This is set only for namespace variables. A local variable in a procedure will always have a null ns field.



    refCount
    int refCount(Code)
    Counts number of active uses of this variable, not including its entry in the call frame or the hash table: 1 for each additional variable whose link points here, 1 for each nested trace active on variable, and 1 if the variable is a namespace variable. This record can't be deleted until refCount becomes 0.



    sidVec
    ArrayList sidVec(Code)



    table
    HashMap table(Code)
    If variable is in a hashtable, either the hash table entry that refers to this variable or null if the variable has been detached from its hash table (e.g. an array is deleted, but some of its elements are still referred to in upvars). null if the variable is not in a hashtable. This is used to delete an variable from its hashtable if it is no longer needed.



    tobj
    TclObject tobj(Code)
    A Var object is one of the following three types.
  • Scalar variable - tobj is the object stored in the var.
  • Array variable - arraymap is the hashtable that stores all the elements.

  • Upvar (Link) - linkto is the variable associated by this upvar.



  • traces
    ArrayList traces(Code)
    List that holds the traces that were placed in this Var




    Constructor Detail
    Var
    Var()(Code)
    NewVar -> Var Construct a variable and initialize its fields.




    Method Detail
    AppendLocals
    static void AppendLocals(Interp interp, TclObject list, String pattern, boolean includeLinks) throws TclException(Code)



    callTraces
    protected static String callTraces(Interp interp, Var array, Var var, String part1, String part2, int flags)(Code)
    CallTraces -> callTraces This procedure is invoked to find and invoke relevant trace procedures associated with a particular operation on a variable. This procedure invokes traces both on the variable and on its containing array (where relevant).
    Parameters:
      interp - Interpreter containing variable.
    Parameters:
      array - array variable that contains the variable, or nullif the variable isn't an element of an array.
    Parameters:
      var - Variable whose traces are to be invoked.
    Parameters:
      part1 - the first part of a variable name.
    Parameters:
      part2 - the second part of a variable name.
    Parameters:
      flags - Flags to pass to trace procedures: indicateswhat's happening to variable, plus other stuff likeTCL.GLOBAL_ONLY, TCL.NAMESPACE_ONLY, and TCL.INTERP_DESTROYED. null if no trace procedures were invoked, orif all the invoked trace procedures returned successfully.The return value is non-null if a trace procedure returned anerror (in this case no more trace procedures were invokedafter the error was returned). In this case the return valueis a pointer to a string describing the error.



    cleanupVar
    protected static void cleanupVar(Var var, Var array)(Code)
    CleanupVar -> cleanupVar This procedure is called when it looks like it may be OK to free up the variable's record and hash table entry, and those of its containing parent. It's called, for example, when a trace on a variable deletes the variable.
    Parameters:
      var - variable that may be a candidate for being expunged.
    Parameters:
      array - Array that contains the variable, or NULL if thisvariable isn't an array element.



    clearVarInHashtable
    final void clearVarInHashtable()(Code)



    clearVarTraceExists
    final void clearVarTraceExists()(Code)



    clearVarUndefined
    final void clearVarUndefined()(Code)



    deleteArray
    protected static void deleteArray(Interp interp, String arrayName, Var var, int flags)(Code)
    DeleteArray -> deleteArray This procedure is called to free up everything in an array variable. It's the caller's responsibility to make sure that the array is no longer accessible before this procedure is called.
    Parameters:
      interp - Interpreter containing array.
    Parameters:
      arrayName - name of array (used for trace callbacks).
    Parameters:
      var - the array variable to delete.
    Parameters:
      flags - Flags to pass to CallTraces.



    deleteSearches
    protected static void deleteSearches(Var arrayVar)(Code)
    DeleteSearches -> deleteSearches This procedure is called to free up all of the searches associated with an array variable.
    Parameters:
      interp - Interpreter containing array.
    Parameters:
      arrayVar - the array variable to delete searches from.



    deleteVar
    protected static void deleteVar(Interp interp, Var var, int flags)(Code)
    deleteVar This procedure is called to recycle all the storage space associated with a single Var instance.
    Parameters:
      interp - Interpreter containing array.
    Parameters:
      var - A Var refrence to be deleted
    Parameters:
      flags - flags to pass to trace callbacks.



    deleteVars
    protected static void deleteVars(Interp interp, HashMap table)(Code)
    TclDeleteVars -> deleteVars This procedure is called to recycle all the storage space associated with a table of variables. For this procedure to work correctly, it must not be possible for any of the variables in the table to be accessed from Tcl commands (e.g. from trace procedures).
    Parameters:
      interp - Interpreter containing array.
    Parameters:
      table - HashMap that holds the Vars to delete



    deleteVars
    protected static void deleteVars(Interp interp, Var[] compiledLocals)(Code)
    // FIXME: Make more like TclDeleteCompiledLocalVars() TclDeleteVars -> deleteVars This procedure is called to recycle all the storage space associated with an array of variables. For this procedure to work correctly, it must not be possible for any of the variables in the array to be accessed from Tcl commands (e.g. from trace procedures).
    Parameters:
      interp - Interpreter containing array.
    Parameters:
      compiledLocals - array of compiled local variables



    getNextIndex
    protected int getNextIndex()(Code)
    Used by ArrayCmd to create a unique searchId string. If the sidVec List is empty then simply return 1. Else return 1 plus the SearchId.index value of the last Object in the vector.
    Parameters:
      None - The int value for unique SearchId string.



    getSearch
    protected Iterator getSearch(String s)(Code)
    Find the SearchId that in the sidVec List that is equal the unique String s and returns the iterator associated with that SearchId.
    Parameters:
      s - String that ia a unique identifier for a SearchId object Iterator if a match is found else null.



    getTraces
    protected static ArrayList getTraces(Interp interp, String part1, String part2, int flags) throws TclException(Code)
    Tcl_VarTraceInfo2 -> getTraces the list of traces of a variable.
    Parameters:
      interp - Interpreter containing variable.
    Parameters:
      part1 - 1st part of the variable name.
    Parameters:
      part2 - 2nd part of the variable name (can be null).
    Parameters:
      flags - misc flags that control the actions of this method.



    getVar
    static TclObject getVar(Interp interp, String part1, String part2, int flags) throws TclException(Code)
    Tcl_GetVar2Ex -> getVar Query the value of a variable, given a two-part name consisting of array name and element within array.
    Parameters:
      interp - the interp that holds the variable
    Parameters:
      part1 - 1st part of the variable name.
    Parameters:
      part2 - 2nd part of the variable name.
    Parameters:
      flags - misc flags that control the actions of this method. the value of the variable.



    getVarCompiledLocalArray
    static TclObject getVarCompiledLocalArray(Interp interp, String varname, String key, Var resolved, boolean leaveErrMsg) throws TclException(Code)



    getVarCompiledLocalArrayInvalid
    static TclObject getVarCompiledLocalArrayInvalid(Interp interp, String varname, String key) throws TclException(Code)



    getVarCompiledLocalScalarInvalid
    static TclObject getVarCompiledLocalScalarInvalid(Interp interp, String varname) throws TclException(Code)



    getVarPtr
    static TclObject getVarPtr(Interp interp, Var var, Var array, String part1, String part2, int flags) throws TclException(Code)
    TclPtrGetVar -> getVarPtr Query the value of a variable, given refs to the variables Var objects.
    Parameters:
      interp - the interp that holds the variable
    Parameters:
      part1 - 1st part of the variable name.
    Parameters:
      part2 - 2nd part of the variable name.
    Parameters:
      flags - misc flags that control the actions of this method. the value of the variable.



    getVariableFullName
    public static String getVariableFullName(Interp interp, Var var)(Code)



    incrVar
    static TclObject incrVar(Interp interp, String part1, String part2, int incrAmount, int flags) throws TclException(Code)
    TclIncrVar2 -> incrVar Given a two-part variable name, which may refer either to a scalar variable or an element of an array, increment the Tcl object value of the variable by a specified amount.
    Parameters:
      part1 - 1st part of the variable name.
    Parameters:
      part2 - 2nd part of the variable name.
    Parameters:
      incrAmount - Amount to be added to variable.
    Parameters:
      flags - misc flags that control the actions of this methodResults:Returns a reference to the TclObject holding the new value of thevariable. If the specified variable doesn't exist, or there is aclash in array usage, or an error occurs while executing variabletraces, then a TclException will be raised.Side effects:The value of the given variable is incremented by the specifiedamount. If either the array or the entry didn't exist then a newvariable is created. The ref count for the returned object is _not_incremented to reflect the returned reference; if you want to keep areference to the object you must increment its ref count yourself.----------------------------------------------------------------------



    initVarCompiledLocalArray
    static TclObject initVarCompiledLocalArray(Interp interp, String varname, String key, TclObject newValue, Var[] compiledLocals, int localIndex) throws TclException(Code)



    initVarCompiledLocalScalar
    static TclObject initVarCompiledLocalScalar(Interp interp, String varname, TclObject newValue, Var[] compiledLocals, int localIndex) throws TclException(Code)



    isArrayVarname
    final public static boolean isArrayVarname(String varName)(Code)



    isVarArray
    final boolean isVarArray()(Code)



    isVarArrayElement
    final boolean isVarArrayElement()(Code)



    isVarInHashtable
    final boolean isVarInHashtable()(Code)



    isVarLink
    final boolean isVarLink()(Code)



    isVarNamespace
    final boolean isVarNamespace()(Code)



    isVarNoCache
    final boolean isVarNoCache()(Code)



    isVarNonLocal
    final boolean isVarNonLocal()(Code)



    isVarScalar
    final boolean isVarScalar()(Code)



    isVarTraceExists
    final boolean isVarTraceExists()(Code)



    isVarUndefined
    final boolean isVarUndefined()(Code)



    lookupArrayElement
    static Var[] lookupArrayElement(Interp interp, String part1, String part2, int flags, String msg, boolean createPart1, boolean createPart2, Var var) throws TclException(Code)



    lookupVar
    static Var[] lookupVar(Interp interp, String part1, String part2, int flags, String msg, boolean createPart1, boolean createPart2) throws TclException(Code)
    TclLookupVar -> lookupVar This procedure is used by virtually all of the variable code to locate a variable given its name(s).
    Parameters:
      part1 - if part2 isn't NULL, this is the name of an array.Otherwise, this is a full variable name that could include a parenthesized array elemnt or a scalar.
    Parameters:
      part2 - Name of an element within array, or null.
    Parameters:
      flags - Only the TCL.GLOBAL_ONLY bit matters.
    Parameters:
      msg - Verb to use in error messages, e.g. "read" or "set".
    Parameters:
      create - OR'ed combination of CRT_PART1 and CRT_PART2.Tells which entries to create if they don't already exist.
    Parameters:
      throwException - true if an exception should be throw if thevariable cannot be found. a two element array. a[0] is the variable indicated bypart1 and part2, or null if the variable couldn't befound and throwException is false.

    If the variable is found, a[1] is the array thatcontains the variable (or null if the variable is a scalar).If the variable can't be found and either createPart1 orcreatePart2 are true, a new as-yet-undefined (VAR_UNDEFINED)variable instance is created, entered into a hashtable, and returned.Note: it's possible that var.value of the returned variablemay be null (variable undefined), even if createPart1 or createPart2are true (these only cause the hash table entry or array to be created).For example, the variable might be a global that has been unset butis still referenced by a procedure, or a variable that has been unsetbut it only being kept in existence by a trace.
    exception:
      TclException - if the variable cannot be found and throwException is true.




    makeUpvar
    protected static void makeUpvar(Interp interp, CallFrame frame, String otherP1, String otherP2, int otherFlags, String myName, int myFlags, int localIndex) throws TclException(Code)
    MakeUpvar -> makeUpvar Create a reference of a variable in otherFrame in the current CallFrame, given a two-part name consisting of array name and element within array.
    Parameters:
      interp - Interp containing the variables
    Parameters:
      frame - CallFrame containing "other" variable.null means use global context.
    Parameters:
      otherP1 - the 1st part name of the variable in the "other" frame.
    Parameters:
      otherP2 - the 2nd part name of the variable in the "other" frame.
    Parameters:
      otherFlags - the flags for scaope of "other" variable
    Parameters:
      myName - Name of scalar variable which will refer to otherP1/otherP2.
    Parameters:
      myFlags - only the TCL.GLOBAL_ONLY bit matters, indicating the scope of myName.
    exception:
      TclException - if the upvar cannot be created.



    removeSearch
    protected boolean removeSearch(String sid)(Code)
    Find the SearchId object in the sidVec list and remove it.
    Parameters:
      sid - String that ia a unique identifier for a SearchId object.



    resolveArray
    static Var resolveArray(Var v)(Code)



    resolveScalar
    static Var resolveScalar(Var v)(Code)



    setUndefinedToNull
    static void setUndefinedToNull(Interp interp, String part1, String part2)(Code)



    setVar
    static TclObject setVar(Interp interp, String part1, String part2, TclObject newValue, int flags) throws TclException(Code)
    Tcl_SetVar2Ex -> setVar Given a two-part variable name, which may refer either to a scalar variable or an element of an array, change the value of the variable to a new Tcl object value. See the setVarPtr() method for the arguments to be passed to this method.



    setVarArray
    final void setVarArray()(Code)



    setVarArrayElement
    final void setVarArrayElement()(Code)



    setVarCompiledLocalArray
    static TclObject setVarCompiledLocalArray(Interp interp, String varname, String key, TclObject newValue, Var resolved) throws TclException(Code)



    setVarCompiledLocalArrayInvalid
    static TclObject setVarCompiledLocalArrayInvalid(Interp interp, String varname, String key, TclObject newValue) throws TclException(Code)



    setVarCompiledLocalScalarInvalid
    static TclObject setVarCompiledLocalScalarInvalid(Interp interp, String varname, TclObject newValue) throws TclException(Code)



    setVarInHashtable
    final void setVarInHashtable()(Code)



    setVarLink
    final void setVarLink()(Code)



    setVarNamespace
    final void setVarNamespace()(Code)



    setVarNoCache
    final void setVarNoCache()(Code)



    setVarNonLocal
    final void setVarNonLocal()(Code)



    setVarPtr
    static TclObject setVarPtr(Interp interp, Var var, Var array, String part1, String part2, TclObject newValue, int flags) throws TclException(Code)
    TclPtrSetVar -> setVarPtr This method implements setting of a variable value that has already been resolved into Var refrences. Pass the resolved var refrences and a two-part variable name, which may refer either to a scalar or an element of an array. This method will change the value of the variable to a new TclObject value. If the named scalar or array or element doesn't exist then this method will create one.
    Parameters:
      interp - the interp that holds the variable
    Parameters:
      var - a resolved Var ref
    Parameters:
      array - a resolved Var ref
    Parameters:
      part1 - 1st part of the variable name.
    Parameters:
      part2 - 2nd part of the variable name.
    Parameters:
      newValue - the new value for the variable
    Parameters:
      flags - misc flags that control the actions of this methodReturns a pointer to the TclObject holding the new value of thevariable. If the write operation was disallowed because an array wasexpected but not found (or vice versa), then null is returned; ifthe TCL.LEAVE_ERR_MSG flag is set, then an exception will be raised.Note that the returned object may not be the same one referencedby newValue because variable traces may modify the variable's value.The value of the given variable is set. If either the array or theentry didn't exist then a new variable is created.The reference count is decremented for any old value of the variableand incremented for its new value. If the new value for the variableis not the same one referenced by newValue (perhaps as a resultof a variable trace), then newValue's ref count is left unchangedby Tcl_SetVar2Ex. newValue's ref count is also left unchanged ifwe are appending it as a string value: that is, if "flags" includesTCL.APPEND_VALUE but not TCL.LIST_ELEMENT.The reference count for the returned object is _not_ incremented: ifyou want to keep a reference to the object you must increment itsref count yourself.



    setVarScalar
    final void setVarScalar()(Code)



    setVarTraceExists
    final void setVarTraceExists()(Code)



    setVarUndefined
    final void setVarUndefined()(Code)



    toString
    public String toString()(Code)
    Used to create a String that describes this variable.



    traceVar
    static void traceVar(Interp interp, String part1, String part2, int flags, VarTrace proc) throws TclException(Code)
    Tcl_TraceVar2 -> traceVar Trace a variable, given a two-part name consisting of array name and element within array.
    Parameters:
      part1 - 1st part of the variable name.
    Parameters:
      part2 - 2nd part of the variable name.
    Parameters:
      flags - misc flags that control the actions of this method.
    Parameters:
      trace - the trace to comand to add.



    unsetVar
    static void unsetVar(Interp interp, String part1, String part2, int flags) throws TclException(Code)
    Tcl_UnsetVar2 -> unsetVar Unset a variable, given a two-part name consisting of array name and element within array.
    Parameters:
      part1 - 1st part of the variable name.
    Parameters:
      part2 - 2nd part of the variable name.
    Parameters:
      flags - misc flags that control the actions of this method.If part1 and part2 indicate a local or global variable in interp,it is deleted. If part1 is an array name and part2 is null, thenthe whole array is deleted.



    untraceVar
    static void untraceVar(Interp interp, String part1, String part2, int flags, VarTrace proc)(Code)
    Tcl_UntraceVar2 -> untraceVar Untrace a variable, given a two-part name consisting of array name and element within array. This will Remove a previously-created trace for a variable.
    Parameters:
      interp - Interpreter containing variable.
    Parameters:
      part1 - 1st part of the variable name.
    Parameters:
      part2 - 2nd part of the variable name.
    Parameters:
      flags - misc flags that control the actions of this method.
    Parameters:
      proc - the trace to delete.



    Methods inherited from java.lang.Object
    native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
    public boolean equals(Object obj)(Code)(Java Doc)
    protected void finalize() throws Throwable(Code)(Java Doc)
    final native public Class getClass()(Code)(Java Doc)
    native public int hashCode()(Code)(Java Doc)
    final native public void notify()(Code)(Java Doc)
    final native public void notifyAll()(Code)(Java Doc)
    public String toString()(Code)(Java Doc)
    final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
    final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
    final public void wait() throws InterruptedException(Code)(Java Doc)

    www.java2java.com | Contact Us
    Copyright 2009 - 12 Demo Source and Support. All rights reserved.
    All other trademarks are property of their respective owners.