-
Notifications
You must be signed in to change notification settings - Fork 5
Pylib Operation
campadrenalin edited this page Sep 14, 2011
·
3 revisions
A subclass of ConcurrenTree.model.ModelBase, which provides the function __str__ and the property hash, which are a strict string of the protocol representation and the checksum of the protocol representation, respectively.
Methods:
* __init__(instructions = [], protostring = None) # Protostring overrides instructions, if given
* apply(tree) # Assuming tree is the root, apply all instructions to tree
* ready(tree) # Returns True if you can safely apply, False if some dependencies aren't supplied
* compress() # Reorganizes instructions for efficiency. Only affects instructions with overlapping deletions.
* proto() # Return protocol representation (dict)
Properties:
* inserts # The insertions in the instruction list
* dep_provides # The nodes this op provides (expressed as addresses)
* dep_requires # The addresses that must be valid in the tree before ready(tree) == True
- ParseError(SyntaxError)
- OpApplyError(SyntaxError)