miasm
Reverse engineering framework
|
Public Member Functions | |
def | __init__ (self, max_size, min_size=None, initialdata=None, delete_cb=None) |
def | __setitem__ (self, asked_key, value) |
def | __contains__ (self, key) |
def | has_key (self, key) |
def | keys (self) |
def | data (self) |
def | __getitem__ (self, key) |
def | __delitem__ (self, key) |
def | __del__ (self) |
def | __len__ (self) |
def | __iter__ (self) |
Limited in size dictionary. To reduce combinatory cost, once an upper limit @max_size is reached, @max_size - @min_size elements are suppressed. The targeted elements are the less accessed. One can define a callback called when an element is removed
def miasm.core.utils.BoundedDict.__init__ | ( | self, | |
max_size, | |||
min_size = None , |
|||
initialdata = None , |
|||
delete_cb = None |
|||
) |
Create a BoundedDict @max_size: maximum size of the dictionary @min_size: (optional) number of most used element to keep when resizing @initialdata: (optional) dict instance with initial data @delete_cb: (optional) callback called when an element is removed
def miasm.core.utils.BoundedDict.__del__ | ( | self | ) |
Ensure the callback is called when last reference is lost
def miasm.core.utils.BoundedDict.__contains__ | ( | self, | |
key | |||
) |
def miasm.core.utils.BoundedDict.__delitem__ | ( | self, | |
key | |||
) |
def miasm.core.utils.BoundedDict.__getitem__ | ( | self, | |
key | |||
) |
def miasm.core.utils.BoundedDict.__iter__ | ( | self | ) |
def miasm.core.utils.BoundedDict.__len__ | ( | self | ) |
def miasm.core.utils.BoundedDict.__setitem__ | ( | self, | |
asked_key, | |||
value | |||
) |
def miasm.core.utils.BoundedDict.data | ( | self | ) |
def miasm.core.utils.BoundedDict.has_key | ( | self, | |
key | |||
) |
def miasm.core.utils.BoundedDict.keys | ( | self | ) |