Package winappdbg :: Module crash :: Class VolatileCrashContainer
[hide private]
[frames] | no frames]

Class VolatileCrashContainer

source code


Manages a database of volatile Crash objects, trying to avoid duplicates if requested.


See Also: Crash.key

Instance Methods [hide private]
 
__init__(self, allowRepeatedKeys=True)
Volatile containers are stored only in memory and destroyed when they go out of scope.
source code
bool
__contains__(self, crash)
Returns: True if the Crash object is in the container.
source code
iterator
__iter__(self)
Returns: Iterator of the contained Crash objects.
source code
int
__len__(self)
Returns: Count of Crash elements in the container.
source code
bool
__bool__(self)
Returns: False if the container is empty.
source code
 
add(self, crash)
Adds a new crash to the container.
source code
bool
has_key(self, key)
Returns: True if a matching Crash object is in the container.
source code
iterator
iterkeys(self)
Returns: Iterator of the contained Crash object keys.
source code
iterator
itervalues(self)
Returns: Iterator of the contained Crash objects.
source code
 
__del__(self) (Inherited from winappdbg.crash.CrashContainer) source code
Crash object.
get(self, key)
Retrieves a crash from the container. (Inherited from winappdbg.crash.CrashContainer)
source code
 
remove(self, crash)
Removes a crash from the container. (Inherited from winappdbg.crash.CrashContainer)
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, allowRepeatedKeys=True)
(Constructor)

source code 

Volatile containers are stored only in memory and destroyed when they go out of scope.

Parameters:
  • allowRepeatedKeys (bool) - If True all Crash objects are stored.

    If False any Crash object with the same key as a previously existing object will be ignored.

Overrides: object.__init__

__contains__(self, crash)
(In operator)

source code 
Parameters:
  • crash (Crash) - Crash object.
Returns: bool
True if the Crash object is in the container.
Overrides: CrashContainer.__contains__

__iter__(self)

source code 
Returns: iterator
Iterator of the contained Crash objects.
Overrides: CrashContainer.__iter__

See Also: itervalues

__len__(self)
(Length operator)

source code 
Returns: int
Count of Crash elements in the container.
Overrides: CrashContainer.__len__

__bool__(self)

source code 
Returns: bool
False if the container is empty.
Overrides: CrashContainer.__bool__

add(self, crash)

source code 

Adds a new crash to the container.

Parameters:
  • crash (Crash) - Crash object to add.
Overrides: CrashContainer.add

Note: When the allowRepeatedKeys parameter of the constructor is set to False, duplicated crashes are ignored.

See Also: Crash.key

has_key(self, key)

source code 
Parameters:
  • key (Crash unique key.) - Key of the crash to get.
Returns: bool
True if a matching Crash object is in the container.
Overrides: CrashContainer.has_key

iterkeys(self)

source code 
Returns: iterator
Iterator of the contained Crash object keys.
Overrides: CrashContainer.iterkeys

See Also: get

Warning: A copy of each object is returned, so any changes made to them will be lost.

To preserve changes do the following:

  1. Keep a reference to the object.
  2. Delete the object from the set.
  3. Modify the object and add it again.

itervalues(self)

source code 
Returns: iterator
Iterator of the contained Crash objects.
Overrides: CrashContainer.itervalues

Warning: A copy of each object is returned, so any changes made to them will be lost.

To preserve changes do the following:

  1. Keep a reference to the object.
  2. Delete the object from the set.
  3. Modify the object and add it again.