#include "TclXPCOMPrivate.h"
#include "prprf.h"
Go to the source code of this file.
Compounds | |
struct | TclXPCOM_Command |
struct | TclXPCOM_ResolvedCmdName |
Defines | |
#define | NULL_STRINGREP "TclXPCOM NULL Object" |
#define | TCLXPCOM_WIDEINTTYPENAME "TclXPCOM_WideInt" |
Typedefs | |
typedef TclXPCOM_Command | TclXPCOM_Command |
typedef TclXPCOM_ResolvedCmdName | TclXPCOM_ResolvedCmdName |
Functions | |
void | UpdateStringOfPointer (Tcl_Obj *objPtr) |
int | SetPointerFromAny (Tcl_Interp *interp, Tcl_Obj *objPtr) |
void | FreeISupportsObj (Tcl_Obj *objPtr) |
void | DuplicateISupportsObj (Tcl_Obj *srcPtr, Tcl_Obj *dupPtr) |
void | UpdateStringOfISupports (Tcl_Obj *objPtr) |
int | SetISupportsFromAny (Tcl_Interp *interp, Tcl_Obj *objPtr) |
void | FreeCmdNameObj (Tcl_Obj *objPtr) |
void | DuplicateCmdNameObj (Tcl_Obj *srcPtr, Tcl_Obj *dupPtr) |
void | UpdateStringOfCmdName (Tcl_Obj *objPtr) |
int | SetCmdNameFromAny (Tcl_Interp *interp, Tcl_Obj *objPtr) |
void | FreeIdentifierObj (Tcl_Obj *objPtr) |
void | DuplicateIdentifierObj (Tcl_Obj *srcPtr, Tcl_Obj *dupPtr) |
void | UpdateStringOfIdentifier (Tcl_Obj *objPtr) |
int | SetIdentifierFromAny (Tcl_Interp *interp, Tcl_Obj *objPtr) |
void | FreeNsIDObj (Tcl_Obj *objPtr) |
void | DuplicateNsIDObj (Tcl_Obj *srcPtr, Tcl_Obj *dupPtr) |
void | UpdateStringOfNsID (Tcl_Obj *objPtr) |
int | SetNsIDFromAny (Tcl_Interp *interp, Tcl_Obj *objPtr) |
void | UpdateStringOfWideInt (Tcl_Obj *objPtr) |
int | SetWideIntFromAny (Tcl_Interp *interp, Tcl_Obj *objPtr) |
Tcl_Obj * | TclXPCOM_NewWideIntObj (PRInt64 wideint) |
int | TclXPCOM_GetWideIntFromObj (Tcl_Interp *interp, Tcl_Obj *objPtr, PRInt64 *wideint) |
Tcl_Obj * | TclXPCOM_NewISupportsObj (nsISupports *isupports, nsIInterfaceInfo *interfaceinfo) |
Tcl_Obj * | TclXPCOM_NewNsIDObj (nsID *id) |
Tcl_Obj * | TclXPCOM_NewIdentifierObj (nsIInterfaceInfo *interfaceinfo, char *identifier) |
Tcl_Obj * | TclXPCOM_NewPointerObj (void *ptr) |
int | TclXPCOM_GetPointerFromObj (Tcl_Interp *interp, Tcl_Obj *objPtr, void **ptr) |
int | TclXPCOM_IsNULL (Tcl_Obj *objPtr) |
int | TclXPCOM_GetISupportsFromObj (Tcl_Interp *interp, Tcl_Obj *objPtr, nsISupports **isupports, nsIInterfaceInfo **interfaceinfo) |
int | TclXPCOM_QueryISupportsObj (Tcl_Interp *interp, Tcl_Obj *objPtr, nsIInterfaceInfo *queryinfo, nsISupports **result) |
int | TclXPCOM_GetIdentifierFromObj (Tcl_Interp *interp, Tcl_Obj *objPtr, nsIInterfaceInfo **interfaceinfo, char **identifier) |
int | TclXPCOM_GetNsIDFromObj (Tcl_Interp *interp, Tcl_Obj *objPtr, nsID **id) |
void | TclXPCOM_RegisterObjTypes (void) |
Variables | |
TclXPCOM_Command | isupportscmd |
TclXPCOM_ResolvedCmdName | resolvedisupports |
Tcl_ObjType | ISupportsType |
Tcl_ObjType | SavedCmdNameType |
Tcl_ObjType | NsIDType |
Tcl_ObjType | PointerType |
Tcl_ObjType | IdentifierType |
Tcl_ObjType * | CmdNameType |
Tcl_ObjType | WideIntType |
Contains functions for handling custom TclXPCOM objects.
Definition in file TclXPCOMObjType.cpp.
|
Definition at line 46 of file TclXPCOMObjType.cpp. Referenced by TclXPCOM_IsNULL, and UpdateStringOfPointer. |
|
Definition at line 157 of file TclXPCOMObjType.cpp. Referenced by TclXPCOM_RegisterObjTypes. |
|
The following are structures used by the Tcl 'cmdName' object type, which caches command lookups. We are hijacking this type in order to allow the TclXPCOM isupports object to act as a command. This provides for oo-style method invocation, like this: [$component QueryInterface nsISupports] instead of this: [xpcom::invoke $component QueryInterface nsISupports] (both of the above are equivalent) typedef struct Command { Tcl_HashEntry *hPtr; Namespace *nsPtr; int refCount; int cmdEpoch; CompileProc *compileProc; Tcl_ObjCmdProc *objProc; ClientData objClientData; Tcl_CmdProc *proc; ClientData clientData; Tcl_CmdDeleteProc *deleteProc; ClientData deleteData; int flags; ImportRef *importRefPtr; CommandTrace *tracePtr; } Command; typedef struct ResolvedCmdName { Command *cmdPtr; Namespace *refNsPtr; long refNsId; int refNsCmdEpoch; int cmdEpoch; int refCount; } ResolvedCmdName; |
|
|
|
Sets the string representation of a TclXPCOM pointer object.
Definition at line 165 of file TclXPCOMObjType.cpp. References NULL_STRINGREP. Referenced by TclXPCOM_RegisterObjTypes. |
|
Attempts to convert a Tcl object to a TclXPCOM pointer object based on its string representation. If 'interp' is not NULL, then its result will be set to any error messages if the conversion failed.
Definition at line 198 of file TclXPCOMObjType.cpp. References PointerType, and TclXPCOM_IsNULL. Referenced by TclXPCOM_RegisterObjTypes. |
|
Frees a TclXPCOM interface reference object.
Definition at line 245 of file TclXPCOMObjType.cpp. References ReleaseInterface. Referenced by FreeCmdNameObj, and TclXPCOM_RegisterObjTypes. |
|
Duplicates a TclXPCOM interface reference object.
Definition at line 263 of file TclXPCOMObjType.cpp. References AddRefInterface. Referenced by DuplicateCmdNameObj, and TclXPCOM_RegisterObjTypes. |
|
Sets the string representation of a TclXPCOM interface reference object.
Definition at line 286 of file TclXPCOMObjType.cpp. Referenced by TclXPCOM_RegisterObjTypes, and UpdateStringOfCmdName. |
|
Attempts to convert a Tcl object to a TclXPCOM interface reference object based on its string representation. If 'interp' is not NULL, then its result will be set to any error messages if the conversion failed.
Definition at line 320 of file TclXPCOMObjType.cpp. References AddRefInterface, CmdNameType, GetInterfaceRef, and QueryInterfaceIRef. Referenced by SetCmdNameFromAny, and TclXPCOM_RegisterObjTypes. |
|
Replacement for the built-in FreeCmdNameInternalRep function.
Definition at line 408 of file TclXPCOMObjType.cpp. References FreeISupportsObj, and SavedCmdNameType. Referenced by TclXPCOM_RegisterObjTypes. |
|
Replacement for the built-in DupCmdNameInternalRep function.
Definition at line 428 of file TclXPCOMObjType.cpp. References DuplicateISupportsObj, and SavedCmdNameType. Referenced by TclXPCOM_RegisterObjTypes. |
|
Replacement for the (non-existent) built-in UpdateStringOfCmdName function.
Definition at line 450 of file TclXPCOMObjType.cpp. References UpdateStringOfISupports. Referenced by TclXPCOM_RegisterObjTypes. |
|
Replacement for the built-in SetCmdNameFromAny function.
Definition at line 473 of file TclXPCOMObjType.cpp. References SavedCmdNameType, and SetISupportsFromAny. Referenced by TclXPCOM_RegisterObjTypes. |
|
Frees a TclXPCOM identifier object.
Definition at line 498 of file TclXPCOMObjType.cpp. Referenced by TclXPCOM_RegisterObjTypes. |
|
Duplicates a TclXPCOM identifier object.
Definition at line 520 of file TclXPCOMObjType.cpp. References CloneMemory. Referenced by TclXPCOM_RegisterObjTypes. |
|
Sets the string representation of a TclXPCOM identifier object.
Definition at line 545 of file TclXPCOMObjType.cpp. Referenced by TclXPCOM_RegisterObjTypes. |
|
Attempts to convert a Tcl object to a TclXPCOM identifier object based on its string representation. The identifier may be prefixed with a known interface name. If 'interp' is not NULL, then its result will be set to any error messages if the conversion failed.
Definition at line 592 of file TclXPCOMObjType.cpp. References CloneMemory, and IdentifierType. Referenced by TclXPCOM_RegisterObjTypes. |
|
Frees a TclXPCOM nsID object.
Definition at line 665 of file TclXPCOMObjType.cpp. Referenced by TclXPCOM_RegisterObjTypes. |
|
Duplicates a TclXPCOM nsID object.
Definition at line 679 of file TclXPCOMObjType.cpp. References CloneMemory. Referenced by TclXPCOM_RegisterObjTypes. |
|
Sets the string representation of a TclXPCOM nsID object.
Definition at line 695 of file TclXPCOMObjType.cpp. Referenced by TclXPCOM_RegisterObjTypes. |
|
Attempts to convert a Tcl object to a TclXPCOM nsID object based on its string representation. The object's string representation may match any known interface name, contract id, or raw unique id string. If 'interp' is not NULL, then its result will be set to any error messages if the conversion failed.
Definition at line 741 of file TclXPCOMObjType.cpp. References CloneMemory, and NsIDType. Referenced by TclXPCOM_RegisterObjTypes. |
|
Sets the string representation of a TclXPCOM 64-bit integer object.
Definition at line 790 of file TclXPCOMObjType.cpp. Referenced by TclXPCOM_RegisterObjTypes. |
|
Attempts to convert a Tcl object to a TclXPCOM 64-bit integer object based on its string representation. If 'interp' is not NULL, then its result will be set to any error messages if the conversion failed.
Definition at line 817 of file TclXPCOMObjType.cpp. References WideIntType. Referenced by TclXPCOM_RegisterObjTypes. |
|
Creates a new TclXPCOM 64-bit integer object.
Definition at line 861 of file TclXPCOMObjType.cpp. References WideIntType. |
|
Retrieves the TclXPCOM 64-bit integer internal representation from a Tcl object. If an error occurs, a message will be left in 'interp's result unless 'interp' is NULL.
Definition at line 887 of file TclXPCOMObjType.cpp. References WideIntType. |
|
Creates a new TclXPCOM interface reference object that holds a new Addrefed interface pointer.
Definition at line 919 of file TclXPCOMObjType.cpp. References AddRefInterface, and CmdNameType. |
|
Creates a new TclXPCOM nsID object that holds a copy of the given nsID.
Definition at line 949 of file TclXPCOMObjType.cpp. References CloneMemory, and NsIDType. |
|
Creates a new TclXPCOM identifier object that holds a copy of the given interface info and identifier.
Definition at line 974 of file TclXPCOMObjType.cpp. References CloneMemory, and IdentifierType. |
|
Creates a new TclXPCOM pointer object.
Definition at line 1002 of file TclXPCOMObjType.cpp. References PointerType. |
|
Retrieves the TclXPCOM pointer internal representation from a Tcl object. If an error occurs, a message will be left in 'interp's result unless 'interp' is NULL.
Definition at line 1029 of file TclXPCOMObjType.cpp. References PointerType. |
|
Predicate that determines whether a Tcl object is 'NULL'
Definition at line 1059 of file TclXPCOMObjType.cpp. References NULL_STRINGREP, and PointerType. |
|
Retrieves the TclXPCOM interface reference internal representation from a Tcl object. If an error occurs, a message will be left in 'interp's result unless 'interp' is NULL.
Definition at line 1090 of file TclXPCOMObjType.cpp. References ISupportsType. |
|
Attempts to retrieve an interface pointer from the given Tcl object that matches the given interface. 'result' will be set to an AddRefed interface pointer which must eventually be Released. If an error occurs, a message will be left in 'interp's result unless 'interp' is NULL.
Definition at line 1130 of file TclXPCOMObjType.cpp. References GetInterfaceRef, QueryInterfaceIRef, and TclXPCOM_GetISupportsFromObj. |
|
Retrieves the TclXPCOM identifier internal representation from a Tcl object. If an error occurs, a message will be left in 'interp's result unless 'interp' is NULL.
Definition at line 1175 of file TclXPCOMObjType.cpp. References IdentifierType. |
|
Retrieves the nsID internal representation from a Tcl object. If an error occurs, a message will be left in 'interp's result unless 'interp' is NULL.
Definition at line 1210 of file TclXPCOMObjType.cpp. References NsIDType. |
|
Registers the custom TclXPCOM Object types with Tcl. Definition at line 1237 of file TclXPCOMObjType.cpp. References CmdNameType, DuplicateCmdNameObj, DuplicateIdentifierObj, DuplicateISupportsObj, DuplicateNsIDObj, FreeCmdNameObj, FreeIdentifierObj, FreeISupportsObj, FreeNsIDObj, IdentifierType, ISupportsType, NsIDType, PointerType, SavedCmdNameType, SetCmdNameFromAny, SetIdentifierFromAny, SetISupportsFromAny, SetNsIDFromAny, SetPointerFromAny, SetWideIntFromAny, TCLXPCOM_IDENTIFIERTYPENAME, TCLXPCOM_ISUPPORTSTYPENAME, TCLXPCOM_NSIDTYPENAME, TCLXPCOM_POINTERTYPENAME, TCLXPCOM_WIDEINTTYPENAME, UpdateStringOfCmdName, UpdateStringOfIdentifier, UpdateStringOfISupports, UpdateStringOfNsID, UpdateStringOfPointer, UpdateStringOfWideInt, and WideIntType. Referenced by Tclxpcom_Init. |
|
Initial value: { NULL, NULL, 0, 0, NULL, TclXPCOM_InvokeObjCmd, (ClientData)0, NULL, NULL, NULL, NULL, 0, NULL, NULL } Definition at line 120 of file TclXPCOMObjType.cpp. |
|
Initial value: { &isupportscmd, NULL, 0, 0, 0, 0 } Definition at line 138 of file TclXPCOMObjType.cpp. |
|
Definition at line 148 of file TclXPCOMObjType.cpp. Referenced by TclXPCOM_GetISupportsFromObj, and TclXPCOM_RegisterObjTypes. |
|
Definition at line 150 of file TclXPCOMObjType.cpp. Referenced by DuplicateCmdNameObj, FreeCmdNameObj, SetCmdNameFromAny, and TclXPCOM_RegisterObjTypes. |
|
Definition at line 151 of file TclXPCOMObjType.cpp. Referenced by SetNsIDFromAny, TclXPCOM_GetNsIDFromObj, TclXPCOM_NewNsIDObj, and TclXPCOM_RegisterObjTypes. |
|
Definition at line 152 of file TclXPCOMObjType.cpp. Referenced by SetPointerFromAny, TclXPCOM_GetPointerFromObj, TclXPCOM_IsNULL, TclXPCOM_NewPointerObj, and TclXPCOM_RegisterObjTypes. |
|
Definition at line 153 of file TclXPCOMObjType.cpp. Referenced by SetIdentifierFromAny, TclXPCOM_GetIdentifierFromObj, TclXPCOM_NewIdentifierObj, and TclXPCOM_RegisterObjTypes. |
|
Definition at line 154 of file TclXPCOMObjType.cpp. Referenced by SetISupportsFromAny, TclXPCOM_NewISupportsObj, and TclXPCOM_RegisterObjTypes. |
|
Definition at line 158 of file TclXPCOMObjType.cpp. Referenced by SetWideIntFromAny, TclXPCOM_GetWideIntFromObj, TclXPCOM_NewWideIntObj, and TclXPCOM_RegisterObjTypes. |