Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

kore::Module Class Reference

class kore::Module - the base structural and functional unit. More...

#include <module.h>

Inheritance diagram for kore::Module::

kore::Plugin kore::ServiceProvider kore::Kernel kore::ModuleManager kore::PluginLoader kore::PluginManager kore::ServiceManager List of all members.

Public Methods

virtual void registeringModule (ModuleManager *mm)
 Callback method triggered right BEFORE REGISTERING this module to the ModuleManager. More...

virtual void moduleRegistered (ModuleManager *mm)
 Callback method triggered right AFTER REGISTERING this module to the ModuleManager. More...

virtual void unregisteringModule (ModuleManager *mm)
 Callback method triggered right BEFORE UNREGISTERING this module from the ModuleManager. More...

virtual void moduleUnregistered (ModuleManager *mm)
 Callback method triggered right AFTER UNREGISTERING this module from the ModuleManager. More...

virtual const Info * info () const
 Gets the info for this module. More...


Protected Methods

 Module ()
 Default constructor. More...

 Module (const Info *info)
 Creates a module and sets its Info. More...

virtual ~Module ()
 Destructor. More...

void setInfo (const Info *info=0)
 Convenience method for setting the module info. More...


Private Attributes

const Info * _info

Detailed Description

class kore::Module - the base structural and functional unit.

Basically everything (expcept for some helper classes) is a module. This is an abstract class you may use to create your own modules. Also setting up a full module Info is mandatory.

Definition at line 19 of file module.h.


Constructor & Destructor Documentation

Module::Module (    )  [protected]
 

Default constructor.

Creates an empty Module instance.

Definition at line 86 of file module.cpp.

References setInfo().

Referenced by kore::Module::Info::Info(), kore::Module::Info::module(), kore::ModuleManager::registeredModules(), kore::Module::Info::setInfo(), kore::Module::Info::setModule(), and kore::ModuleManager::unregisterModules().

00087 {
00088     setInfo();
00089 }

Module::Module (  const Info *    info )  [protected]
 

Creates a module and sets its Info.

Parameters:
info  - the module info

Definition at line 90 of file module.cpp.

References info(), and setInfo().

00091 {
00092     setInfo(info);
00093 }

Module::~Module (    )  [protected, virtual]
 

Destructor.

Definition at line 121 of file module.cpp.

00122 {
00123 }


Member Function Documentation

const Module::Info * Module::info (    )  const [virtual]
 

Gets the info for this module.

The default implemetation returns the private _info member data, but subclasses may override that.

Returns:
the kore::Module::Info instance associated to this Module

Definition at line 95 of file module.cpp.

References _info.

Referenced by Module(), and setInfo().

00096 {
00097     return _info;
00098 }

void Module::moduleRegistered (  ModuleManager *    mm )  [virtual]
 

Callback method triggered right AFTER REGISTERING this module to the ModuleManager.

Parameters:
mm  - the ModuleManager this Module got registered to.

Definition at line 108 of file module.cpp.

00109 {
00110     //cout << info()->name() << " " << (const char*)*(info()->version()) << " : registered to " << mm->info()->name() << " " << (const char*)*(mm->info()->version()) << endl;
00111 }

void Module::moduleUnregistered (  ModuleManager *    mm )  [virtual]
 

Callback method triggered right AFTER UNREGISTERING this module from the ModuleManager.

Parameters:
mm  - the ModuleManager this Module will get unregistered from.

Definition at line 116 of file module.cpp.

00117 {
00118     //cout << info()->name() << " " << (const char*)*(info()->version()) << " : unregistered from " << mm->info()->name() << " " << (const char*)*(mm->info()->version()) << endl;
00119 }

void Module::registeringModule (  ModuleManager *    mm )  [virtual]
 

Callback method triggered right BEFORE REGISTERING this module to the ModuleManager.

Parameters:
mm  - the ModuleManager this Module will get registered to.

Definition at line 104 of file module.cpp.

00105 {
00106     //cout << info()->name() << " " << (const char*)*(info()->version()) << " : registering to " << mm->info()->name() << " " << (const char*)*(mm->info()->version()) << endl;
00107 }

void Module::setInfo (  const Info *    info = 0 )  [protected]
 

Convenience method for setting the module info.

Parameters:
info  - module info.

Definition at line 99 of file module.cpp.

References _info, and info().

Referenced by kore::Plugin::commonInit(), kore::Kernel::Kernel(), Module(), kore::ModuleManager::ModuleManager(), kore::PluginLoader::PluginLoader(), kore::PluginManager::PluginManager(), and kore::ServiceManager::ServiceManager().

00100 {
00101     _info = info;
00102 }

void Module::unregisteringModule (  ModuleManager *    mm )  [virtual]
 

Callback method triggered right BEFORE UNREGISTERING this module from the ModuleManager.

Parameters:
mm  - the ModuleManager this Module will get unregistered from.

Definition at line 112 of file module.cpp.

00113 {
00114     //cout << info()->name() << " " << (const char*)*(info()->version()) << " : unregistering from " << mm->info()->name() << " " << (const char*)*(mm->info()->version()) << endl;
00115 }


Member Data Documentation

const Info* kore::Module::_info [private]
 

Reimplemented in kore::Kernel.

Definition at line 183 of file module.h.

Referenced by info(), and setInfo().


The documentation for this class was generated from the following files:
Generated on Sat Feb 16 07:06:52 2002 for Korelib by doxygen1.2.12 written by Dimitri van Heesch, © 1997-2001