PluginManager Class Reference

#include <PluginManager.h>

Inheritance diagram for PluginManager:
Inheritance graph
[legend]
Collaboration diagram for PluginManager:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 PluginManager (const char *path)
virtual ~PluginManager ()
virtual bool deleteEntry (int id) throw (DatabaseError, PluginError)
 removes plugin from database. checks before, whether any other plugin depends on ID
virtual void run ()
 starts qt and the plugin manager dialog
virtual multimap< string, map
< int, string > > 
getEntryMap ()
 returns a formatted string for display containing all details listed for plugin 'id' in db
virtual string getEntryDetails (int id)
 returns a formatted string for display containing all details listed for plugin 'id' in db
virtual void addEntry (string absolutepath, DOMNode *parent=0) throw (PluginExistsException)
 runs tests on the plugin found at 'absolute path' and adds it to the database if cleared.
string getFilename (string, string) throw (DatabaseError)

Private Member Functions

 PluginManager (const PluginManager &x)
DOMNode * isInDB (string, string)
void addToDB (string filename, string dst)
DOMNode * getEntryById (int id)
DOMNode * getEntryById (int id, const XMLCh *tag)
list< DOMNode * > getDependents (DOMNode *entry)
list< string > getDependencies (DOMNode *entry)
list< string > getParameters (DOMNode *entry)

Private Attributes

Plugin plugin

Detailed Description

manages a plugin database (2xml files: one in user's home directory, another in install path of GFLC, with


Constructor & Destructor Documentation

PluginManager::PluginManager ( const PluginManager x  )  [private]

hidden copy constructor - we do not want to accidentially copy objects

PluginManager::PluginManager ( const char *  path  ) 

References crusde_debug().

virtual PluginManager::~PluginManager (  )  [inline, virtual]

Member Function Documentation

void PluginManager::addEntry ( string  absolutepath,
DOMNode *  parent = 0 
) throw (PluginExistsException) [virtual]

runs tests on the plugin found at 'absolute path' and adds it to the database if cleared.

add entry

Implements DatabaseManager.

References SimulationCore::deleteRegistrees(), SimulationCore::deleteRequests(), DIR_SEP, SimulationCore::instance(), and PLUGIN_DIR.

Referenced by SimulationCore::installPlugin().

void PluginManager::addToDB ( string  filename,
string  dst 
) [private]
bool PluginManager::deleteEntry ( int  id  )  throw (DatabaseError, PluginError) [virtual]

removes plugin from database. checks before, whether any other plugin depends on ID

delete entry

Implements DatabaseManager.

References crusde_error(), and filename.

list< string > PluginManager::getDependencies ( DOMNode *  entry  )  [private]

checks whether some plugin in the database depends on entry. therefore we retrieve all 'TAG_dependency' entries and compare their contents with

Parameters:
entry plugin someone might depend on
Returns:
list of dependent plugins

References XMLHandler::getValueOfNode(), i, XMLHandler::TAG_dependency, and StrXML::xmlStr().

Referenced by getEntryDetails().

list< DOMNode * > PluginManager::getDependents ( DOMNode *  entry  )  [private]

checks whether some plugin in the database depends on entry. therefore we retrieve all 'TAG_dependency' entries and compare their contents with

Parameters:
entry plugin someone might depend on
Returns:
list of dependent plugins

References XMLHandler::doc, XMLHandler::getChildData(), XMLHandler::getValueOfNode(), i, XMLHandler::TAG_dependency, XMLHandler::TAG_name, and StrXML::xmlStr().

DOMNode * PluginManager::getEntryById ( int  id,
const XMLCh *  tag 
) [private]

to be inherited from base class

Parameters:
id 
tag 
Returns:

References XMLHandler::ATTR_id, XMLHandler::doc, i, stringify(), and StrXML::xmlStr().

DOMNode * PluginManager::getEntryById ( int  id  )  [private]
string PluginManager::getEntryDetails ( int  id  )  [virtual]
multimap< string, map< int, string > > PluginManager::getEntryMap (  )  [virtual]

returns a formatted string for display containing all details listed for plugin 'id' in db

get Entries

Implements DatabaseManager.

References XMLHandler::ATTR_id, XMLHandler::doc, XMLHandler::getChildData(), i, XMLHandler::TAG_category, XMLHandler::TAG_name, XMLHandler::TAG_plugin, and StrXML::xmlStr().

string PluginManager::getFilename ( string  category,
string  name 
) throw (DatabaseError)
list< string > PluginManager::getParameters ( DOMNode *  entry  )  [private]

checks whether some plugin in the database depends on entry. therefore we retrieve all 'TAG_parameter' entries and compare their contents with

Parameters:
entry plugin someone might depend on
Returns:
list of dependent plugins

References XMLHandler::getValueOfNode(), i, XMLHandler::TAG_parameter, and StrXML::xmlStr().

Referenced by getEntryDetails().

DOMNode * PluginManager::isInDB ( string  filename,
string  category 
) [private]
void PluginManager::run (  )  [virtual]

starts qt and the plugin manager dialog

Implements DatabaseManager.

References DatabaseManager::is_initialized, and DatabaseManager::runDialogWindow().

Referenced by SimulationCore::runPluginManager().


Member Data Documentation

one plugin instance that's gonna be managed

Referenced by addToDB(), and getEntryDetails().


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

Generated on Tue Feb 16 15:18:37 2010 for CrusDe by  doxygen 1.6.1-20091004