brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.0 KiB · 7b524d1 Raw
43 lines · python
1class myIntSynthProvider(object):2    def __init__(self, valobj, dict):3        self.valobj = valobj4        self.val = self.valobj.GetChildMemberWithName("theValue")5 6    def num_children(self):7        return 08 9    def get_child_at_index(self, index):10        return None11 12    def get_child_index(self, name):13        return None14 15    def update(self):16        return False17 18    def has_children(self):19        return False20 21    def get_value(self):22        return self.val23 24 25class myArraySynthProvider(object):26    def __init__(self, valobj, dict):27        self.valobj = valobj28        self.array = self.valobj.GetChildMemberWithName("array")29 30    def num_children(self, max_count):31        if 16 < max_count:32            return 1633        return max_count34 35    def get_child_at_index(self, index):36        return None  # Keep it simple when this is not tested here.37 38    def get_child_index(self, name):39        return None  # Keep it simple when this is not tested here.40 41    def has_children(self):42        return True43