pyffi :: formats :: kfm :: KfmFormat :: Class KfmFormat :: Class HeaderString
[hide private]
[frames] | no frames]

Class HeaderString

source code

                   object --+        
                            |        
       utils.graph.DetailNode --+    
                                |    
object_models.xml.basic.BasicBase --+
                                    |
                                   KfmFormat.HeaderString

The kfm header string.
Instance Methods [hide private]
 
__init__(self, **kwargs)
Initializes the instance.
source code
 
__str__(self)
Return string representation.
source code
 
get_hash(self, data=None)
Return a hash value for this value.
source code
 
read(self, stream, data)
Read header string from stream and check it.
source code
 
write(self, stream, data)
Write the header string to stream.
source code
 
get_size(self, data=None)
Return number of bytes the header string occupies in a file.
source code
str
get_detail_display(self)
Return an object that can be used to display the instance.
source code

Inherited from object_models.xml.basic.BasicBase: fix_links, get_editor_value, get_links, get_refs, get_strings, get_value, replace_global_node, set_editor_value, set_value

Inherited from utils.graph.DetailNode: get_detail_child_edge_types, get_detail_child_names, get_detail_child_nodes, get_detail_iterator

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

Static Methods [hide private]
 
version_string(version)
Transforms version number into a version string.
source code
Class Variables [hide private]

Inherited from object_models.xml.basic.BasicBase: arg

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, **kwargs)
(Constructor)

source code 
Initializes the instance.
Parameters:
  • template - type used as template
  • argument - argument used to initialize the instance (see the Struct class).
  • parent - The parent of this instance, that is, the instance this instance is an attribute of.
Overrides: object.__init__
(inherited documentation)

__str__(self)
(Informal representation operator)

source code 
Return string representation.
Overrides: object.__str__
(inherited documentation)

get_hash(self, data=None)

source code 
Return a hash value for this value.
Returns:
An immutable object that can be used as a hash.
Overrides: object_models.xml.basic.BasicBase.get_hash

read(self, stream, data)

source code 
Read header string from stream and check it.
Parameters:
  • stream (file) - The stream to read from.
  • version (int) - The file version.
Overrides: object_models.xml.basic.BasicBase.read

write(self, stream, data)

source code 
Write the header string to stream.
Parameters:
  • stream (file) - The stream to write to.
Overrides: object_models.xml.basic.BasicBase.write

get_size(self, data=None)

source code 
Return number of bytes the header string occupies in a file.
Returns:
Number of bytes.
Overrides: object_models.xml.basic.BasicBase.get_size

get_detail_display(self)

source code 
Return an object that can be used to display the instance.
Returns: str
A string that can be used to display the instance.
Overrides: utils.graph.DetailNode.get_detail_display
(inherited documentation)

version_string(version)
Static Method

source code 

Transforms version number into a version string.

>>> KfmFormat.HeaderString.version_string(0x0202000b)
';Gamebryo KFM File Version 2.2.0.0b'
>>> KfmFormat.HeaderString.version_string(0x01024b00)
';Gamebryo KFM File Version 1.2.4b'
Parameters:
  • version (int) - The version number.
Returns:
A version string.