# ############################################################################# # # $Id: README,v 1.4 1998/03/23 15:03:54 boris Exp $ # # Project QtDynLoad (version 0.3): an external modul system for Qt/Linux. # Makefile for "QtDynLoad-0.3". # # System: Linux v2.x, Qt v1.33, # pgcc v2.90.23 (egcs v1.0.1), glibc v2.0.x, libstdc++ v2.8.x. # Author: Boris Mühmer; Copyright 1998 © B. Mühmer, Hard- & Software. # *** The code of this package is free software. *** # # ############################################################################# [ First of all, sorry for my bad English, but it isn't my native toungue. ] [ Corrections and improvements (not only for the written things) are ] [ welcome. ] Status: ~~~~~~~ I consider this package as freeware, but it is still copyrighted by me. If you want to include this software in a commercial project please inform me first; it wouldn't cost You a penny (I think, this would violate the free license for Qt), but I just want to now, who uses this piece of jun... aeh ... software. Gifts, postcards, email, software licencies, hardware, and money are always welcome. Blurb: ~~~~~~ Finally I started to write down some notes about this package. It is sort of a documentation, but I would always recommend to read the sources. I do not document the sources well, too, but I think they should be readable for everyone programming in C++ and using the (*great*) Qt library. About: ~~~~~~ After someone (I lost his address again, due to some local email problems) posted the question about "how to program external modules for linux/qt", I started to build this software package; also I needed itself for my own projects. After two days of hacking I got the first working version. The only problem was, I tried to use a C++ header for the module interface, and gcc&co made it difficult to setup an easy interface. Then I changed the header to a normal C interface definition. And after some little more work (some hours), the "new design" even worked using the Qt-signal-slot mechanism. Now I try to make the package smaller, so it will be easier to use. The Module Interface: ~~~~~~~~~~~~~~~~~~~~~ The module interface consists of a header file ("Module.H") defining a module header, access routines for your application and some definitions you must include in your module to make it work. Detailed Interface Documentation: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You have to make a difference between application code (something that uses an external modules) and the external module itself. The following steps are necessary for the external module code: - include the header "Module.H" - use the macro "MODULE_HEADER;" - use the macro "MODULE_INITFUNC ( /*data*/)" or "MODULE_INITFUNC ( data)" to define you module initializer (the comment must be included when using no data pointer, because without, gcc will generate an error !) - the rest is up to you; look at the test modules for more information Your module intialisation function is of the following type: static void (*Init) ( void* /*data*/ ) Your application code should include "Module.H". Your module interface is a class of type "class Module". Your interface to this class consists of the following methods: Module::Module ( , ); This method tries to access the module. The is the path to the location of the module including its name. is either a "void*" or a "QObject*" pointer, to the modules "parent" data area. What you allow the module depends on this pointer. Module::~Module (); This method destroys the module object. Module::IsValid (); Checks if the module is properly loaded. To see, how all these things work, have a look at the sources ! Currently there is no (real) debugging code included (only if dlopen() or dlsym() fails, some output is generated). To Do: ~~~~~~ I do not really know ... - extend the documentation ... - add some more examples ... -- Boris 'Harlequin' Mühmer EMail: mhs@Cybernet-AG.de Entwicklung von Software sowie SMail: Pilotystr. 20 Vertrieb von Hard- und Software D-90408 Nürnberg Voice:+49-911-355049 Data/Fax: 3658847 Germany WWW: http://www.geocities.com/~bsmuehmer # ############################################################################# # # (Almost) End Of File (here start the log). # # $Log: README,v $ # Revision 1.4 1998/03/23 15:03:54 boris # SNAPSHOT - the release version for 0.3 # # #############################################################################