Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Private Member Functions
xpcom.components._Interfaces Class Reference
Inheritance diagram for xpcom.components._Interfaces:
Inheritance graph
[legend]
Collaboration diagram for xpcom.components._Interfaces:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def keys
def items
def values
def has_key
def __len__
def __getattr__
def __getitem__

Private Member Functions

def _get_one
def _build_dict

Detailed Description

Definition at line 146 of file components.py.


Member Function Documentation

def xpcom.components._ComponentCollection.__getattr__ (   self,
  attr 
) [inherited]

Definition at line 100 of file components.py.

00100 
00101     def __getattr__(self, attr):
00102         if self._dict_data is not None and self._dict_data.has_key(attr):
00103             return self._dict_data[attr]
        return self._get_one(attr)

Here is the call graph for this function:

def xpcom.components._ComponentCollection.__getitem__ (   self,
  item 
) [inherited]

Definition at line 104 of file components.py.

00104 
00105     def __getitem__(self, item):
00106         if self._dict_data is not None and self._dict_data.has_key(item):
00107             return self._dict_data[item]
00108         return self._get_one(item)

Here is the call graph for this function:

Definition at line 95 of file components.py.

00095 
00096     def __len__(self):
00097         if self._dict_data is None:
00098             self._dict_data = self._build_dict()
00099         return len(self._dict_data)

Here is the call graph for this function:

def xpcom.components._Interfaces._build_dict (   self) [private]

Definition at line 156 of file components.py.

00156 
00157     def _build_dict(self):
00158         ret = {}
00159         enum = interfaceInfoManager.EnumerateInterfaces()
00160         while not enum.IsDone():
00161             # Call the Python-specific FetchBlock, to keep the loop in C.
00162             items = enum.FetchBlock(500, _xpcom.IID_nsIInterfaceInfo)
00163             # This shouldnt be necessary, but appears to be so!
00164             for item in items:
00165                 ret[item.GetName()] = _Interface(item.GetName(), item.GetIID())
00166         return ret
00167 
# And the actual object people use.

Here is the caller graph for this function:

def xpcom.components._Interfaces._get_one (   self,
  name 
) [private]

Definition at line 147 of file components.py.

00147 
00148     def _get_one(self, name):
00149         try:
00150             item = interfaceInfoManager.GetInfoForName(name)
00151         except xpcom.COMException, why:
00152             # Present a better exception message, and give a more useful error code.
00153             import nsError
00154             raise xpcom.COMException(nsError.NS_ERROR_NO_INTERFACE, "The interface '%s' does not exist" % (name,))
00155         return _Interface(item.GetName(), item.GetIID())

Here is the caller graph for this function:

def xpcom.components._ComponentCollection.has_key (   self,
  key 
) [inherited]

Definition at line 90 of file components.py.

00090 
00091     def has_key(self, key):
00092         if self._dict_data is None:
00093             self._dict_data = self._build_dict()
00094         return self._dict_data.has_key(key)

Here is the call graph for this function:

def xpcom.components._ComponentCollection.items (   self) [inherited]

Definition at line 82 of file components.py.

00082 
00083     def items(self):
00084         if self._dict_data is None:
00085             self._dict_data = self._build_dict()
        return self._dict_data.items()

Here is the call graph for this function:

def xpcom.components._ComponentCollection.keys (   self) [inherited]

Definition at line 78 of file components.py.

00078 
00079     def keys(self):
00080         if self._dict_data is None:
00081             self._dict_data = self._build_dict()
        return self._dict_data.keys()

Here is the call graph for this function:

Definition at line 86 of file components.py.

00086 
00087     def values(self):
00088         if self._dict_data is None:
00089             self._dict_data = self._build_dict()
        return self._dict_data.values()

Here is the call graph for this function:


The documentation for this class was generated from the following file: