Package pyffi :: Package formats :: Package nif :: Class NifFormat :: Class Ref
[hide private]
[frames] | no frames]

Class Ref

source code

                   object --+        
                            |        
       utils.graph.DetailNode --+    
                                |    
object_models.xml.basic.BasicBase --+
                                    |
                                   NifFormat.Ref
Known Subclasses:

Reference to another block.
Instance Methods [hide private]
 
__init__(self, **kwargs)
Initializes the instance.
source code
 
get_value(self)
Return object value.
source code
 
set_value(self, value)
Set object value.
source code
 
get_size(self, data=None)
Returns size of the object in bytes.
source code
 
get_hash(self, data=None)
Returns a hash value (an immutable object) that can be used to identify the object uniquely.
source code
 
read(self, stream, data)
Read object from file.
source code
 
write(self, stream, data)
Write block reference.
source code
 
fix_links(self, data)
Fix block links.
source code
 
get_links(self, data=None)
Return all links referred to in this object.
source code
 
get_refs(self, data=None)
Return all references (excluding weak pointers) used by this object.
source code
 
replace_global_node(self, oldbranch, newbranch, edge_filter=(True, True))
Replace a given branch.
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: __str__, get_editor_value, get_strings, 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]
  _is_template = True
  _has_links = True
  _has_refs = True

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)

get_value(self)

source code 
Return object value.
Overrides: object_models.xml.basic.BasicBase.get_value
(inherited documentation)

set_value(self, value)

source code 
Set object value.
Overrides: object_models.xml.basic.BasicBase.set_value
(inherited documentation)

get_size(self, data=None)

source code 
Returns size of the object in bytes.
Overrides: object_models.xml.basic.BasicBase.get_size
(inherited documentation)

get_hash(self, data=None)

source code 
Returns a hash value (an immutable object) that can be used to identify the object uniquely.
Overrides: object_models.xml.basic.BasicBase.get_hash
(inherited documentation)

read(self, stream, data)

source code 
Read object from file.
Overrides: object_models.xml.basic.BasicBase.read
(inherited documentation)

write(self, stream, data)

source code 
Write block reference.
Overrides: object_models.xml.basic.BasicBase.write

fix_links(self, data)

source code 
Fix block links.
Overrides: object_models.xml.basic.BasicBase.fix_links

get_links(self, data=None)

source code 
Return all links referred to in this object.
Overrides: object_models.xml.basic.BasicBase.get_links
(inherited documentation)

get_refs(self, data=None)

source code 
Return all references (excluding weak pointers) used by this object.
Overrides: object_models.xml.basic.BasicBase.get_refs
(inherited documentation)

replace_global_node(self, oldbranch, newbranch, edge_filter=(True, True))

source code 
>>> from pyffi.formats.nif import NifFormat
>>> x = NifFormat.NiNode()
>>> y = NifFormat.NiNode()
>>> z = NifFormat.NiNode()
>>> x.add_child(y)
>>> x.children[0] is y
True
>>> x.children[0] is z
False
>>> x.replace_global_node(y, z)
>>> x.children[0] is y
False
>>> x.children[0] is z
True
>>> x.replace_global_node(z, None)
>>> x.children[0] is None
True
Overrides: utils.graph.DetailNode.replace_global_node

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)