Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Public Attributes
xpcom.xpt.Constants Class Reference

List of all members.

Public Member Functions

def __init__
def __len__
def __getitem__

Public Attributes

 interface_info
 items

Detailed Description

Definition at line 329 of file xpt.py.


Constructor & Destructor Documentation

def xpcom.xpt.Constants.__init__ (   self,
  interface_info 
)

Definition at line 330 of file xpt.py.

00330 
00331     def __init__(self, interface_info):
00332         self.interface_info = interface_info
00333         try:
00334             self.items = [None] * interface_info.GetConstantCount()
00335         except xpcom.Exception:
00336             if xpcom.verbose:
00337                 print "** GetConstantCount failed?? - assuming no constants"
            self.items = []

Member Function Documentation

def xpcom.xpt.Constants.__getitem__ (   self,
  index 
)

Definition at line 340 of file xpt.py.

00340 
00341     def __getitem__(self, index):
00342         ret = self.items[index]
00343         if ret is None:
00344             ci = self.interface_info.GetConstant(index)
00345             ret = self.items[index] = Constant(ci)
00346         return ret

Definition at line 338 of file xpt.py.

00338 
00339     def __len__(self):
        return len(self.items)

Member Data Documentation

Definition at line 331 of file xpt.py.

Definition at line 333 of file xpt.py.


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