Miasm2
 All Classes Namespaces Files Functions Variables Typedefs Properties Macros
Public Member Functions | Public Attributes | Private Attributes | List of all members
miasm2.analysis.depgraph.CacheWrapper Class Reference
+ Inheritance diagram for miasm2.analysis.depgraph.CacheWrapper:
+ Collaboration diagram for miasm2.analysis.depgraph.CacheWrapper:

Public Member Functions

def __init__
 
def __eq__
 
def nostep_keys
 
def nostep_cache
 

Public Attributes

 nostep_cache
 

Private Attributes

 _nostep_cache
 
 _nostep_keys
 

Detailed Description

Wrapper class for cache dictionnary

Definition at line 123 of file depgraph.py.

Constructor & Destructor Documentation

def miasm2.analysis.depgraph.CacheWrapper.__init__ (   self,
  dct = None 
)
Create a CacheWrapper with value @dct.

Definition at line 127 of file depgraph.py.

128  def __init__(self, dct=None):
129  """Create a CacheWrapper with value @dct."""
130  IterableUserDict.__init__(self, dct)
131  self._nostep_cache = None
132  self._nostep_keys = None

Member Function Documentation

def miasm2.analysis.depgraph.CacheWrapper.__eq__ (   self,
  cache 
)
Returns True if the nostep caches are equals

Definition at line 133 of file depgraph.py.

134  def __eq__(self, cache):
135  """Returns True if the nostep caches are equals"""
136  if self.nostep_keys != cache.nostep_keys:
137  return False
138  return self.nostep_cache == cache.nostep_cache

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

def miasm2.analysis.depgraph.CacheWrapper.nostep_cache (   self)
Dictionnary of DependencyNode and their dependencies,
without the step attribute.
The dictionnary is generated once when the method is called for the
first time and not updated afterward.

Definition at line 150 of file depgraph.py.

151  def nostep_cache(self):
152  """Dictionnary of DependencyNode and their dependencies,
153  without the step attribute.
154  The dictionnary is generated once when the method is called for the
155  first time and not updated afterward.
156  """
157  if self._nostep_cache is None:
158  self._nostep_cache = {}
159  for (node, values) in self.data.iteritems():
160  self._nostep_cache.setdefault(node.nostep_repr, set()).update(
161  set(val.nostep_repr for val in values))
162  return self._nostep_cache
163 
def miasm2.analysis.depgraph.CacheWrapper.nostep_keys (   self)
List of dictonnary keys without the step attribute.
The list is generated once when the method is called and not updated
afterward.

Definition at line 140 of file depgraph.py.

141  def nostep_keys(self):
142  """List of dictonnary keys without the step attribute.
143  The list is generated once when the method is called and not updated
144  afterward.
145  """
146  if self._nostep_keys is None:
147  self._nostep_keys = set(key.nostep_repr for key in self.data)
148  return self._nostep_keys

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

miasm2.analysis.depgraph.CacheWrapper._nostep_cache
private

Definition at line 130 of file depgraph.py.

miasm2.analysis.depgraph.CacheWrapper._nostep_keys
private

Definition at line 131 of file depgraph.py.

miasm2.analysis.depgraph.CacheWrapper.nostep_cache

Definition at line 137 of file depgraph.py.


The documentation for this class was generated from the following file: