概要
名前空間にあるそれぞれのコマンドの構造体。
/*
* Flag bits for commands.
*
* CMD_IS_DELETED - Means that the command is in the process of
* being deleted (its deleteProc is currently
* executing). Other attempts to delete the
* command should be ignored.
* CMD_TRACE_ACTIVE - 1 means that trace processing is currently
* underway for a rename/delete change. See the
* two flags below for which is currently being
* processed.
* CMD_HAS_EXEC_TRACES - 1 means that this command has at least one
* execution trace (as opposed to simple
* delete/rename traces) in its tracePtr list.
* TCL_TRACE_RENAME - A rename trace is in progress. Further
* recursive renames will not be traced.
* TCL_TRACE_DELETE - A delete trace is in progress. Further
* recursive deletes will not be traced.
* (these last two flags are defined in tcl.h)
*/
#define CMD_IS_DELETED 0x1
#define CMD_TRACE_ACTIVE 0x2
#define CMD_HAS_EXEC_TRACES 0x4
typedef Tcl_CmdProc *TclCmdProcType;
typedef Tcl_ObjCmdProc *TclObjCmdProcType;
typedef void (Tcl_CmdDeleteProc) _ANSI_ARGS_;
メンバー
- Tcl_HashEntry *hPtr; このコマンドを参照しているハッシュテーブルへのポインタ。名前空間のコマンドテーブルか、hidden command のコマンドテーブルのどちらか。NULLは、ハッシュテーブルのエントリーが削除済みであることを示す。
- Namespace *nsPtr; コマンドを含む名前空間へのポインタ
- int refCount; リファレンスカウント
- int cmdEpoch; リファレンスが無効になるとインクリメントする
- CompileProc *compileProc; コンパイルコマンドを呼び出す手続き。コンパイル手続きが無い場合NULL。
- Tcl_ObjCmdProc *objProc; オブジェクト形式の手続き
- ClientData objClientData; Arbitrary value passed to object proc.
- Tcl_CmdProc *proc; 文字列ベースの手続き
- ClientData clientData; /* Arbitrary value passed to string proc. */
- Tcl_CmdDeleteProc *deleteProc; コマンドが削除されるときに呼び出す関数。
- ClientData deleteData; /* Arbitrary value passed to deleteProc. */
- int flags; コマンドのフラグ
- ImportRef *importRefPtr; このコマンドがimportされたとき、別の名前空間で作られたコマンドのList
- CommandTrace *tracePtr; トレース用リストの先頭を指すポインタ
ソース
typedef struct Command {
[[Tcl_HashEntry]] *hPtr; /* Pointer to the hash table entry that refers
* to this command. The hash table is either a
* namespace's command table or an
* interpreter's hidden command table. This
* pointer is used to get a command's name
* from its Tcl_Command handle. NULL means
* that the hash table entry has been removed
* already (this can happen if deleteProc
* causes the command to be deleted or
* recreated). */
[[Namespace]] *nsPtr; /* Points to the namespace containing this
* command. */
int refCount; /* 1 if in command hashtable plus 1 for each
* reference from a CmdName Tcl object
* representing a command's name in a ByteCode
* instruction sequence. This structure can be
* freed when refCount becomes zero. */
int cmdEpoch; /* Incremented to invalidate any references
* that point to this command when it is
* renamed, deleted, hidden, or exposed. */
CompileProc *compileProc; /* Procedure called to compile command. NULL
* if no compile proc exists for command. */
Tcl_ObjCmdProc *objProc; /* Object-based command procedure. */
ClientData objClientData; /* Arbitrary value passed to object proc. */
Tcl_CmdProc *proc; /* String-based command procedure. */
ClientData clientData; /* Arbitrary value passed to string proc. */
Tcl_CmdDeleteProc *deleteProc;
/* Procedure invoked when deleting command to,
* e.g., free all client data. */
ClientData deleteData; /* Arbitrary value passed to deleteProc. */
int flags; /* Miscellaneous bits of information about
* command. See below for definitions. */
[[ImportRef]] *importRefPtr; /* List of each imported Command created in
* another namespace when this command is
* imported. These imported commands redirect
* invocations back to this command. The list
* is used to remove all those imported
* commands when deleting this "real"
* command. */
[[CommandTrace]] *tracePtr; /* First in list of all traces set for this
* command. */
} Command;
/*
* Flag bits for commands.
*
* CMD_IS_DELETED - Means that the command is in the process of
* being deleted (its deleteProc is currently
* executing). Other attempts to delete the
* command should be ignored.
* CMD_TRACE_ACTIVE - 1 means that trace processing is currently
* underway for a rename/delete change. See the
* two flags below for which is currently being
* processed.
* CMD_HAS_EXEC_TRACES - 1 means that this command has at least one
* execution trace (as opposed to simple
* delete/rename traces) in its tracePtr list.
* TCL_TRACE_RENAME - A rename trace is in progress. Further
* recursive renames will not be traced.
* TCL_TRACE_DELETE - A delete trace is in progress. Further
* recursive deletes will not be traced.
* (these last two flags are defined in tcl.h)
*/
#define CMD_IS_DELETED 0x1
#define CMD_TRACE_ACTIVE 0x2
#define CMD_HAS_EXEC_TRACES 0x4
最終更新:2011年11月03日 13:17