[osg-users] Serialization Question (Proto Constructors)

2011-08-10 Thread Jeremy Moles
This question is for anyone who has used the new serialization interface
introduced by Wang Rui in 2010 (osgWrappers/serializers).

Is it possible to pass arguments to the object's constructor? The 2nd
argument to the REGISTER_ macro lets you define the protocol for object
creation, but the arguments cannot (as far as I can tell) be
dynamic--and certainly not values from the serialization stream--right?

Please correct me if I'm wrong... :)

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Serialization Question (Proto Constructors)

2011-08-10 Thread Wang Rui
Hi Jeremy,

Yes. The serializers at present don't support constructor with
arguments. It is welcome if you and anyone else could provide the
functionality. :-)

Wang Rui


2011/8/11 Jeremy Moles jer...@emperorlinux.com:
 This question is for anyone who has used the new serialization interface
 introduced by Wang Rui in 2010 (osgWrappers/serializers).

 Is it possible to pass arguments to the object's constructor? The 2nd
 argument to the REGISTER_ macro lets you define the protocol for object
 creation, but the arguments cannot (as far as I can tell) be
 dynamic--and certainly not values from the serialization stream--right?

 Please correct me if I'm wrong... :)

 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Serialization Question (Proto Constructors)

2011-08-10 Thread Jeremy Moles
On Thu, 2011-08-11 at 08:16 +0800, Wang Rui wrote:
 Hi Jeremy,
 
 Yes. The serializers at present don't support constructor with
 arguments. It is welcome if you and anyone else could provide the
 functionality. :-)

I'll see if I can do it...

BTW: Working with the new serializer interfaces has been a breeze; it's
really great stuff! I might make a small example showing how to do it
for others to get up to speed. The 'osguserdata' examples gives some
hints, but really people will want to know how to use
{Input,Output}Stream.{write,read}Object(), what the serializer macros
do, etc.

It's been quite easy though, and I'm definitely not using it a simple
way. :)

 Wang Rui
 
 
 2011/8/11 Jeremy Moles jer...@emperorlinux.com:
  This question is for anyone who has used the new serialization interface
  introduced by Wang Rui in 2010 (osgWrappers/serializers).
 
  Is it possible to pass arguments to the object's constructor? The 2nd
  argument to the REGISTER_ macro lets you define the protocol for object
  creation, but the arguments cannot (as far as I can tell) be
  dynamic--and certainly not values from the serialization stream--right?
 
  Please correct me if I'm wrong... :)
 
  ___
  osg-users mailing list
  osg-users@lists.openscenegraph.org
  http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
 
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
 


___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org