Main Page   Compound List   File List   Compound Members   File Members  

TclXPCOMCmds.cpp File Reference

#include "TclXPCOMPrivate.h"

Go to the source code of this file.

Defines

#define NUM_COMMANDS   12

Functions

int GetInterfaceInfoFromObj (Tcl_Interp *interp, Tcl_Obj *objPtr, nsIInterfaceInfo **interfaceinfo)
int VerifyNsIDObj (Tcl_Interp *interp, Tcl_Obj *iidobj, int flags)
int GetClassInfoFromInterfaceList (Tcl_Interp *interp, Tcl_Obj *interfaces, int flags, ClassInfo **cinfo)
int GetOverrideSwitches (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[], int *baseindex, int *flags)
int TclXPCOM_WrapObjCmd (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[])
int TclXPCOM_InvokeObjCmd (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[])
int TclXPCOM_InfoObjCmd (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[])
int TclXPCOM_ThisObjCmd (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[])
int TclXPCOM_ConstantObjCmd (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[])
int TclXPCOM_NullObjCmd (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[])
int TclXPCOM_IsNullObjCmd (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[])
int TclXPCOM_PointerObjCmd (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[])
int TclXPCOM_AddressObjCmd (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[])
int TclXPCOM_FromStringObjCmd (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[])
int TclXPCOM_SetReturnCodeObjCmd (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[])
int TclXPCOM_IdObjCmd (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[])
void TclXPCOM_RegisterCommands (Tcl_Interp *interp)

Variables

struct {
   char *   command
   Tcl_ObjCmdProc *   cmdproc
   ClientData   clientdata
cmdtable [NUM_COMMANDS]


Detailed Description

Contains functions that implement the 'xpcom' Tcl command.

Definition in file TclXPCOMCmds.cpp.


Define Documentation

#define NUM_COMMANDS   12
 

Definition at line 977 of file TclXPCOMCmds.cpp.

Referenced by TclXPCOM_RegisterCommands.


Function Documentation

int GetInterfaceInfoFromObj Tcl_Interp *    interp,
Tcl_Obj *    objPtr,
nsIInterfaceInfo **    interfaceinfo
 

Retrieves the interface info from a Tcl object. If 'objPtr' does not contain a valid and known interface name, then an error message will be set in 'interp'.

Return values:
TCL_OK  - if successful
TCL_ERROR  - if an error occurred
Parameters:
interp  (in) interpreter to store any error messages
objPtr  (in) tcl object containing interface name
interfaceinfo  (out) address to store retrieved interface info

Definition at line 52 of file TclXPCOMCmds.cpp.

References TclXPCOM_GetNsIDFromObj.

Referenced by TclXPCOM_ConstantObjCmd, TclXPCOM_InfoObjCmd, and VerifyNsIDObj.

int VerifyNsIDObj Tcl_Interp *    interp,
Tcl_Obj *    iidobj,
int    flags
 

Verifies a given interface name is known and is reflectable.

Return values:
TCL_OK  - if successful
TCL_ERROR  - if an error occurred
Parameters:
interp  (in) interpreter to store any error messages
iidobj  (in) interface to verify
flags  (in) override flags

Definition at line 91 of file TclXPCOMCmds.cpp.

References FORCE_HIDDEN, FORCE_NOTSCRIPTABLE, FORCE_NOTXPCOM, GetInterfaceInfoFromObj, and TclXPCOM_CheckInterfaceIsReflectable.

Referenced by GetClassInfoFromInterfaceList.

int GetClassInfoFromInterfaceList Tcl_Interp *    interp,
Tcl_Obj *    interfaces,
int    flags,
ClassInfo **    cinfo
 

Resolves a list of interfaces to a ClassInfo.

Return values:
TCL_OK  - if successful
TCL_ERROR  - if an error occurred
Parameters:
interp  (in) interpreter to hold any error messages
interfaces  (in) list of interface names
flags  (in) override flags
cinfo  (out) address to store pointer to resolved ClassInfo

Definition at line 123 of file TclXPCOMCmds.cpp.

References FORCE_HIDDEN, FORCE_NOTSCRIPTABLE, FORCE_NOTXPCOM, TclXPCOM_GetClassInfo, TclXPCOM_GetNsIDFromObj, and VerifyNsIDObj.

Referenced by TclXPCOM_InfoObjCmd, and TclXPCOM_WrapObjCmd.

int GetOverrideSwitches ClientData    clientData,
Tcl_Interp *    interp,
int    objc,
Tcl_Obj *CONST    objv[],
int *    baseindex,
int *    flags
 

Processes the reflection override switches for a command. 'baseindex' should hold the index at which to start reading from 'objv', and, upon successful completion, will be set to the index of the argument following the switches that were processed.

Return values:
TCL_OK  - if successful
TCL_ERROR  - if an error occurred
Parameters:
clientData  (in) not used
interp  (in) interpreter where command was invoked
objc  (in) number of arguments
objv  (in) array of tcl argument objects
baseindex  (inout) index in objv to begin reading
flags  (out) address to store override flags

Definition at line 195 of file TclXPCOMCmds.cpp.

References FORCE_HIDDEN, FORCE_NOTSCRIPTABLE, and FORCE_NOTXPCOM.

Referenced by TclXPCOM_InvokeObjCmd, and TclXPCOM_WrapObjCmd.

int TclXPCOM_WrapObjCmd ClientData    clientData,
Tcl_Interp *    interp,
int    objc,
Tcl_Obj *CONST    objv[]
 

Processes the 'xpcom::wrap' command in the given interpreter.

Return values:
TCL_OK  - if successful
TCL_ERROR  - if an error occurred
Parameters:
clientData  (in) not used
interp  (in) interpreter where command was invoked
objc  (in) number of arguments
objv  (in) array of tcl argument objects

Definition at line 270 of file TclXPCOMCmds.cpp.

References BindScript, FreeTclXPCOMComponent, GetClassInfoFromInterfaceList, GetOverrideSwitches, NewTclXPCOMComponent, TclXPCOMComponent::stubs, and TclXPCOM_NewISupportsObj.

int TclXPCOM_InvokeObjCmd ClientData    clientData,
Tcl_Interp *    interp,
int    objc,
Tcl_Obj *CONST    objv[]
 

Processes the 'xpcom::invoke' command in the given interpreter.

Return values:
TCL_OK  - if successful
TCL_ERROR  - if an error occurred
Parameters:
clientData  (in) index at which to start reading from objv
interp  (in) interpreter where command was invoked
objc  (in) number of arguments
objv  (in) array of tcl argument objects

Definition at line 371 of file TclXPCOMCmds.cpp.

References GetInterfaceRef, GetMethodFromIRef, GetMethodInfo, GetOverrideSwitches, INTERFACEINFO_GETTER, INTERFACEINFO_METHOD, INTERFACEINFO_SETTER, QueryInterfaceIRef, MethodInfo::tclparamcount, TclXPCOM_CheckInterfaceIsReflectable, TclXPCOM_CheckMethodIsReflectable, TclXPCOM_GetISupportsFromObj, TclXPCOM_Invoke, and TclXPCOM_ListMethodArguments.

int TclXPCOM_InfoObjCmd ClientData    clientData,
Tcl_Interp *    interp,
int    objc,
Tcl_Obj *CONST    objv[]
 

Processes the 'xpcom::info' command in the given interpreter.

Return values:
TCL_OK  - if successful
TCL_ERROR  - if an error occurred
Parameters:
clientData  (in) not used
interp  (in) interpreter where command was invoked
objc  (in) number of arguments
objv  (in) array of tcl argument objects

Definition at line 488 of file TclXPCOMCmds.cpp.

References command, FORCE_NOTSCRIPTABLE, GetClassInfoFromInterfaceList, GetInterfaceInfoFromObj, IdentifierInfo_::indices, INTERFACEINFO_GETTER, INTERFACEINFO_METHOD, TclXPCOM_GetAttributeType, TclXPCOM_GetIdentifierInfoFromClass, TclXPCOM_GetReturnValueType, TclXPCOM_ListClassAttributes, TclXPCOM_ListClassMethods, TclXPCOM_ListInterfaceConstants, TclXPCOM_ListMethodArguments, and TclXPCOM_NewISupportsObj.

int TclXPCOM_ThisObjCmd ClientData    clientData,
Tcl_Interp *    interp,
int    objc,
Tcl_Obj *CONST    objv[]
 

Processes the 'xpcom::this' command in the given interpreter.

Return values:
TCL_OK  - if successful
TCL_ERROR  - if an error occurred
Parameters:
clientData  (in) not used
interp  (in) interpreter where command was invoked
objc  (in) number of arguments
objv  (in) array of tcl argument objects

Definition at line 673 of file TclXPCOMCmds.cpp.

References TclXPCOM_GetCurrentComponentContext, and TclXPCOM_NewISupportsObj.

int TclXPCOM_ConstantObjCmd ClientData    clientData,
Tcl_Interp *    interp,
int    objc,
Tcl_Obj *CONST    objv[]
 

Processes the 'xpcom::constant' command in the given interpreter.

Return values:
TCL_OK  - if successful
TCL_ERROR  - if an error occurred
Parameters:
clientData  (in) not used
interp  (in) interpreter where command was invoked
objc  (in) number of arguments
objv  (in) array of tcl argument objects

Definition at line 710 of file TclXPCOMCmds.cpp.

References GetInterfaceInfoFromObj, and TclXPCOM_GetConstant.

int TclXPCOM_NullObjCmd ClientData    clientData,
Tcl_Interp *    interp,
int    objc,
Tcl_Obj *CONST    objv[]
 

Processes the 'xpcom::null' command in the given interpreter.

Return values:
TCL_OK  - if successful
TCL_ERROR  - if an error occurred
Parameters:
clientData  (in) not used
interp  (in) interpreter where command was invoked
objc  (in) number of arguments
objv  (in) array of tcl argument objects

Definition at line 752 of file TclXPCOMCmds.cpp.

References TclXPCOM_NewPointerObj.

int TclXPCOM_IsNullObjCmd ClientData    clientData,
Tcl_Interp *    interp,
int    objc,
Tcl_Obj *CONST    objv[]
 

Processes the 'xpcom::isnull' command in the given interpreter.

Return values:
TCL_OK  - if successful
TCL_ERROR  - if an error occurred
Parameters:
clientData  (in) not used
interp  (in) interpreter where command was invoked
objc  (in) number of arguments
objv  (in) array of tcl argument objects

Definition at line 777 of file TclXPCOMCmds.cpp.

References TclXPCOM_IsNULL.

int TclXPCOM_PointerObjCmd ClientData    clientData,
Tcl_Interp *    interp,
int    objc,
Tcl_Obj *CONST    objv[]
 

Processes the 'xpcom::pointer' command in the given interpreter.

Return values:
TCL_OK  - if successful
TCL_ERROR  - if an error occurred
Parameters:
clientData  (in) not used
interp  (in) interpreter where command was invoked
objc  (in) number of arguments
objv  (in) array of tcl argument objects

Definition at line 802 of file TclXPCOMCmds.cpp.

References TclXPCOM_NewPointerObj.

int TclXPCOM_AddressObjCmd ClientData    clientData,
Tcl_Interp *    interp,
int    objc,
Tcl_Obj *CONST    objv[]
 

Processes the 'xpcom::address' command in the given interpreter.

Return values:
TCL_OK  - if successful
TCL_ERROR  - if an error occurred
Parameters:
clientData  (in) not used
interp  (in) interpreter where command was invoked
objc  (in) number of arguments
objv  (in) array of tcl argument objects

Definition at line 837 of file TclXPCOMCmds.cpp.

References TclXPCOM_GetPointerFromObj.

int TclXPCOM_FromStringObjCmd ClientData    clientData,
Tcl_Interp *    interp,
int    objc,
Tcl_Obj *CONST    objv[]
 

Processes the 'xpcom::fromstring' command in the given interpreter.

Return values:
TCL_OK  - if successful
TCL_ERROR  - if an error occurred
Parameters:
clientData  (in) not used
interp  (in) interpreter where command was invoked
objc  (in) number of arguments
objv  (in) array of tcl argument objects

Definition at line 873 of file TclXPCOMCmds.cpp.

int TclXPCOM_SetReturnCodeObjCmd ClientData    clientData,
Tcl_Interp *    interp,
int    objc,
Tcl_Obj *CONST    objv[]
 

Processes the 'xpcom::setReturnCode' command in the given interpreter.

Return values:
TCL_OK  - if successful
TCL_ERROR  - if an error occurred
Parameters:
clientData  (in) not used
interp  (in) interpreter where command was invoked
objc  (in) number of arguments
objv  (in) array of tcl argument objects

Definition at line 907 of file TclXPCOMCmds.cpp.

References TclXPCOM_SetReturnCode.

int TclXPCOM_IdObjCmd ClientData    clientData,
Tcl_Interp *    interp,
int    objc,
Tcl_Obj *CONST    objv[]
 

Processes the 'xpcom::id' command in the given interpreter.

Return values:
TCL_OK  - if successful
TCL_ERROR  - if an error occurred
Parameters:
clientData  (in) not used
interp  (in) interpreter where command was invoked
objc  (in) number of arguments
objv  (in) array of tcl argument objects

Definition at line 947 of file TclXPCOMCmds.cpp.

References TclXPCOM_GetNsIDFromObj.

void TclXPCOM_RegisterCommands Tcl_Interp *    interp
 

Registers the TclXPCOM 'C'-implemented commands in the given interpreter.

Return values:
TCL_OK  - if successful
TCL_ERROR  - if an error occurred
Parameters:
interp  (in) the interpreter in which to register the commands

Definition at line 1010 of file TclXPCOMCmds.cpp.

References clientdata, cmdproc, cmdtable, command, and NUM_COMMANDS.


Variable Documentation

char* command
 

Definition at line 981 of file TclXPCOMCmds.cpp.

Referenced by TclXPCOM_InfoObjCmd, and TclXPCOM_RegisterCommands.

Tcl_ObjCmdProc* cmdproc
 

Definition at line 982 of file TclXPCOMCmds.cpp.

Referenced by TclXPCOM_RegisterCommands.

ClientData clientdata
 

Definition at line 983 of file TclXPCOMCmds.cpp.

Referenced by TclXPCOM_RegisterCommands.

struct { ... } cmdtable[NUM_COMMANDS] [static]
 

Referenced by TclXPCOM_RegisterCommands.


Generated on Fri Jun 14 23:25:51 2002 for TclXPCOM by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002