Hi Robert, hi all,
Sorry about being silent those days. I'm currently moving from our first
implementation of metadata to the one on the SVN repository. However, I got
problems like:
public: static char const * const osg::ValueObjectClassNameTrait< xxx
>::s_className" already defined in xxx.obj
I first wanted to split the META_ValueObject into:
#define META_CustomValueObject(TYPE,NAME) \
template<> struct ValueObjectClassNameTrait<TYPE> { static const char*
s_className; }; \
typedef TemplateValueObject<TYPE> NAME;
#define META_ValueObjectImpl(TYPE,NAME) const char*
ValueObjectClassNameTrait<TYPE>::s_className = #NAME;
And add a bunch of META_ValueObjectImpl(...) in a cpp to make sure the symbol
is here only once, but of course the symbol isn't exported.
So I changed my mind and went changing:
template< typename T >
struct ValueObjectClassNameTrait
{
static const char* s_className;
};
to
template< typename T >
struct ValueObjectClassNameTrait
{
static const char* className() { return "TemplateValueObject"; }
};
Here is my code. It seems to be okay.
Cheers,
Sukender
PVLE - Lightweight cross-platform game engine - http://pvle.sourceforge.net/
ValueObject
Description: Binary data
_______________________________________________ osg-submissions mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
