Package pyffi :: Package formats :: Package bsa :: Class BsaFormat
[hide private]
[frames] | no frames]

Class BsaFormat

source code

              object --+        
                       |        
object_models.FileFormat --+    
                           |    
object_models.xml.FileFormat --+
                               |
                              BsaFormat

This class implements the BSA format.
Nested Classes [hide private]
  UInt32
Implementation of a 32-bit unsigned integer type.
  ZString
String of variable length (null terminated).
  Hash
  BZString
  FileVersion
Basic type which implements the header of a BSA file.
  Header
A class to contain the actual bsa data.
  ArchiveFlags
  Data
A class to contain the actual bsa data.
  File
  FileFlags
  FileSize
  Folder
  OldFile
  _Header

Inherited from object_models.xml.FileFormat: __metaclass__

Instance Methods [hide private]

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Methods [hide private]

Inherited from object_models.xml.FileFormat: vercondFilter

Inherited from object_models.FileFormat: name_attribute, name_class, name_parts, walk, walkData

Static Methods [hide private]
 
version_number(version_str)
Converts version string into an integer.
source code
Class Variables [hide private]
  xml_file_name = 'bsa.xml'
Override.
  xml_file_path = [None, '/usr/lib/python2.7/site-packages/pyffi...
Override.
  RE_FILENAME = re.compile(r'(?i)^.*\.bsa$')
Override this with a regular expression (the result of a re.compile call) for the file extension of the format you are implementing.
  games = {}
  versions = {}
  xml_bit_struct = [<class 'pyffi.formats.bsa.ArchiveFlags'>, <c...
  xml_struct = [<class 'pyffi.formats.bsa.OldFile'>, <class 'pyf...

Inherited from object_models.xml.FileFormat: logger, xml_alias, xml_enum

Inherited from object_models.FileFormat: ARCHIVE_CLASSES

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

version_number(version_str)
Static Method

source code 

Converts version string into an integer.

>>> BsaFormat.version_number('103')
103
>>> BsaFormat.version_number('XXX')
-1
Parameters:
  • version_str (str) - The version string.
Returns:
A version integer.
Overrides: object_models.FileFormat.version_number

Class Variable Details [hide private]

xml_file_path

Override.
Value:
[None, '/usr/lib/python2.7/site-packages/pyffi/formats/bsa']

xml_bit_struct

Value:
[<class 'pyffi.formats.bsa.ArchiveFlags'>,
 <class 'pyffi.formats.bsa.FileFlags'>,
 <class 'pyffi.formats.bsa.FileSize'>]

xml_struct

Value:
[<class 'pyffi.formats.bsa.OldFile'>,
 <class 'pyffi.formats.bsa.File'>,
 <class 'pyffi.formats.bsa.Folder'>,
 <class 'pyffi.formats.bsa._Header'>]