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

module.cpp

Go to the documentation of this file.
00001 
00002 #include <kore/version.h>
00003 #include <kore/module.h>
00004 #include <kore/modulemanager.h>
00005 #include <kore/kernel.h>
00006 #include <iostream>
00007 
00008 #define MODULE_TYPE "Module"
00009 
00010 using namespace kore;
00011 
00012 Module::Info::Info()
00013 {
00014     setInfo();
00015 }
00016 Module::Info::Info(Module* module, const char* name, const char* type, const char* description, const Version* version, const Version* api)
00017 {
00018     setInfo(module, name, type, description, version, api);
00019 }
00020 Module::Info::~Info()
00021 {
00022 }
00023 
00024 Module* Module::Info::module() const
00025 {
00026     return _module;
00027 }
00028 const char* Module::Info::name() const
00029 {
00030     return _name;
00031 }
00032 const char* Module::Info::type() const
00033 {
00034     return _type;
00035 }
00036 const char* Module::Info::description() const
00037 {
00038     return _description;
00039 }
00040 const Version* Module::Info::version() const
00041 {
00042     return _version;
00043 }
00044 const Version* Module::Info::APIVersion() const
00045 {
00046     return _api;
00047 }
00048 
00049 void Module::Info::setModule(Module* module)
00050 {
00051     _module = module;
00052 }
00053 void Module::Info::setName(const char* name)
00054 {
00055     _name = name;
00056 }
00057 void Module::Info::setType(const char* type)
00058 {
00059     if( type )
00060         _type = type;
00061     else
00062         setType(MODULE_TYPE);
00063 }
00064 void Module::Info::setDescription(const char* description)
00065 {
00066     _description = description;
00067 }
00068 void Module::Info::setVersion(const Version* version)
00069 {
00070     _version = version;
00071 }
00072 void Module::Info::setAPIVersion(const Version* api)
00073 {
00074     _api = api;
00075 }
00076 void Module::Info::setInfo(Module* module, const char* name, const char* type, const char* description, const Version* version, const Version* api)
00077 {
00078     setModule(module);
00079     setName(name);
00080     setType(type);
00081     setDescription(description);
00082     setVersion(version);
00083     setAPIVersion(version);
00084 }
00085 
00086 Module::Module()
00087 {
00088     setInfo();
00089 }
00090 Module::Module(const Info* info)
00091 {
00092     setInfo(info);
00093 }
00094 
00095 const Module::Info* Module::info() const
00096 {
00097     return _info;
00098 }
00099 void Module::setInfo(const Module::Info* info)
00100 {
00101     _info = info;
00102 }
00103 
00104 void Module::registeringModule(ModuleManager* mm)
00105 {
00106     //cout << info()->name() << " " << (const char*)*(info()->version()) << " : registering to " << mm->info()->name() << " " << (const char*)*(mm->info()->version()) << endl;
00107 }
00108 void Module::moduleRegistered(ModuleManager* mm)
00109 {
00110     //cout << info()->name() << " " << (const char*)*(info()->version()) << " : registered to " << mm->info()->name() << " " << (const char*)*(mm->info()->version()) << endl;
00111 }
00112 void Module::unregisteringModule(ModuleManager* mm)
00113 {
00114     //cout << info()->name() << " " << (const char*)*(info()->version()) << " : unregistering from " << mm->info()->name() << " " << (const char*)*(mm->info()->version()) << endl;
00115 }
00116 void Module::moduleUnregistered(ModuleManager* mm)
00117 {
00118     //cout << info()->name() << " " << (const char*)*(info()->version()) << " : unregistered from " << mm->info()->name() << " " << (const char*)*(mm->info()->version()) << endl;
00119 }
00120 
00121 Module::~Module()
00122 {
00123 }

Generated on Sat Feb 16 03:44:39 2002 for Korelib by doxygen1.2.12 written by Dimitri van Heesch, © 1997-2001