From Mike Wittman, "These changes add support for reflection of reference and const reference type representations via osgIntrospection::Type. This covers just the static type information; the dynamic behavior via Type::createInstance/Type::InvokeMethod should not be affected."

This commit is contained in:
Robert Osfield
2007-02-12 17:14:46 +00:00
parent 4ed84daf2f
commit a725e0af7d
15 changed files with 970 additions and 887 deletions

View File

@@ -17,6 +17,7 @@
#include <osgIntrospection/Export>
#include <osgIntrospection/Reflection>
#include <osgIntrospection/type_traits>
#include <vector>
#include <memory>
@@ -250,7 +251,7 @@ namespace osgIntrospection
virtual const Type* type() const
{
return &typeof(static_cast<Instance<T> *>(inst_)->_data);
return &typeof(T);
}
virtual bool nullptr() const
@@ -296,13 +297,13 @@ namespace osgIntrospection
virtual const Type* type() const
{
return &typeof(static_cast<Instance<T> *>(inst_)->_data);
return &typeof(T);
}
virtual const Type* ptype() const
{
if (!static_cast<Instance<T> *>(inst_)->_data) return 0;
return &typeof(*static_cast<Instance<T> *>(inst_)->_data);
return &typeof(typename remove_pointer<T>::type);
}
virtual bool nullptr() const