Back to index

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

List of all members.

Public Member Functions

def __init__
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 196 of file components.py.


Constructor & Destructor Documentation

Reimplemented from xpcom.components._ComponentCollection.

Definition at line 197 of file components.py.

00197 
00198     def __init__(self):
        _ComponentCollection.__init__(self)

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._Classes._build_dict (   self) [private]

Definition at line 203 of file components.py.

00203 
00204     def _build_dict(self):
00205         ret = {}
00206         enum = registrar.enumerateContractIDs()
00207         while enum.hasMoreElements():
00208             # Call the Python-specific FetchBlock, to keep the loop in C.
00209             items = enum.fetchBlock(2000, _xpcom.IID_nsISupportsCString)
00210             for item in items:
00211                 name = str(item.data)
00212                 ret[name] = _Class(name)
00213         return ret

Here is the caller graph for this function:

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

Definition at line 199 of file components.py.

00199 
00200     def _get_one(self, name):
00201         # XXX - Need to check the contractid is valid!
00202         return _Class(name)

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: