#include <PluginManager.h>


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 | 
manages a plugin database (2xml files: one in user's home directory, another in install path of GFLC, with
| 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] | 
        
| 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] | 
        
Add plugin to plugin_list and DOM
| name | ||
| category | ||
| version | ||
| authors | ||
| filename | 
References XMLHandler::ATTR_id, crusde_warning(), XMLHandler::doc, XMLHandler::getActualID(), Plugin::getAuthors(), Plugin::getCategory(), Plugin::getCategoryID(), Plugin::getDescription(), Plugin::getName(), SimulationCore::getRegisteredParameters(), SimulationCore::getRequestedNames(), Plugin::getVersion(), SimulationCore::instance(), plugin, stringify(), XMLHandler::TAG_authors, XMLHandler::TAG_category, XMLHandler::TAG_dateAdded, XMLHandler::TAG_dependency, XMLHandler::TAG_description, XMLHandler::TAG_filename, XMLHandler::TAG_name, XMLHandler::TAG_parameter, XMLHandler::TAG_plugin, XMLHandler::TAG_version, and StrXML::xmlStr().
| 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
| entry | plugin someone might depend on | 
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
| entry | plugin someone might depend on | 
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
| id | ||
| tag | 
References XMLHandler::ATTR_id, XMLHandler::doc, i, stringify(), and StrXML::xmlStr().
| DOMNode * PluginManager::getEntryById | ( | int | id | ) |  [private] | 
        
References XMLHandler::TAG_plugin, and StrXML::xmlStr().
Referenced by getEntryDetails().
| string PluginManager::getEntryDetails | ( | int | id | ) |  [virtual] | 
        
returns a formatted string for display containing all details listed for plugin 'id' in db
get Experiments
Implements DatabaseManager.
References XMLHandler::getChildData(), getDependencies(), getEntryById(), getParameters(), plugin, XMLHandler::TAG_authors, XMLHandler::TAG_category, XMLHandler::TAG_dateAdded, XMLHandler::TAG_description, XMLHandler::TAG_filename, XMLHandler::TAG_name, XMLHandler::TAG_version, and StrXML::xmlStr().
| 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) | 
| name | 
References is_initialized.
Referenced by InputHandler::getCrustalDecayPlugin(), InputHandler::getGreenPlugin(), InputHandler::getKernelPlugin(), InputHandler::getLoadHistoryPlugin(), InputHandler::getLoadPlugin(), InputHandler::getOutputPlugin(), and SimulationCore::init().
| 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
| entry | plugin someone might depend on | 
References XMLHandler::getValueOfNode(), i, XMLHandler::TAG_parameter, and StrXML::xmlStr().
Referenced by getEntryDetails().
| DOMNode * PluginManager::isInDB | ( | string | filename, | |
| string | category | |||
| ) |  [private] | 
        
| filename | ||
| category | 
References XMLHandler::doc, XMLHandler::getChildData(), i, XMLHandler::TAG_category, XMLHandler::TAG_name, XMLHandler::TAG_plugin, and StrXML::xmlStr().
| void PluginManager::run | ( | ) |  [virtual] | 
        
starts qt and the plugin manager dialog
Implements DatabaseManager.
References DatabaseManager::is_initialized, and DatabaseManager::runDialogWindow().
Referenced by SimulationCore::runPluginManager().
Plugin PluginManager::plugin [private] | 
        
one plugin instance that's gonna be managed
Referenced by addToDB(), and getEntryDetails().
 1.6.1-20091004