<div dir="ltr"><div><div>Hi Tony,<br><br></div>The name of the osg::Object is used as a key in UserDataContainerL see the methods:<br><br> /** Get the index position of first user data object that matches specified name.*/<br> virtual unsigned int getUserObjectIndex(const std::string& name, unsigned int startPos=0) const = 0;<br><br> /** Get first user data object with specified name. */<br> virtual Object* getUserObject(const std::string& name, unsigned int startPos=0);<br><br> /** Get first const user data object with specified name. */<br> virtual const Object* getUserObject(const std::string& name, unsigned int startPos=0) const;<br><br></div>Robert.<br><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 23 November 2015 at 22:58, Tony Vasile <span dir="ltr"><<a href="mailto:minghia@gmail.com" target="_blank">minghia@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Robert,<br>
We are trying to save classes which have more than simple types or the list specified in ValueObject. If we try and save an object which has osg::Object has its parent then you get a linker error about missing apply routines for SetValueVisitor and GetValueVisitor. I have worked around this by using addUserObject and setUserObject. I thought it would have been cleaner if we could use a string to token to identified the stored data rather than a magic number. The magic number approach is similar to Performer.<br>
<span class=""><br>
------------------------<br>
Tony V<br>
<br>
------------------<br>
Read this topic online here:<br>
</span><a href="http://forum.openscenegraph.org/viewtopic.php?p=65755#65755" rel="noreferrer" target="_blank">http://forum.openscenegraph.org/viewtopic.php?p=65755#65755</a><br>
<div class="HOEnZb"><div class="h5"><br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
osg-users mailing list<br>
<a href="mailto:osg-users@lists.openscenegraph.org">osg-users@lists.openscenegraph.org</a><br>
<a href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org" rel="noreferrer" target="_blank">http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org</a><br>
</div></div></blockquote></div><br></div>