Package pyffi :: Module object_models :: Module xml :: Class MetaFileFormat
[hide private]
[frames] | no frames]

Type MetaFileFormat

source code

object --+        
         |        
      type --+    
             |    
MetaFileFormat --+
                 |
                MetaFileFormat
Known Subclasses:

The MetaFileFormat metaclass transforms the XML description of a file format into a bunch of classes which can be directly used to manipulate files in this format.

The actual implementation of the parser is delegated to pyffi.object_models.xml.FileFormat.

Instance Methods [hide private]
the object's type
__init__(cls, name, bases, dct)
This function constitutes the core of the class generation process.
source code

Inherited from type: __call__, __delattr__, __eq__, __ge__, __getattribute__, __gt__, __hash__, __instancecheck__, __le__, __lt__, __ne__, __new__, __repr__, __setattr__, __subclasscheck__, __subclasses__, mro

Inherited from object: __format__, __reduce__, __reduce_ex__, __sizeof__, __str__, __subclasshook__

Static Methods [hide private]

Inherited from MetaFileFormat: openfile

Properties [hide private]

Inherited from type: __abstractmethods__, __base__, __bases__, __basicsize__, __dictoffset__, __flags__, __itemsize__, __mro__, __name__, __weakrefoffset__

Inherited from object: __class__

Method Details [hide private]

__init__(cls, name, bases, dct)
(Constructor)

source code 
This function constitutes the core of the class generation process. For instance, we declare NifFormat to have metaclass MetaFileFormat, so upon creation of the NifFormat class, the __init__ function is called, with
Parameters:
  • cls - The class created using MetaFileFormat, for example NifFormat.
  • name - The name of the class, for example 'NifFormat'.
  • bases - The base classes, usually (object,).
  • dct - A dictionary of class attributes, such as 'xml_file_name'.
Returns: the object's type
Overrides: object.__init__