Back to index

enigmail  1.4.3
Classes | Functions | Variables
xpt Namespace Reference

Classes

class  FileFormatError
class  DataError
class  Type
class  SimpleType
class  InterfaceType
class  InterfaceIsType
class  ArrayType
class  StringWithSizeType
class  WideStringWithSizeType
class  Param
class  Method
class  Constant
class  Interface
class  Typelib

Functions

def M_add_class_attribs
def enum
def xpt_dump
def xpt_link

Variables

string XPT_MAGIC = "XPCOM\nTypeLib\r\n\x1a"
tuple TYPELIB_VERSION = (1, 2)

Class Documentation

class xpt::FileFormatError

Definition at line 76 of file xpt.py.

class xpt::DataError

Definition at line 79 of file xpt.py.


Function Documentation

def xpt.enum (   names)

Definition at line 90 of file xpt.py.

00090 
00091 def enum(*names):
00092     class Foo(object):
00093         __metaclass__ = M_add_class_attribs(enumerate(names))
00094         def __setattr__(self, name, value):  # this makes it read-only
00095             raise NotImplementedError
00096     return Foo()
00097 
# Descriptor types as described in the spec

Here is the call graph for this function:

def xpt.M_add_class_attribs (   attribs)

Definition at line 83 of file xpt.py.

00083 
00084 def M_add_class_attribs(attribs):
00085     def foo(name, bases, dict_):
00086         for v, k in attribs:
00087             dict_[k] = v
00088         return type(name, bases, dict_)
00089     return foo

Here is the caller graph for this function:

def xpt.xpt_dump (   file)
Dump the contents of |file| to stdout in the format of xpt_dump.

Definition at line 1313 of file xpt.py.

01313 
01314 def xpt_dump(file):
01315     """
01316     Dump the contents of |file| to stdout in the format of xpt_dump.
01317 
01318     """
01319     t = Typelib.read(file)
01320     t.dump(sys.stdout)

Here is the caller graph for this function:

def xpt.xpt_link (   dest,
  inputs 
)
Link all of the xpt files in |inputs| together and write the
result ot |dest|.

Definition at line 1321 of file xpt.py.

01321 
01322 def xpt_link(dest, inputs):
01323     """
01324     Link all of the xpt files in |inputs| together and write the
01325     result ot |dest|.
01326 
01327     """
01328     if not inputs:
01329         print >>sys.stderr, "Usage: xpt_link <destination file> <input files>"
01330         return
01331     t1 = Typelib.read(inputs[0])
01332     for f in inputs[1:]:
01333         t2 = Typelib.read(f)
01334         # write will call sanitycheck, so skip it here.
01335         t1.merge(t2, sanitycheck=False)
01336     t1.write(dest)

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

tuple xpt.TYPELIB_VERSION = (1, 2)

Definition at line 74 of file xpt.py.

string xpt.XPT_MAGIC = "XPCOM\nTypeLib\r\n\x1a"

Definition at line 73 of file xpt.py.