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

Class Ptr

source code

                   object --+            
                            |            
       utils.graph.DetailNode --+        
                                |        
object_models.xml.basic.BasicBase --+    
                                    |    
                        NifFormat.Ref --+
                                        |
                                       NifFormat.Ptr

A weak reference to another block, used to point up the hierarchy tree. The reference is not returned by the L{get_refs} function to avoid infinite recursion.
Instance Methods [hide private]
 
get_value(self)
Return object value.
source code
 
set_value(self, value)
Set object value.
source code
 
__str__(self)
Return string representation.
source code
 
get_refs(self, data=None)
Return all references (excluding weak pointers) used by this object.
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
 
replace_global_node(self, oldbranch, newbranch, edge_filter=(True, True))
Replace a given branch.
source code

Inherited from Ref: __init__, fix_links, get_detail_display, get_links, get_size, read, write

Inherited from object_models.xml.basic.BasicBase: 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 = False

Inherited from object_models.xml.basic.BasicBase: arg

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

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)

__str__(self)
(Informal representation operator)

source code 
Return string representation.
Overrides: object.__str__
(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)

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)

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
(inherited documentation)