Package beepy :: Package profiles :: Module profile :: Class ProfileDict
[show private | hide private]
[frames | no frames]

Class ProfileDict


a ProfileDict is a specialised dictionary for managing profiles known by a Session.
Method Summary
  __init__(self)
  __delitem__(self, uri)
Remove a profile from the dictionary
  __getitem__(self, uri)
  __setitem__(self, uri, module)
Adds a profile to the dictionary
  addProfile(self, profileModule, init_callback)
Adds a module to the dictionary without needing to know the uri of the module.
  getCallback(self, uri)
Return a reference to a module's initalisation callback
  getURIList(self)
Gets a list of the URIs of profiles in the dictionary
  removeProfile(self, uri)
Remove a profile from the dictionary

Method Details

__delitem__(self, uri)
(Index deletion operator)

Remove a profile from the dictionary
Parameters:
uri - the uri of the profile to remove

__setitem__(self, uri, module)
(Index assignment operator)

Adds a profile to the dictionary
Parameters:
uri - the uri used to refer to the profile
           (type=string)
module - a reference to a loaded module
           (type=an imported module reference)

addProfile(self, profileModule, init_callback=None)

Adds a module to the dictionary without needing to know the uri of the module.
Parameters:
profileModule - the module to add
           (type=an imported module reference)
init_callback - a profile initialisation method to use at create time
           (type=a bound method)

getCallback(self, uri)

Return a reference to a module's initalisation callback
Parameters:
uri - the URI of the profile
           (type=string)
Returns:
a reference to a bound method

getURIList(self)

Gets a list of the URIs of profiles in the dictionary
Returns:
a list of URI strings

removeProfile(self, uri)

Remove a profile from the dictionary
Parameters:
uri - the URI of the profile to remove
           (type=string)

Generated by Epydoc 2.0 on Thu Sep 30 14:39:25 2004 http://epydoc.sf.net