Package pyffi :: Package formats :: Package cgf :: Class CgfFormat :: Class FileSignature
[hide private]
[frames] | no frames]

Class FileSignature

source code

                   object --+        
                            |        
       utils.graph.DetailNode --+    
                                |    
object_models.xml.basic.BasicBase --+
                                    |
                                   CgfFormat.FileSignature

The CryTek file signature with which every cgf file starts.
Instance Methods [hide private]
 
__init__(self, **kwargs)
Initializes the instance.
source code
 
__str__(self)
Return string representation.
source code
 
_str(self, data) source code
 
read(self, stream, data)
Read signature from stream.
source code
 
write(self, stream, data)
Write signature to stream.
source code
 
get_value(self)
Get signature.
source code
 
set_value(self, value)
Not implemented.
source code
 
get_size(self, data=None)
Return number of bytes that the signature occupies in a file.
source code
 
get_hash(self, data=None)
Return a hash value for the signature.
source code

Inherited from object_models.xml.basic.BasicBase: fix_links, get_detail_display, get_editor_value, get_links, get_refs, get_strings, replace_global_node, set_editor_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__

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)

read(self, stream, data)

source code 
Read signature from stream.
Parameters:
  • stream (file) - The stream to read from.
Overrides: object_models.xml.basic.BasicBase.read

write(self, stream, data)

source code 
Write signature to stream.
Parameters:
  • stream (file) - The stream to read from.
Overrides: object_models.xml.basic.BasicBase.write

get_value(self)

source code 
Get signature.
Returns:
The signature.
Overrides: object_models.xml.basic.BasicBase.get_value

set_value(self, value)

source code 
Not implemented.
Overrides: object_models.xml.basic.BasicBase.set_value

get_size(self, data=None)

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

get_hash(self, data=None)

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