Main Page   Compound List   File List   Compound Members   File Members  

TclXPCOMLoader.cpp File Reference

#include "tclxpcom.h"
#include "nsIModule.h"
#include "nsIComponentManager.h"
#include "nsIFile.h"

Go to the source code of this file.

Defines

#define LOADER_SCRIPT   " \ package require tclxpcom; \ xpcom::module {package require tclxpcom_loader} { \ puts \"unloading\"; unload \ } \"

Functions

int GetModuleFromObj (Tcl_Interp *interp, Tcl_Obj *objPtr, nsIModule **module)
int UnloadObjCmd (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[])
NS_EXPORT nsresult NSGetModule (nsIComponentManager *servMgr, nsIFile *location, nsIModule **result)

Variables

nsIID nsimodule_iid = NS_IMODULE_IID
int loaderFailed = 0


Detailed Description

Contains functions that implement the TclXPCOM Tcl component loader.

Definition in file TclXPCOMLoader.cpp.


Define Documentation

#define LOADER_SCRIPT   " \ package require tclxpcom; \ xpcom::module {package require tclxpcom_loader} { \ puts \"unloading\"; unload \ } \"
 

Definition at line 54 of file TclXPCOMLoader.cpp.

Referenced by NSGetModule.


Function Documentation

int GetModuleFromObj Tcl_Interp *    interp,
Tcl_Obj *    objPtr,
nsIModule **    module
 

Retrieves an nsIModule interface pointer from the given Tcl Object. If an error occurs and 'interp' is not NULL, a message will be left in 'interp's result.

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
module  (out) address to store interface pointer

Definition at line 70 of file TclXPCOMLoader.cpp.

References nsimodule_iid, and TCLXPCOM_ISUPPORTSTYPENAME.

Referenced by NSGetModule.

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

Processes the 'unload' command, which terminates the currently running Tcl interpreter.

Return values:
TCL_OK  - if successful
TCL_ERROR  - if an error occurred
Parameters:
clientData  (in) contains the interpreter to release
interp  (in) interpreter where the command was invoked
objc  (in) number of Tcl arguments
objv  (in) Tcl argument array

Definition at line 112 of file TclXPCOMLoader.cpp.

Referenced by NSGetModule.

NS_EXPORT nsresult NSGetModule nsIComponentManager *    servMgr,
nsIFile *    location,
nsIModule **    result
 

Module entry point for the TclXPCOM Tcl Component Loader.

Returns:
an XPCOM result code
Parameters:
servMgr  (in) service manager
location  (in) location
result  (in) address to store interface pointer

Definition at line 152 of file TclXPCOMLoader.cpp.

References GetModuleFromObj, LOADER_SCRIPT, loaderFailed, and UnloadObjCmd.


Variable Documentation

nsIID nsimodule_iid = NS_IMODULE_IID [static]
 

Definition at line 50 of file TclXPCOMLoader.cpp.

Referenced by GetModuleFromObj.

int loaderFailed = 0 [static]
 

Definition at line 52 of file TclXPCOMLoader.cpp.

Referenced by NSGetModule.


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