[OpenWalnut-Dev] W_LOADABLE_MODULE

Andre Reichenbach reichenbach at informatik.uni-leipzig.de
Fri Apr 12 10:59:10 CEST 2013


Hi list,

Sebastian's suggestion is the way to go. W_LOADABLE_MODULE implements 
the same stuff as in the Toolkit.cpp/.h, but for one module only. It's 
just a quick way to add the function used to provide the prototypes of the modules in a 
library -- if you want to add only a single module. I might be able to 
write a variadic macro, but that would only be aesthetics; we would still need 
the Toolkit.cpp/.h to put it in.

Bye,

   Andre

--

Institut für Informatik
Universität Leipzig
Augustusplatz, 04109 Leipzig
Telefon: +49 341 9732364

On Fri, 12 Apr 2013, Sebastian Eichelbaum wrote:

> Simple answer: yes there is a way do get it working in OW and a toolbox:
>
> keep the WToolBox.cpp and h file. Do not use WLoadableModule. The dataCreator module for example can be used as inspiration.
>
> Bye
> Sebastian
>
> On Fri, 12 Apr 2013, Mathias Goldau wrote:
>
>> Hi Alex,
>>
>> I think you made the point clear that marking module for our
>> moduleLoader is different in the Toolbox and in the OW repository.
>> The problem is, that in OW repo each module becomes *one* shared
>> object or dynamic lib, while in the Toolbox all modules are packed
>> into one shared library. Thats is the reason why it is different.
>>
>> Some days ago, I coded the gaussianProcess stuff and had a similar
>> setup, as I wanted to have a new experminetal DataSet for two
>> modules. So I put also two modules into one OW module, and it was
>> the very same way I had to deal with the W_LOADABLE_MODULE stuff as
>> we have it now within the Toolbox.
>>
>> Comming now to an answer on whether it will be possible to unify
>> both approaches or not. I can not clearly say if it will be
>> possible, I guess that a shared object could not have multiple
>> symbols with the same name. And as I read the W_LOADABLE_MODULE
>> macro in WModule.h I hardly remember that you can only use
>> W_LOADABLE_MODULE macro *once* within your library. I fear this is
>> the reason.
>>
>> However, I could imagine that we could split up the macro into two
>> parts, but than W_LOADABLE_MODULE might loose its beauty, but I
>> would wait on Sebastian's comment on that.
>>
>> HTH, math
>>
>> On 04/11/2013 10:28 PM, Alexander Wiebel wrote:
>>> Hi fellow developers,
>>> maybe I am trying to do something you consider to be strange.
>>> Nevertheless, I would like to hear your opinion on the following.
>>>
>>> I want to maintain a module in the modules repository, i.e. separately
>>> from the main OpenWalnut repo. I followed the example and used a
>>> "WToolkit.cpp" file as shown. ... it works. Then I tried to use the same
>>> code of the same module in another OpenWalnut by simply copying the
>>> module's directory into "src/modules" of the other OpenWalnut and adding
>>> the module to a toolbox. However, when I do this I need to add the
>>> W_LOADABLE_MODULE line to make it compile. So far so good. One could
>>> think, that I can simply add the same line to the modules repo. However,
>>> if I do this it conflicts with the WLoadModule stuff in WToolkit.cpp.
>>>
>>> I hope you were able to follow my explanations. Now my question is: Is
>>> there a way to have code that works for both variants, i.e. in
>>> "src/modules" and in a separate repo with WToolkit?
>>>
>>> Cheers,
>>> Alex
>>> _______________________________________________
>>> OpenWalnut-Dev mailing list
>>> OpenWalnut-Dev at lists.informatik.uni-leipzig.de
>>> http://lists.informatik.uni-leipzig.de/mailman/listinfo/openwalnut-dev
>>>
>>> Archive: http://lists.informatik.uni-leipzig.de/pipermail/openwalnut-dev/
>>>
>>
>> _______________________________________________
>> OpenWalnut-Dev mailing list
>> OpenWalnut-Dev at lists.informatik.uni-leipzig.de
>> http://lists.informatik.uni-leipzig.de/mailman/listinfo/openwalnut-dev
>>
>> Archive: http://lists.informatik.uni-leipzig.de/pipermail/openwalnut-dev/
>>
>
> -- 
> Dipl.-Inf. Sebastian Eichelbaum
> Universität Leipzig
> Institut für Informatik
> Abteilung Bild- und Signalverarbeitung
> PF 100920
> D-04009 Leipzig
> _______________________________________________
> OpenWalnut-Dev mailing list
> OpenWalnut-Dev at lists.informatik.uni-leipzig.de
> http://lists.informatik.uni-leipzig.de/mailman/listinfo/openwalnut-dev
>
> Archive: http://lists.informatik.uni-leipzig.de/pipermail/openwalnut-dev/
>
>


More information about the OpenWalnut-Dev mailing list