wasCSharpSQLite – Blame information for rev 4

Subversion Repositories:
Rev:
Rev Author Line No. Line
1 office 1 /*
2 * ImportedCmdData.java
3 *
4 * An ImportedCmdData instance is used as the Command implementation
5 * (the cmd member of the WrappedCommand class).
6 *
7 * Copyright (c) 1999 Mo DeJong.
8 *
9 * See the file "license.terms" for information on usage and
10 * redistribution of this file, and for a DISCLAIMER OF ALL
11 * WARRANTIES.
12 *
13 * Included in SQLite3 port to C# for use in testharness only; 2008 Noah B Hart
14 *
15 * RCS @(#) $Id: ImportedCmdData.java,v 1.1 1999/08/05 03:42:54 mo Exp $
16 */
17 using System;
18 namespace tcl.lang
19 {
20  
21  
22 /// <summary> Class which is used as the Command implementation inside a WrappedCommand
23 /// that has been imported into another namespace. The cmd member of a Wrapped
24 /// command will be set to an instance of this class when a command is imported.
25 /// From this ImportedCmdData reference, we can find the "real" command from
26 /// another namespace.
27 /// </summary>
28  
29 class ImportedCmdData : Command, CommandWithDispose
30 {
31 internal WrappedCommand realCmd; // "Real" command that this imported command
32 // refers to.
33 internal WrappedCommand self; // Pointer to this imported WrappedCommand. Needed
34 // only when deleting it in order to remove
35 // it from the real command's linked list of
36 // imported commands that refer to it.
37  
38 public override string ToString()
39 {
40  
41 return "ImportedCmd for " + realCmd;
42 }
43  
44 /// <summary> Called when the command is invoked in the interp.</summary>
45  
46 public TCL.CompletionCode cmdProc( Interp interp, TclObject[] objv )
47 {
48 NamespaceCmd.invokeImportedCmd( interp, this, objv );
49 return TCL.CompletionCode.RETURN;
50 }
51  
52 /// <summary> Called when the command is deleted from the interp.</summary>
53  
54 public void disposeCmd()
55 {
56 NamespaceCmd.deleteImportedCmd( this );
57 }
58 }
59 }