Skip to main content

class compolyx.ElementSelectionRule(graph, obj, parent=None)

Base class for rules. This acts as an interface to the cpp object of the rules. The base class implements _py_update which is called after the cpp update. It sets the changed flag. Since NameGraph derives from Observable, observers can listen on ‘changed’. In order to support csv_serialization, the classes have to implement a ‘_dict’ method and a list named ‘_csv_parameters’. The _dict method specifies which properties are written and _csv_parameters specifies which parameters are read and how they are parsed. The keys in _dict and the elements in _parameters_csv have to be consistent. If the conversion from the string to an object is more than simple type conversion, it can be implemented in _update_rule_from_csv.

Attributes

Methods