okay ! thanks a lot for your explanations !! I'm checking this... Manu.
2007/12/6, David Callu <[EMAIL PROTECTED]>: > > oupss don't finish and google send it, arrrgggg > > Take a look to osg/include/osgIntrospection/Reflector. Some template > reflector is define for std::list, std::vector, ... > This is the best way a found to generate a reflector for a instantiated > template not instantiate in the code to reflect. > > David > > 2007/12/6, David Callu <[EMAIL PROTECTED]>: > > > > > > > > 2007/12/6, Emmanuel Roche <[EMAIL PROTECTED]>: > > > > > > Hi David, > > > > > > What I mean in my ponit 2 is: > > > > > > - Suppose I have a library "lib1" where I define my class "Class1" > > > - Suppose I build a wrapper for this library: "lib1_wrapper" > > > > > > Now, I build another library, "lib2" where I define a templated class > > > "Class2<T>" > > > In this second library, I define the typedef : > > > typedef Class2<Class1> MyTypedef; > > > > > > - And now I try to build a wrapper for this lib2, "lib2_wrapper". > > > > > > As Class1 is not in lib2, I guess the genwrapper will complain about > > > no reflector being built for Class2< Class1 >, > > > > > > > > GenWrapper work on one Header at time. So if your "typedef > > Class2<Class1> MyTypedef;" > > is define in the same file of the template definition Class2<T>, It will > > create the Class2<Class1> reflector. > > > > > > > > > > I also have a similar question on the same issue, more generally > > > speaking: > > > > > > Suppose in my lib1, I define Class1 and the template Class2<T>, but > > > never instantiating Class4<Class1>... Would there be a way to instanciate > > > this type with through the wrapper then ? > > > > > > If you think to add "typedef Class4<Class1> myClass;" in the wrapper > > source with the optional genWrapper.conf file, this is theoretically > > possible (from the compiler and linker view). But genWrapper don't support > > this kind of operation. > > > > A solution is to create a template reflector for your template Class2 > > and instanciate this template reflector in the wrapper source. > > Alre > > > > > > Manu. > > > > > > > > > 2007/12/6, David Callu <[EMAIL PROTECTED]>: > > > > > > > > Hi Manu > > > > > > > > 2007/12/5, Emmanuel Roche <[EMAIL PROTECTED] >: > > > > > > > > > > Helle there !! > > > > > > > > > > I'm currently testing the osg reflection framework, so I got > > > > > GenWrapper, an now I'm using it to try to build wrappers for my own > > > > > libraries... Here is the situation: > > > > > > > > > > I've got a file typedefs.h containing something like: > > > > > > > > > > #include <osg/Node> > > > > > #include <osg/ref_ptr> > > > > > > > > > > typedef osg::ref_ptr<osg::Node> RefNode; > > > > > > > > > > And when I use genwrapper with such a file, just before the output > > > > > * INFO: creating file `gen/src/osgWrappers/ogl/Typedefs.cpp' > > > > > > > > > > I get: * WARNING: could not write a reflector for undefined type > > > > > `osg::ref_ptr< osg::Node >' > > > > > > > > > > I'm quite new to the introspection, so please correct me if I'm > > > > > wrong: > > > > > > > > > > 1) Am I right to assume that this warning is not important and > > > > > everything will be all right as long as I load the osg wrapper > > > > > library as > > > > > this one would provide everything needed to access the reflector for > > > > > this > > > > > type ? > > > > > > > > You right > > > > > > > > > > > > > > > > > > > > 2) And, if it's really the case, is this assumption dangerous > > > > > because osg::ref_ptr< osg::Node > is a particularly common type and > > > > > the same > > > > > assumption would not work for something more exotic (like using > > > > > osg:ref_ptr< > > > > > MyObjectType > where MyObjectType is "introspected" in a first library > > > > > (lib1) and this referenced type defined only in a second library... If > > > > > someone sees what I mean...) ? > > > > > > > > I am not sure to see what you mean. > > > > can you explain this please > > > > > > > > David > > > > > > > > _______________________________________________ > > > > 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 > >
_______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org