Represents the (sub-)tree under a particular node in a qub tree, in an
open file or in memory.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
__len__(self)
Returns the number of child nodes. |
source code
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
clone(self,
deep=True,
file=None)
Returns a copy of the (sub-)tree rooted here, copied into file, or
else in-memory. |
source code
|
|
|
|
|
|
|
saveAs(self,
path,
as_copy=False)
Creates a new file at path, moves the (sub-)tree rooted here into the
file, and save()s. |
source code
|
|
|
saveAsText(self,
path)
Writes a text representation of the (sub-)tree rooted here, to path
on disk. |
source code
|
|
|
save(self)
When this node is the root of an open file (self.storage.file !=
None), writes any modifications to disk. |
source code
|
|
|
__pre_save(self)
Recursively refreshes the child and sibling positions, in case they
have moved, so nodes are accurately marked unclean and modified. |
source code
|
|
|
__re_save(self)
Recursively writes any modifications to disk. |
source code
|
|
|
re_read(self)
Recursively reads storage and instantiates child and sibling nodes,
during Open. |
source code
|
|
|
close(self)
If this node is the root of an open file, moves it into memory and
close the file. |
source code
|
|
|
getBytes(self)
Returns the binary representation of the (sub-)tree rooted here, just
as it would be on disk, as a string. |
source code
|
|
|
__re_measure(self)
Returns the number of bytes needed to store the (sub-)tree rooted
here. |
source code
|
|
|
|
|
list(self)
Returns the names of all child Nodes. |
source code
|
|
|
find(self,
name)
Returns the first child with name, or the NullNode. |
source code
|
|
|
next(self,
name)
Returns the next sibling with name, or the NullNode. |
source code
|
|
|
nextSameName(self)
Returns the next sibling with name == self.name, or the NullNode. |
source code
|
|
|
append(self,
childOrName)
inserts after the last child node and returns it. |
source code
|
|
|
insert(self,
childOrName,
after=None)
insert(str, after): inserts a new child node after the given child or
first, with the given name, or '', and returns it append(Node,
after): inserts an existing node after the given child or first,
first removing it from its former parent if any, and returns it |
source code
|
|
|
appendClone(self,
other,
deep=True)
Inserts a copy of other, after the last child, and returns it. |
source code
|
|
|
insertClone(self,
other,
deep=True,
after=None)
Inserts a copy of other, after the given child or first, and returns
it. |
source code
|
|
|
remove(self,
child,
re_store=True)
Removes the given child, making it its own root. |
source code
|
|
|
setChanged(self)
artifact from when data edits didn't go memmap straight to disk; had
to be marked changed; does nothing. |
source code
|
|
|
lock(self,
timeoutMS=None)
the native flavor has a mutex, mainly to protect the ref-count. |
source code
|
|
|
unlock(self)
the native flavor has a mutex, mainly to protect the ref-count. |
source code
|
|
Inherited from object :
__delattr__ ,
__format__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__setattr__ ,
__sizeof__ ,
__subclasshook__
|