Hi Farshid, No, getComponentContainer() returns NULL if no container exists. But the convenience method addMeta() will create a default container if none exists. This default container will be derived from MixinMap in first implementation, but may be customizable later on, with a factory/callback/prototype container/whatever.
The idea of a getOrCreateComponentContainer() could be nice anyway! Note: this will be "Great job" once it will be approved, coded, debugged, and well tested! ;) Cheers, Sukender PVLE - Lightweight cross-platform game engine - http://pvle.sourceforge.net/ ----- "Farshid Lashkari" <[email protected]> a écrit : > Will the "getComponentContainer" method of osg::Object implicitly > create the container if it does not already exist? How about a > "getOrCreateComponentContainer", similar to how StateSet objects are > accessed/created for nodes. > > > I also agree with Peter's suggestion of being able to iterate over > values. That would be useful. > > > Overall, this looks really nice. Great job! > > > Cheers, > Farshid > > > On Fri, Apr 15, 2011 at 3:29 AM, Sukender < [email protected] > wrote: > > > Hi Robert, hi all, > > We often discussed about handling name-value pairs in core OSG. Now > it's time for action! > Grégoire Tarizzo and I wrote a first specification document about a > metadata system. We would like you (I mean all those interested in the > subject) to review it and give your feeling and feedback. Please take > this document as an "advanced proposal". > We *WILL* for sure code a first version of the meta-data system. But > even if we tried to cover most aspects and most usages, wee need you > to ensure this submission to be widely accepted. > > Thank you very much. > Happy reading! > > Sukender > PVLE - Lightweight cross-platform game engine - > http://pvle.sourceforge.net/ > > _______________________________________________ > osg-submissions mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org > > > > _______________________________________________ > osg-submissions mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org _______________________________________________ osg-submissions mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
