Re: Object plugins (Was: Re: Article in Inter.net (Was: RE: Bug 51471- Possible bugfix))

Andreas Zehender <[email protected]>
Newsgroups gmane.comp.kde.devel.kpovmodeler
Message-ID <[email protected]>
Hi Luis!

On Saturday, 08. March 2003 07:34, Andreas Zehender wrote:
> The only problem so far:
> The insert rules system object is a singleton. Imagine the user opens a
> povray _and_ a renderman scene. These two parts are in the same process
> space and will share the singleton instance. The system will contain the
> rules of both plugins and therefore the rules of all renderman and povray
> objects. Same with the prototype manager.
>
> The plugins are loaded on a per part basis. That means the actions for the
> plugins objects (menu and toolbar items) are only visible in the
> corresponding window.
[...]
> The only solution seems to be for me to remove many singletons like the
> insert rules system and the prototype manager, add an own instance of these
> classes to the part and add a pointer to the part to all objects.

Done.
- PMPrototypeManager and PMInsertRuleSystem are no singletons any more, the 
part has how one instance of each.
- All objects have a pointer to the part now (needed to access the insert rule 
instance)
- To reduce memory consumption the meta object (PMMetaObject) has a factory 
method to create new object instances, the newObject factory methods are 
removed. Therefore the prototypes can be deleted immediately in the 
PMPrototypeManager::addPrototype call.

Andreas

-- 
--------------------------------------------------
 Andreas Zehender
 Master of Computer Science, Dipl. Ing. (BA)
 http://www.azweb.de
 [email protected] | [email protected]      
--------------------------------------------------


List archive and information: http://mail.kde.org/mailman/listinfo/kpovmodeler-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.