2 from OperationRegistry
import OperationRegistry
5 """ Bundles a bunch of operations to be applied together.
9 # opList -- list of operations
15 def addOp(self
, opName
):
16 op
= OperationRegistry
.getRegisteredOp(opName
);
19 print "ERROR: addOp called with unknown op \"%s\"" % opName
;
24 def subOp(self
, opName
):
25 op
= OperationRegistry
.getRegisteredOp(opName
);
28 print "ERROR: subOp called with unknown op \"%s\"" % opName
;
32 def applyBundle(self
, driver
):
33 for op
in self
.opList
:
36 ###############################
39 # add op to the list of enabled ones (unless it already is in it)
40 def internal_addOp(self
, op
):
41 if op
not in self
.opList
:
42 self
.opList
.append(op
);
44 # remove op from the list of enables ones
45 def internal_subOp(self
, op
):
47 self
.opList
.remove(op
);