Table of Contents

Class: OutputPluginsClass sam/OutputPlugins.py

Handles the output plugins for SAM.

Purpose: Loads the available output plugins, and manages them: running them when appropriate, or returning a list of loaded plugins. This class is created by code outside the class, in the OutputPlugins module, to ensure all plugins share the same instance of the OutputPluginsClass.

Used by: OutputPlugins module

Uses: Plugin

Attributes: None

SRS Refs: 3.2.1.6, 3.2.1.8, 4.3.3.3

Author: caedwa

Date: 15/7/02

Methods   
__init__
listPlugins
loadPlugins
registerPlugin
runPlugin
  __init__ 
__init__ ( self )

Purpose: Creates a new instance of the class OutputPluginsClass.

Used By: AnalysisPlugins module

Uses: None

Input: None

Output: New instance of the class OutputPluginsClass

Preconditions: None

Postconditions: None

SRS Refs: 3.2.1.6, 4.3.3.3

Author: caedwa

Date: 15/7/02

  listPlugins 
listPlugins ( self )

Purpose: Returns a list of the currently loaded output plugins.

Used By: MainWindow

Uses: None

Input: None

Output: list_of_plugins : Plugin[]

Preconditions: None

Postconditions: None

SRS Refs: 3.2.1.6, 4.3.3.3

Author: caedwa

Date: 15/7/02

  loadPlugins 
loadPlugins ( self,  dir )

Purpose: Loads all plugins in the directory dir. This gets called once by the single instance of the OutputPlugins module, when it is imported by a plugin.

Used By: OutputPlugins module

Uses: os

Input: dir : String

Output: None

Preconditions: None

Postconditions: None

SRS Refs: 3.2.1.6, 4.3.3.3

Author: caedwa

Date: 15/7/02

  registerPlugin 
registerPlugin (
        self,
        title,
        callback,
        )

Purpose: Called by a plugin to register itself as being available as an output plugin, with a title of title, and a function to call of callback. Creates a new Plugin object for the plugin and adds this to the list of Plugins.

Used By: all output plugins

Uses: Plugin

Input: title : String

callback : Function

Output: None

Preconditions: None

Postconditions: None

SRS Refs: 4.3.3.3

Author: caedwa

Date: 15/7/02

  runPlugin 
runPlugin (
        self,
        plugin,
        table,
        )

Purpose: Runs the output plugin given by the id of the data in table, returning None.

Used By: MainWindow

Uses: Plugin

Input: plugin : Plugin

table : Table

Output: runPlugin : Table

Preconditions: None

Postconditions: None

SRS Refs: 3.2.1.8, 4.3.3.3

Author: caedwa

Date: 15/7/02


Table of Contents

This document was automatically generated on Wed Oct 30 23:04:21 2002 by HappyDoc version 2.0