qt-interest@trolltech.com
[Top] [All Lists]

Re: factory within plugins

Subject: Re: factory within plugins
From: Frank
Date: Tue, 25 Dec 2007 18:39:42 +0100
Thiago,

does this mean, that it is in general impossible to realize a factory within
a plugin. "Factory" here means: I want to create more than one instance of
the loaded class (loaded as plugin).

Why do I want that? The loaded class represents a data reader, that is
queried multiple times for data simultanously. So I want to have different
instances of the data reader living in different threads to reply to these
request.

Greetings!
Frank


Thiago Macieira wrote:

> Frank wrote:
>>To reproduce the linker error, uncomment line 68 in main.cpp:
>>//qDebug() << bp->getName();
>>
>>It is really clean code and uses an easy to understand structure. So If
>>someone managed to have a factory in a QPlugin, please tell me what's
>> wrong here.
> 
> The problem is that you're using a *plugin*.
> 
> As such, by definition, you load it at runtime. You don't link to it.
> 
> So you *cannot* use something defined in the plugin from the main
> application. You can only use the Qt plugin loading classes (and other
> similar API) to obtain symbols you want.

--
To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with 
"unsubscribe" in the subject or the body.
List archive and information: http://lists.trolltech.com/qt-interest/

<Prev in Thread] Current Thread [Next in Thread>