Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

OmgModellerPluginInterface Class Reference
[Library]

#include <omgmodellerplugininterface.h>

Inheritance diagram for OmgModellerPluginInterface:

Inheritance graph
[legend]
Collaboration diagram for OmgModellerPluginInterface:

Collaboration graph
[legend]
List of all members.

Detailed Description

An abstract base class for all modeller plugins. It defines the interface that all modeller plugins must adhere to.

Author:
Tim Sutton

Definition at line 40 of file omgmodellerplugininterface.h.

Public Member Functions

virtual ~OmgModellerPluginInterface ()
virtual QString createModel (OmgModel *thepModel)=0
virtual void projectModel (OmgModel *thepModel)=0
virtual const QStringList getAlgorithmList ()=0
virtual const OmgAlgorithmSet getAlgorithmSet ()=0
virtual const QString getLayers (QString theBaseDir)=0
virtual const QString getName ()=0
virtual const OmgPluginMessengergetMessenger ()
virtual const QString getModelDefinition (QString theModelXml)

Protected Member Functions

 OmgModellerPluginInterface ()

Protected Attributes

OmgPluginMessenger mMessenger


Constructor & Destructor Documentation

OmgModellerPluginInterface::~OmgModellerPluginInterface  )  [virtual]
 

Definition at line 25 of file omgmodellerplugininterface.cpp.

OmgModellerPluginInterface::OmgModellerPluginInterface  )  [inline, protected]
 

The default constructor is protected so that no besides inheriting classes can use it!

Definition at line 99 of file omgmodellerplugininterface.h.


Member Function Documentation

virtual QString OmgModellerPluginInterface::createModel OmgModel thepModel  )  [pure virtual]
 

Create an initial model definition

Parameters:
OmgModel pointer to the model object that will be used as a basis for the mode
Returns:
QString The return xml from the model plugin.

Implemented in OmgModellerLocalPlugin, and OmgModellerWebServicesPlugin.

Referenced by OmgLocalitiesModelTest::rowsAndColumns(), OmgModelTest::run(), and OmgExperiment::run().

virtual const QStringList OmgModellerPluginInterface::getAlgorithmList  )  [pure virtual]
 

Get a list of the algorithm names. Use getAlgorithmId with one of the returned names to find out an algs id

Returns:
QStringList A String List of the algorithm names

Implemented in OmgModellerLocalPlugin, and OmgModellerWebServicesPlugin.

virtual const OmgAlgorithmSet OmgModellerPluginInterface::getAlgorithmSet  )  [pure virtual]
 

Get a collection of algorithm objects in the form of an AgorithmSet. The collection represents every algorithm that is available from the plugin implementing this interface

Returns:
OmgAlgorithmSet - a set of algorithms

Implemented in OmgModellerLocalPlugin, and OmgModellerWebServicesPlugin.

Referenced by OmgAlgorithmSet::getFromActivePlugin().

virtual const QString OmgModellerPluginInterface::getLayers QString  theBaseDir  )  [pure virtual]
 

Get a list of layers by recursively searching a directory heirachy and testing if each file is a gdal loadable file or not. The actual implementation of how this is done is up to the plugin - remote services may have a preconfigured list of available layers that is simply returned without any filesystem scanning.

Parameters:
baseDirectory This is the directory from which to start scanning. This parameter may be ignored by the plugin if the remote resource does not support user specified base directories.
Returns:
QString An xml document providing teh list of available layers.

Implemented in OmgModellerLocalPlugin, and OmgModellerWebServicesPlugin.

Referenced by OmgLayerSelector::buildTree().

const OmgPluginMessenger * OmgModellerPluginInterface::getMessenger  )  [virtual]
 

Get a pointer to the plugin messenger instance associated with this plugin. The pluginmessenger is used to relay signals between the application using the plugin and the plugin itself. Ideally we would just make the plugin interface inherit qobject and implement the signals directly in the interface, but this approach only works on mac and linux at the moment so we resort to this slightly more cumbersome appraoch.

Returns:
OmgPluginMessenger *

Definition at line 29 of file omgmodellerplugininterface.cpp.

References mMessenger.

Referenced by OmgLayerSelector::buildTree(), OmgModellerWebServicesPluginTest::initTestCase(), and OmgModelTest::run().

const QString OmgModellerPluginInterface::getModelDefinition QString  theModelXml  )  [virtual]
 

Parse a model returned from the modelling backend and extract the <model/> from the algorithm

Parameters:
theXml The xml as returned from the modeller engine. The xml should contain the <model>.
Returns:
QString - containing just the model snipped out from the entire document.

Definition at line 34 of file omgmodellerplugininterface.cpp.

virtual const QString OmgModellerPluginInterface::getName  )  [pure virtual]
 

Get the name of this plugin instance - useful for displaying the plugin name in guis etc

Returns:
QString with a user friendly name e.g. 'Local Modeller Plugin'

Implemented in OmgModellerLocalPlugin, and OmgModellerWebServicesPlugin.

Referenced by OmgModellerPluginRegistry::OmgModellerPluginRegistry(), OmgLocalitiesModelTest::rowsAndColumns(), OmgModelTest::run(), and OmgExperimentTest::run().

virtual void OmgModellerPluginInterface::projectModel OmgModel thepModel  )  [pure virtual]
 

Project a model into a climate dataset. the model passed in as a parameter must have a valid model definition

Parameters:
OmgModel pointer to the model object that will be used to project this model.

Implemented in OmgModellerLocalPlugin, and OmgModellerWebServicesPlugin.

Referenced by OmgModelTest::run(), and OmgExperiment::run().


Member Data Documentation

OmgPluginMessenger OmgModellerPluginInterface::mMessenger [protected]
 

The plugin messenger instance associated with this plugin

Definition at line 99 of file omgmodellerplugininterface.h.

Referenced by getMessenger().


The documentation for this class was generated from the following files:
Generated on Mon Apr 28 15:13:49 2008 for openModellerDesktop by  doxygen 1.4.1-20050210