Package pyffi :: Package formats :: Package esp :: Class EspFormat
[hide private]
[frames] | no frames]

Class EspFormat

source code

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

This class implements the ESP format.
Nested Classes [hide private]
  int
Basic implementation of a 32-bit signed integer type.
  uint
Implementation of a 32-bit unsigned integer type.
  byte
Implementation of a 8-bit signed integer type.
  ubyte
Implementation of a 8-bit unsigned integer type.
  char
Implementation of an (unencoded) 8-bit character.
  short
Implementation of a 16-bit signed integer type.
  ushort
Implementation of a 16-bit unsigned integer type.
  float
Implementation of a 32-bit float.
  uint64
Implementation of a 64-bit unsigned integer type.
  ZString
String of variable length (null terminated).
  RecordType
  Data
A class to contain the actual esp data.
  Record
  GRUP
  CELL
  CELL_DATA
  CELL_EDID
  CELL_FULL
  CELL_XCLL
  CELL_XCMT
  CELL_XOWN
  CellFlags
  FormId
  GroupType
  MusicType
  REFR
  RecordFlags
  RecordRevision
  SubRecord
A subrecord.
  TES4
  TES4_CNAM
  TES4_DATA
  TES4_HEDR
  TES4_MAST
  TES4_SNAM
  _GRUP
A group of records.
  _Record
A record.

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]
 
_read_records(cls, stream, data, parent=None, size=None, num_records=None)
Read records by data size or by number.
source code

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 = 'esp.xml'
Override.
  xml_file_path = [None, '/usr/lib/python2.7/site-packages/pyffi...
Override.
  RE_FILENAME = re.compile(r'(?i)^.*\.(es[psm])$')
Override this with a regular expression (the result of a re.compile call) for the file extension of the format you are implementing.
  _EPSILON = 0.0001
  games = {'Morrowind': [258], 'Oblivion': [8]}
  versions = {'0.8': 8, '1.2': 258}
  xml_bit_struct = [<class 'pyffi.formats.esp.RecordFlags'>, <cl...
  xml_enum = [<class 'pyffi.formats.esp.GroupType'>, <class 'pyf...
  xml_struct = [<class 'pyffi.formats.esp.RecordRevision'>, <cla...

Inherited from object_models.xml.FileFormat: logger, xml_alias

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.

>>> hex(EspFormat.version_number('1.2'))
'0x102'
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/esp']

xml_bit_struct

Value:
[<class 'pyffi.formats.esp.RecordFlags'>,
 <class 'pyffi.formats.esp.FormId'>,
 <class 'pyffi.formats.esp.CellFlags'>]

xml_enum

Value:
[<class 'pyffi.formats.esp.GroupType'>,
 <class 'pyffi.formats.esp.MusicType'>]

xml_struct

Value:
[<class 'pyffi.formats.esp.RecordRevision'>,
 <class 'pyffi.formats.esp.SubRecord'>,
 <class 'pyffi.formats.esp._Record'>,
 <class 'pyffi.formats.esp._GRUP'>,
 <class 'pyffi.formats.esp.TES4'>,
 <class 'pyffi.formats.esp.TES4_HEDR'>,
 <class 'pyffi.formats.esp.TES4_CNAM'>,
 <class 'pyffi.formats.esp.TES4_SNAM'>,
...