Home · All Namespaces · All Classes · Functions · Coding Style · Plugins · File Structure

StelModuleMgr Class Reference

Manage a collection of StelModules including both core and plugin modules. More...

#include <StelModuleMgr.hpp>

List of all members.

Public Member Functions

void update ()
void registerModule (StelModule *m, bool generateCallingLists=false)
void unloadModule (const QString &moduleID, bool alsoDelete=true)
StelModuleloadPlugin (const QString &moduleID)
void unloadAllPlugins ()
StelModulegetModule (const QString &moduleID)
QList< StelModule * > getAllModules ()
void generateCallingLists ()
const QList< StelModule * > & getCallOrders (StelModule::StelModuleActionName action)

Static Public Member Functions

static QList< PluginDescriptorgetPluginsList ()


struct  PluginDescriptor
 Contains the information read from the module.ini file. More...

Detailed Description

Manage a collection of StelModules including both core and plugin modules.

The order in which some actions like draw or update are called for each module can be retrieved with the getCallOrders() method.

Member Function Documentation

void StelModuleMgr::update (  ) 

Regenerate calling lists if necessary.

void StelModuleMgr::registerModule ( StelModule m,
bool  generateCallingLists = false 

Register a new StelModule to the list The module is later referenced by its QObject name.

void StelModuleMgr::unloadModule ( const QString &  moduleID,
bool  alsoDelete = true 

Unregister and delete a StelModule.

The program will hang if other modules depend on the removed one

moduleID the unique ID of the module, by convention equal to the class name
alsoDelete if true also delete the StelModule instance, otherwise it has to be deleted by external code.

StelModule* StelModuleMgr::loadPlugin ( const QString &  moduleID  ) 

Load dynamically a module.

moduleID the name of the module = name of the dynamic library file without extension (e.g "mymodule" for mymodule.so or mymodule.dll)
the loaded module or NULL in case of error. The returned Stelmodule still needs to be initialized

void StelModuleMgr::unloadAllPlugins (  ) 

Unload all plugins.

StelModule* StelModuleMgr::getModule ( const QString &  moduleID  ) 

Get the corresponding module or NULL if can't find it.

moduleID the QObject name of the module instance, by convention it is equal to the class name

QList<StelModule*> StelModuleMgr::getAllModules (  )  [inline]

Get the list of all the currently registered modules.

void StelModuleMgr::generateCallingLists (  ) 

Generate properly sorted calling lists for each action (e,g, draw, update) according to modules orders dependencies.

const QList<StelModule*>& StelModuleMgr::getCallOrders ( StelModule::StelModuleActionName  action  )  [inline]

Get the list of modules in the correct order for calling the given action.

static QList<PluginDescriptor> StelModuleMgr::getPluginsList (  )  [static]

Return the list of all the external module found in the modules directories.

Generated on Mon Feb 2 17:23:48 2009 for Stellarium by  doxygen 1.5.5