Hi David,
That code was essentially the code I written, looking the
documentation seems the way it should be. But it doesn't work ( may be
is a bug, I'm working with the last release candidate). Can anybody
else try it? Here method gets null (doesn't find anything) , so to
avoid a horrible segfault place an "assert(method)" after getMethod
call.
I've also tried with getCompatibleMethod with the same result.
J.L.
On 8/31/06, david callu <[EMAIL PROTECTED]> wrote:
Hi Jose,
To call osgDB::Registry::instance()
// ** load osg and osgDB wrapper
osg::ref_ptr<osgDB::DynamicLibrary> osg_reflectors =
osgDB::DynamicLibrary::loadLibrary(createLibraryNameForWrapper("osg"));
osg::ref_ptr<osgDB::DynamicLibrary> osg_reflectors =
osgDB::DynamicLibrary::loadLibrary(createLibraryNameForWrapper("osgDB"));
// ** get the osgDB::Registry Type
const osgIntrospection::Type& t =
osgIntrospection::Reflection::getType("osgDB::Registry");
// ** get the instance method of osgDB::Registry
osgIntrospection::ParameterInfoList params;
const osgIntrospection::MethodInfo* method = t.getMethod("instance", params,
false);
// ** call the osgDB::Registry::instance() and get the osgDB::Registry
instance
osgIntrospection::Value osgDB_Registry_instance = method->invoke();
Get a look to the doxygen of osgIntrospection, the class
osgIntrospection::methodInfo have some invoke(...) function without the
"osgIntrospection::Value& instance" parameter, there functions is for static
method member.
David
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/
--
Jose L. Hidalgo Valiño (PpluX)
---- http://www.pplux.com ----
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/