Table of Contents

Class: DescriptorMap ./ladspa.py

Maps UniqueID's and Label's to Descriptor instances for an entire set of directories.

This class loads all available Descriptors on the given path, and maintains useful mappings to them. The two primary mappings use Descriptor UniqueIDs and Labels, respectively, as keys. DescriptorMap instances act like read-only dictionaries, where keys are either UniqueIDs (integers) or Labels (strings).

Methods   
__getitem__
__init__
add_dir
add_plugin
get
ids
labels
  __getitem__ 
__getitem__ ( self,  key )

A UniqueID or Label may be used as a key.

  __init__ 
__init__ ( self,  ladspapath=None )

The ladspapath argument is passed directly to get_ladspa_path.

  add_dir 
add_dir ( self,  dir )

Adds all the plugins found in dir to the mappings.

  add_plugin 
add_plugin ( self,  plugin )

Adds a plugin to the mapping.

The plugin argument is either a Plugin instance, or a string passed to the Plugin constructor.

Note: Any Label or UniqueID keys will be overwritten. This can be useful if a plugin needs to be reloaded, but may cause problems for namespace collisions (which should never happen for UniqueIDs and hopefully doesn't happen to Labels.

  get 
get (
        self,
        key,
        default=None,
        )

A UniqueID or Label may be used as a key.

  ids 
ids ( self )

Returns all UniqueIDs which are usable as keys.

  labels 
labels ( self )

Returns all Labels which are usable as keys.


Table of Contents

This document was automatically generated on Sun Apr 14 04:00:09 2002 by HappyDoc version 2.0