'\"
'\" Copyright (c) 2005 George Peter Staplin
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\" 
'\" RCS: @(#) $Id$
'\" 
.so man.macros
.TH Tcl_AddInterpResolvers 3 8.5 Tcl "Tcl Library Procedures"
.BS
.SH NAME
Tcl_AddInterpResolvers, Tcl_GetInterpResolvers, Tcl_RemoveInterpResolvers, Tcl_SetNamespaceResolvers, Tcl_GetNamespaceResolvers \- Manipulate command/variable resolution functions for an interpreter or namespace.
.SH SYNOPSIS
.nf
\fB#include <tclInt.h>\fR
.sp
void
\fBTcl_AddInterpResolvers\fR(\fIinterp, name, cmdProc, varProc, compiledVarProc\fR)
.sp
int
\fBTcl_GetInterpResolvers\fR(\fIinterp, name, resInfoPtr\fR)
.sp
int
\fBTcl_RemoveInterpResolvers\fR(\fIinterp, name\fR)
.sp
void
\fBTcl_SetNamespaceResolvers\fR(\fInamespacePtr, cmdProc, varProc, compiledVarProc\fR)
.sp
int
\fBTcl_GetNamespaceResolvers\fR(\fInamespacePtr, resInfoPtr\fR)

.SH ARGUMENTS
.AS Tcl_Interp *interp in
.AP "const char" *name in 
name of the resolution scheme.
.AP Tcl_ResolveCmdProc *cmdProc in
new function for command resolution.
.AP Tcl_ResolveVarProc *varProc in
function for variable resolution at runtime.
.AP Tcl_ResolveCompiledVarProc *compiledVarProc in
function for variable resolution at compile time.
.AP Tcl_ResolverInfo *resInfoPtr out 
pointer to a structure with the command, var, and compiled var resolution procedure pointers.
.BE

.SH DESCRIPTION
.PP
These routines are used to create named resolution schemes.  Resolution schemes can be created that hook into the Tcl internals to allow for modification of behavior.  The name resolution hooks can be used for runtime variables, commands, and compilation-time variables.

.PP
\fBTcl_AddInterpResolvers\fR accepts parameters for the name of the resolution scheme, the cmdProc (which may be NULL ?), the varProc (which may be NULL ?), and the compiledVarProc ([may it also be NULL?]).  Namespace resolvers take precedence over resolvers added with this function.  See also \fBTcl_SetNamespaceResolvers\fR below.
.PP
\fBTcl_GetInterpResolvers\fR accepts parameters for the name of the resolution scheme.  If successful it returns the cmdProc, varResProc, and compiledVarResProc via a passed pointer to a previously allocated Tcl_ResolverInfo struct.  1 is returned if the resolver scheme is found.  0 is returned if the resolver scheme could not be found.
.PP
\fBTcl_RemoveInterpResolvers\fR accepts the name of a resolution scheme.  1 is returned when the resolver scheme was found and removed.  0 is returned when the resolver scheme was not found.
.PP
\fBTcl_SetNamespaceResolvers\fR has behavior similar to \fBTcl_AddInterpResolvers\fR, with the exception being that it takes a pointer to a Tcl_Namespace, rather than a Tcl_Interp.
.PP
\fBTcl_GetNamespaceResolvers\fR has behavior similar to \fBTcl_GetInterpResolvers\fR, with the exception that it takes a pointer to a Tcl_Namespace, rather than a Tcl_Interp.

.SH BUGS
.PP
There is not currently a way to remove a namespace resolver.

.SH KEYWORDS
resolving, resolve, resolver, namespace, command resolution, resolution
