Public Member Functions | Private Attributes | List of all members
generic.models.Organizational.PlotLibrary Class Reference
Inheritance diagram for generic.models.Organizational.PlotLibrary:

Public Member Functions

def __init__ (self)
 
def __repr__ (self)
 
def __contains__ (self, key)
 
def __delitem__ (self, key)
 
def __getitem__ (self, key)
 
def __iter__ (self)
 
def __len__ (self)
 
def __setitem__ (self, key, value)
 

Private Attributes

 _cache
 

Detailed Description

Lookup collection for plots, keyed by PlotID 

Definition at line 307 of file Organizational.py.

Constructor & Destructor Documentation

def generic.models.Organizational.PlotLibrary.__init__ (   self)

Member Function Documentation

def generic.models.Organizational.PlotLibrary.__contains__ (   self,
  key 
)
def generic.models.Organizational.PlotLibrary.__delitem__ (   self,
  key 
)
def generic.models.Organizational.PlotLibrary.__getitem__ (   self,
  key 
)

Definition at line 325 of file Organizational.py.

References generic.models.Organizational.PlotSet._cache, and generic.models.Organizational.PlotLibrary._cache.

325  def __getitem__(self, key):
326  if not isinstance(key, PlotCollectionKey):
327  raise TypeError("%s keys must be of type %s, not %s" % (self.__class__.__name__, PlotCollectionKey, type(key)))
328 
329  try:
330  return self._cache[key]
331  except KeyError:
332  # customize the error message -- don't expose the internal dict
333  raise KeyError("%s has no such plot: %s" % (self.__class__.__name__, key))
334 
def generic.models.Organizational.PlotLibrary.__iter__ (   self)
def generic.models.Organizational.PlotLibrary.__len__ (   self)
def generic.models.Organizational.PlotLibrary.__repr__ (   self)
def generic.models.Organizational.PlotLibrary.__setitem__ (   self,
  key,
  value 
)

Definition at line 341 of file Organizational.py.

References generic.models.Organizational.PlotSet._cache, and generic.models.Organizational.PlotLibrary._cache.

341  def __setitem__(self, key, value):
342  if not isinstance(key, PlotCollectionKey):
343  raise TypeError("%s keys must be of type %s" % (self.__class__.__name__, PlotCollectionKey))
344 
345  self._cache[key] = value
346 

Member Data Documentation

generic.models.Organizational.PlotLibrary._cache
private

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