mrcrowbar.views module

class mrcrowbar.views.LinearStore(parent, source, block_klass, offsets=None, sizes=None, base_offset=0, fill=b'x00', block_kwargs=None, transform=None, **kwargs)[source]

Bases: mrcrowbar.views.View

base_offset
cache()[source]
items
offsets
save()[source]
sizes
source
validate()[source]
class mrcrowbar.views.Store(parent, source, fill=b'x00', base_offset=0, align=1, **kwargs)[source]

Bases: mrcrowbar.views.View

align
base_offset
cache()[source]
cache_object(instance, offset, size, block_klass, block_kwargs=None, transform=None)[source]
get_object(instance, offset, size)[source]
remove_object(instance, offset, size)[source]
save()[source]
set_object(instance, offset, size, value)[source]
source
class mrcrowbar.views.StoreRef(block_klass, store, offset, size=None, count=None, block_kwargs=None, transform=None)[source]

Bases: mrcrowbar.refs.Ref

cache(instance)[source]

Signal to the source to pre-load information.

Called by the parent Block constructor.

get(instance)[source]

Return an attribute from an object using the Ref path.

instance
The object instance to traverse.
remove(instance)[source]
set(instance, value)[source]

Set an attribute on an object using the Ref path.

instance
The object instance to traverse.
value
The value to set.

Throws AttributeError if allow_write is False.

class mrcrowbar.views.View(parent, *args, **kwargs)[source]

Bases: object

parent