Hi Matt

2007/3/23, Matthew Koichi Grimes <[EMAIL PROTECTED]>:

AFAICT, PublicMemberAccessor<C,P> is what you'd use if you had an object
of class C, with a public data member of type P, and you wanted to
get/set that data member. (Is that right?)


Yes it is. But the member doesn't need to provide get/set function, a
pointer to member is use to access
to the variable.

I guess what I meant to ask was: can I use Type to find out what pubic
data members a class has, even if the class doesn't provide get/set
methods for it? Will the member still show up in the PropertyList
returned by Type<C>::getProperties()?


The 
genwrapper<http://www.openscenegraph.com/osgwiki/pmwiki.php/Tasks/GenWrapper>utility
which generate the wrapper create a PublicMemberAccessor
for all public member that it found when it parse the include file.
If you don't have the public member in the Type<C>::getProperties(), this is
a bug in wrapper generation,
and a solution to fix it is add an entry in the
OpenSceneGraph/genwrapper.conf file.


If I well understand, you want an access to the osg::GraphicsContext::Traits
member.
Give a look to OpenSceneGraph/src/osgWrappers/osg/GraphicsContext.cpp, there
are a lots of
PublicMemberAccessor. If some one is missing, this is a problem in the
wrapper generation.

Cheers
David Callu
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to