Back to index

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

List of all members.

Public Member Functions

def __init__
def __repr__
def IsIn
def IsOut
def IsInOut
def IsRetval
def IsShared
def IsDipper
def Describe_Python
def Describe

Public Attributes

 type_desc
 hidden_indicator
 param_index
 method_index
 interface_info

Detailed Description

Definition at line 267 of file xpt.py.


Constructor & Destructor Documentation

def xpcom.xpt.Parameter.__init__ (   self,
  param_desc,
  param_index,
  method_index,
  interface_info = None 
)

Definition at line 268 of file xpt.py.

00268 
00269     def __init__(self,  param_desc, param_index, method_index, interface_info = None):
00270         self.param_flags, self.type_desc = param_desc
00271         self.hidden_indicator = 0 # Is this a special "size" type param that will be hidden from Python?
00272         self.param_index = param_index
00273         self.method_index= method_index
        self.interface_info = interface_info

Member Function Documentation

Definition at line 274 of file xpt.py.

00274 
00275     def __repr__(self):
        return "<param %(param_index)d (method %(method_index)d) - flags = 0x%(param_flags)x, type = %(type_desc)s>" % self.__dict__

Here is the caller graph for this function:

Definition at line 311 of file xpt.py.

00311 
00312     def Describe(self):
00313         parts = []
00314         if self.IsInOut():
00315             parts.append('inout')
00316         elif self.IsIn():
00317             parts.append('in')
00318         elif self.IsOut():
00319             parts.append('out')
00320 
00321         if self.IsDipper(): parts.append("dipper")
00322         if self.IsRetval(): parts.append('retval')
00323         if self.IsShared(): parts.append('shared')
00324         t = TypeDescriber(self.type_desc[0], self)
00325         type_str = t.Describe()
00326         parts.append(type_str)
00327         return string.join(parts)
00328 
# A class that allows caching and iterating of constants.

Here is the call graph for this function:

Definition at line 289 of file xpt.py.

00289 
00290     def Describe_Python(self):
00291         name = "param%d" % (self.param_index,)
00292         if self.hidden_indicator:
00293             # Could remove the comment - Im trying to tell the user where that param has
00294             # gone from the signature!
00295             return None, "%s is a hidden parameter" % (name,), None, None
00296         t = TypeDescriber(self.type_desc[0], self)
00297         decl = in_comment = out_comment = result_comment = None
00298         type_desc = t.Describe()
00299         if self.IsIn() and not self.IsDipper():
00300             decl = name
00301             extra=""
00302             if self.IsOut():
00303                 extra = "Out"
00304             in_comment = "In%s: %s: %s" % (extra, name, type_desc)
00305         elif self.IsOut() or self.IsDipper():
00306             if self.IsRetval():
00307                 result_comment = "Result: %s" % (type_desc,)
00308             else:
00309                 out_comment = "Out: %s" % (type_desc,)
00310         return decl, in_comment, out_comment, result_comment

Here is the call graph for this function:

Definition at line 286 of file xpt.py.

00286 
00287     def IsDipper(self):
00288         return XPT_PD_IS_DIPPER(self.param_flags)

Here is the caller graph for this function:

def xpcom.xpt.Parameter.IsIn (   self)

Definition at line 276 of file xpt.py.

00276 
00277     def IsIn(self):
        return XPT_PD_IS_IN(self.param_flags)

Here is the caller graph for this function:

Definition at line 280 of file xpt.py.

00280 
00281     def IsInOut(self):
        return self.IsIn() and self.IsOut()

Here is the call graph for this function:

Here is the caller graph for this function:

def xpcom.xpt.Parameter.IsOut (   self)

Definition at line 278 of file xpt.py.

00278 
00279     def IsOut(self):
        return XPT_PD_IS_OUT(self.param_flags)

Here is the caller graph for this function:

Definition at line 282 of file xpt.py.

00282 
00283     def IsRetval(self):
        return XPT_PD_IS_RETVAL(self.param_flags)

Here is the caller graph for this function:

Definition at line 284 of file xpt.py.

00284 
00285     def IsShared(self):
        return XPT_PD_IS_SHARED(self.param_flags)

Here is the caller graph for this function:


Member Data Documentation

Definition at line 270 of file xpt.py.

Definition at line 273 of file xpt.py.

Definition at line 272 of file xpt.py.

Definition at line 271 of file xpt.py.

Definition at line 269 of file xpt.py.


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