アットウィキロゴ

CommandTrace

概要

traceコマンドで使う構造体

typedef void (Tcl_CommandTraceProc) _ANSI_ARGS_(([[ClientData]] clientData,
	[[Tcl_Interp]] *interp, CONST char *oldName, CONST char *newName,
	int flags));


メンバー


  • Tcl_CommandTraceProc *traceProc; コマンド上でオペレーションが実行されたときに呼び出す手続き。- ClientData clientData; 手続きに渡す引数
  • int flags; フラグ TCL_TRACE_RENAME or TCL_TRACE_DELETE.
  • struct CommandTrace *nextPtr; コマンドに関連づけられたトレースリストの次を示す。
  • int refCount; リファレンスカウント

ソース


 /*
  * The following structure defines a command trace, which is used to invoke a
  * specific C procedure whenever certain operations are performed on a
  * command.
  */
 
 typedef struct CommandTrace {
     Tcl_CommandTraceProc *traceProc;
 				/* Procedure to call when operations given by
 				 * flags are performed on command. */
     ClientData clientData;	/* Argument to pass to proc. */
     int flags;			/* What events the trace procedure is
 				 * interested in: OR-ed combination of
 				 * TCL_TRACE_RENAME, TCL_TRACE_DELETE. */
     struct CommandTrace *nextPtr;
 				/* Next in list of traces associated with a
 				 * particular command. */
     int refCount;		/* Used to ensure this structure is not
 				 * deleted too early. Keeps track of how many
 				 * pieces of code have a pointer to this
 				 * structure. */
 } CommandTrace;
最終更新:2011年11月03日 13:16