HI Vincent, Go have a look at the source code, it contains the single static instance of the Registry, so the method only ever returns a single Registry. It would be worth your reading up about static variables in C/C++ so you can understand how this stuff works, it really beyond the scope of the OSG community to teach your this stuff.
Robert. On Tue, May 19, 2009 at 11:54 AM, Vincent Bourdier <[email protected]> wrote: > Hi all, > > A little new question about a c++ implementation of registry : > > The static method instance() return a new registry each time, so each call > have a new instance, so how can the registry's class plugin list can be good > ? any call to registry::instance()->addReaderWriter() add the the > reader/Wirter in a new registry instance ... so how can it works correctly ? > > Thanks for you help. > > Regards, > Vincent. > > 2009/5/15 Vincent Bourdier <[email protected]> >> >> Hi Art, >> >> I need to make these lib (dll/so) for linux and window at least, so I need >> common behavior. >> I'm thinking a mix of the inheriting class and the osg plugin registry >> behavior with the template static register method ... (note so >> understandable I think) that is to say, may be a mix of all these way can >> bring me to a good solution .. >> >> Still here if you have suggestion or ideas >> >> Thanks every one, still good to have quality help here :-) >> >> Regards, >> Vincent. >> >> 2009/5/15 Art Tevs <[email protected]> >>> >>> Hi Vincent, >>> >>> >>> >>> Vincent.B wrote: >>> > Hi all, >>> > If you need to load dynamically some DLL (as osg plugins) but theses >>> > DLL have no similar I/O (so make each one inherit from a base class have >>> > no >>> > sense), how will you do ? >>> > >>> > I'm thinking in the calssical loadLibrary and getProcAdress for each >>> > one, ... but if you know or think in an other solution, I would be very >>> > interested to hear it. >>> > >>> >>> >>> In windows world each dll can have an entry point. This is a C function, >>> which will be called on dll loading. In unix world, I am not sure if there >>> exists default entry point routines, I think yes, but I am not sure. >>> >>> cheers, >>> art >>> >>> ------------------ >>> Read this topic online here: >>> http://forum.openscenegraph.org/viewtopic.php?p=12249#12249 >>> >>> >>> >>> >>> >>> _______________________________________________ >>> osg-users mailing list >>> [email protected] >>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org >> > > > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

