def dump(self, f=sys.stdout):
    if (self.nature == 0):
        f.write(('%s' % self.get_name()))
    elif (self.nature == 1):
        f.write('packed-switch-payload\n')
        f.write('INDEX KEY       TARGET\n===== --------- ---------\n')
        for (i, target) in enumerate(self.targets):
            f.write(('[%3u] %+8.8x %+8.8x\n' % (i, (self.first_key + i), target)))
    elif (self.nature == 2):
        f.write('sparse-switch-payload\n')
        f.write('INDEX KEY       TARGET\n===== --------- ---------\n')
        for (i, key) in enumerate(self.keys):
            f.write(('[%3u] %+8.8x %+8.8x\n' % (i, key, self.targets[i])))
    elif (self.nature == 3):
        f.write(('fill-array-data-payload (elem_width = %u, size = %u)\n' % (self.element_width, self.size)))
        file_extract.dump_memory(0, self.data, self.element_width, f)
def dump(self, f=sys.stdout):
    if (self.nature == 0):
        f.write(('%s' % self.get_name()))
    elif (self.nature == 1):
        f.write('packed-switch-payload\n')
        f.write('INDEX KEY       TARGET\n===== --------- ---------\n')
        for (i, target) in enumerate(self.targets):
            f.write(('[%3u] %+8.8x %+8.8x\n' % (i, (self.first_key + i), target)))
    elif (self.nature == 2):
        f.write('sparse-switch-payload\n')
        f.write('INDEX KEY       TARGET\n===== --------- ---------\n')
        for (i, key) in enumerate(self.keys):
            f.write(('[%3u] %+8.8x %+8.8x\n' % (i, key, self.targets[i])))
    elif (self.nature == 3):
        f.write(('fill-array-data-payload (elem_width = %u, size = %u)\n' % (self.element_width, self.size)))
        file_extract.dump_memory(0, self.data, self.element_width, f)