OpenSceneGraph/include/osgIntrospection/ReflectionMacros

1505 lines
199 KiB
Plaintext
Raw Normal View History

2006-07-18 23:21:48 +08:00
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
2005-04-29 18:06:50 +08:00
*
* This library is open source and may be redistributed and/or modified under
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
* (at your option) any later version. The full license is in LICENSE file
* included with this distribution, and on the openscenegraph.org website.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* OpenSceneGraph Public License for more details.
*/
//osgIntrospection - Copyright (C) 2005 Marco Jez
#ifndef OSGINTROSPECTION_REFLECTIONMACROS_
#define OSGINTROSPECTION_REFLECTIONMACROS_
#include <osgIntrospection/Type>
#include <osgIntrospection/Reflector>
#include <osgIntrospection/TypeNameAliasProxy>
#include <osgIntrospection/ConverterProxy>
#include <osgIntrospection/Converter>
#include <osgIntrospection/PublicMemberAccessor>
namespace osgIntrospection
{
/** Compile-time polymorphism detector.
The enumeration constant "value" evaluates
to true only if T is a polymorphic class,
false otherwise. T must be a subclassable
type.
*/
template<typename T>
struct is_polymorphic
{
2005-09-29 21:00:23 +08:00
struct dummy1: T { dummy1(); ~dummy1(); };
struct dummy2: T { dummy2(); virtual ~dummy2(); };
enum { value = sizeof(dummy1) == sizeof(dummy2) };
};
}
// --------------------------------------------------------------------------
// "private" macros, not to be used outside this file
// --------------------------------------------------------------------------
#define COMMA ,
#define OSG_RM_CONCATENATE_MACRO(x, y) x##y
#define OSG_RM_LINEID1(x, y) OSG_RM_CONCATENATE_MACRO(x, y)
#define OSG_RM_LINEID(x) OSG_RM_LINEID1(x, __LINE__)
// --------------------------------------------------------------------------
// TYPE NAME ALIASES
// --------------------------------------------------------------------------
#define TYPE_NAME_ALIAS(t, n) \
namespace { osgIntrospection::TypeNameAliasProxy<t > OSG_RM_LINEID(tnalias) (#n); }
// --------------------------------------------------------------------------
// TYPE CONVERTERS
// --------------------------------------------------------------------------
#define I_Converter(s, d, c) \
namespace { osgIntrospection::ConverterProxy OSG_RM_LINEID(cvt) (s, d, new c); }
#define I_StaticConverter(s, d) \
I_Converter(s, d, osgIntrospection::StaticConverter<s, d>);
#define I_DynamicConverter(s, d) \
I_Converter(s, d, osgIntrospection::DynamicConverter<s, d>);
#define I_ReinterpretConverter(s, d) \
I_Converter(s, d, osgIntrospection::ReinterpretConverter<s, d>);
// --------------------------------------------------------------------------
// ONE-LINE REFLECTORS
// --------------------------------------------------------------------------
#define ABSTRACT_OBJECT_REFLECTOR(t) \
namespace { osgIntrospection::AbstractObjectReflector<t > OSG_RM_LINEID(reflector) (#t); }
#define ATOMIC_VALUE_REFLECTOR(t) \
namespace { osgIntrospection::AtomicValueReflector<t > OSG_RM_LINEID(reflector) (#t); }
#define WATOMIC_VALUE_REFLECTOR(t) \
namespace { osgIntrospection::WAtomicValueReflector<t > OSG_RM_LINEID(reflector) (#t); }
#define STD_PAIR_REFLECTOR(t) \
namespace { osgIntrospection::StdPairReflector<t, t::first_type, t::second_type > OSG_RM_LINEID(reflector) (#t); }
#define STD_PAIR_REFLECTOR_WITH_TYPES(t, pt1, pt2) \
namespace { osgIntrospection::StdPairReflector<t, pt1, pt2 > OSG_RM_LINEID(reflector) (#t); }
#define STD_VECTOR_REFLECTOR(t) \
namespace { osgIntrospection::StdVectorReflector<t, t::value_type> OSG_RM_LINEID(reflector) (#t); }
#define STD_VECTOR_REFLECTOR_WITH_TYPES(t, vt) \
namespace { osgIntrospection::StdVectorReflector<t, vt > OSG_RM_LINEID(reflector) (#t); }
#define STD_LIST_REFLECTOR(t) \
namespace { osgIntrospection::StdListReflector<t, t::value_type> OSG_RM_LINEID(reflector) (#t); }
#define STD_LIST_REFLECTOR_WITH_TYPES(t, vt) \
namespace { osgIntrospection::StdListReflector<t, vt > OSG_RM_LINEID(reflector) (#t); }
#define STD_SET_REFLECTOR(t) \
namespace { osgIntrospection::StdSetReflector<t, t::value_type> OSG_RM_LINEID(reflector) (#t); }
#define STD_SET_REFLECTOR_WITH_TYPES(t, vt) \
namespace { osgIntrospection::StdSetReflector<t, vt > OSG_RM_LINEID(reflector) (#t); }
#define STD_MAP_REFLECTOR(t) \
namespace { osgIntrospection::StdMapReflector<t, t::key_type, t::mapped_type > OSG_RM_LINEID(reflector) (#t); }
#define STD_MAP_REFLECTOR_WITH_TYPES(t, it, vt) \
namespace { osgIntrospection::StdMapReflector<t, it, vt > OSG_RM_LINEID(reflector) (#t); }
// --------------------------------------------------------------------------
// DETAILED REFLECTORS
// --------------------------------------------------------------------------
// this dummy function is used to prevent GCC from
// emitting an "unused variable" warning on reflector
// fields that are automatically created by following
// macros, and possibly left unused by the implementor.
// NOTE: the unnamed namespace declaration is commented
// out because it seems to confuse the MSVC++ compiler.
// Anyway, static should be ok.
//namespace
//{
static inline void sink(const osgIntrospection::CustomAttributeProvider *)
{
}
//}
#define BEGIN_ENUM_REFLECTOR(c) \
namespace { \
struct OSG_RM_LINEID(reflector): osgIntrospection::EnumReflector<c > { OSG_RM_LINEID(reflector)(): inherited(#c) { osgIntrospection::ParameterInfoList params; osgIntrospection::CustomAttributeProvider *cap = getType(); sink(cap);
#define BEGIN_VALUE_REFLECTOR(c) \
namespace { \
struct OSG_RM_LINEID(reflector): osgIntrospection::ValueReflector<c > { OSG_RM_LINEID(reflector)(): inherited(#c) { osgIntrospection::ParameterInfoList params; osgIntrospection::CustomAttributeProvider *cap = getType(); sink(cap);
#define BEGIN_OBJECT_REFLECTOR(c) \
namespace { \
struct OSG_RM_LINEID(reflector): osgIntrospection::ObjectReflector<c > { OSG_RM_LINEID(reflector)(): inherited(#c) { osgIntrospection::ParameterInfoList params; osgIntrospection::CustomAttributeProvider *cap = getType(); sink(cap);
#define BEGIN_ABSTRACT_OBJECT_REFLECTOR(c) \
namespace { \
struct OSG_RM_LINEID(reflector): osgIntrospection::AbstractObjectReflector<c > { OSG_RM_LINEID(reflector)(): inherited(#c) { osgIntrospection::ParameterInfoList params; osgIntrospection::CustomAttributeProvider *cap = getType(); sink(cap);
#define END_REFLECTOR \
2005-03-14 17:28:31 +08:00
} } OSG_RM_LINEID(reflector_instance); }
// --------------------------------------------------------------------------
// BASIC CONFIGURATION
// --------------------------------------------------------------------------
#define I_Attribute(c) cap->addAttribute(new c);
#define I_ReaderWriter(x) setReaderWriter(new x);
#define I_Comparator(x) setComparator(new x);
template<typename x, typename reflected_type, bool polymorphic>
struct BaseTypeConverters
{
BaseTypeConverters()
{
const osgIntrospection::Type& st = typeof(reflected_type*); \
const osgIntrospection::Type& cst = typeof(const reflected_type*); \
const osgIntrospection::Type& dt = typeof(x*); \
const osgIntrospection::Type& cdt = typeof(const x*); \
osgIntrospection::ConverterProxy cp1(st, dt, new osgIntrospection::StaticConverter<reflected_type* , x*>); \
osgIntrospection::ConverterProxy cp2(cst, cdt, new osgIntrospection::StaticConverter<const reflected_type* , const x*>); \
osgIntrospection::ConverterProxy cp1c(st, cdt, new osgIntrospection::StaticConverter<reflected_type* , const x*>); \
}
};
template<typename x, typename reflected_type>
struct BaseTypeConverters<x, reflected_type, true>
{
BaseTypeConverters()
{
const osgIntrospection::Type& st = typeof(reflected_type*); \
const osgIntrospection::Type& cst = typeof(const reflected_type*); \
const osgIntrospection::Type& dt = typeof(x*); \
const osgIntrospection::Type& cdt = typeof(const x*); \
osgIntrospection::ConverterProxy cp1(st, dt, new osgIntrospection::StaticConverter<reflected_type* , x*>); \
osgIntrospection::ConverterProxy cp2(cst, cdt, new osgIntrospection::StaticConverter<const reflected_type* , const x*>); \
osgIntrospection::ConverterProxy cp1c(st, cdt, new osgIntrospection::StaticConverter<reflected_type* , const x*>); \
osgIntrospection::ConverterProxy cp3(dt, st, new osgIntrospection::DynamicConverter<x*, reflected_type* >); \
osgIntrospection::ConverterProxy cp4(cdt, cst, new osgIntrospection::DynamicConverter<const x*, const reflected_type* >); \
osgIntrospection::ConverterProxy cp3c(dt, cst, new osgIntrospection::DynamicConverter<x*, const reflected_type* >); \
}
};
#define I_BaseType(x) \
{ \
addBaseType(typeof(x )); \
BaseTypeConverters<x, reflected_type, osgIntrospection::is_polymorphic<x >::value> btc; \
}
#define I_VirtualBaseType(x) \
{ \
addBaseType(typeof(x )); \
BaseTypeConverters<x, reflected_type, false> btc; \
}
#define I_EnumLabel(x) addEnumLabel(x, #x, true);
// --------------------------------------------------------------------------
// PUBLIC MEMBER PROPERTIES
// --------------------------------------------------------------------------
#define I_PublicMemberProperty(t, n) \
cap=addProperty(new osgIntrospection::PropertyInfo(osgIntrospection::Reflection::getType(extended_typeid<reflected_type>()), osgIntrospection::Reflection::getType(extended_typeid<t>()), #n, 0, 0)); \
cap->addAttribute(new osgIntrospection::CustomPropertyGetAttribute(new osgIntrospection::PublicMemberAccessor< reflected_type, t >(&reflected_type::n))); \
cap->addAttribute(new osgIntrospection::CustomPropertySetAttribute(new osgIntrospection::PublicMemberAccessor< reflected_type, t >(&reflected_type::n)));
// --------------------------------------------------------------------------
From David Callu: " the main problem is the wrapper generation: The PropertyInfo class use MethodInfo class to access to the value. When the property are define with the I_Property* macro, the MethodInfo use by the property to have access to the value are instancied in the I_Property* macro, but there are already instantied by the I_Method* macro before secondary problem: - the function used by the property could no be customized in the genwrapper.conf file - an array property can't insert a value - the std::map reflector (and indexedProperty in general) haven't remove method - about the help in wrapper ... why not ... solution : To use the function define by the I_Method, I add a MethodInfo variable in the I_Method0 macro old macro : #define I_Method0(ret, fn) (\ params.clear(),\ addMethod(new osgIntrospection::TypedMethodIn fo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params))) new macro : #define I_Method0(ret, fn, signature, briefHelp, detailedHelp) \ params.clear(); \ osgIntrospection::MethodInfo* signature = addMethod(new osgIntrospection::TypedMethodInfo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature) the osgIntrospection::MethodInfo* signature is used by the I_Property macro to define the MethodInfo that it use so for I_Property macro : old macro : #define I_PropertyWithReturnType(t, n, r) \ cap=addProperty(new osgIntrospection::PropertyInfo(osgIntrospection::Reflection::getType(typeid(reflected_type)), osgIntrospection::Reflection::getType(typeid(t)), #n, \ I_Method0(t, get##n), \ I_Method1(r, set##n, IN, t, value))) new macro: #define I_SimpleProperty(t, n, get, set) \ get, \ set)) The genwrapper has been modified in this way. The method signature is define by the prototype of the method For example, the "const char* libraryName();" have "__C5_char_P1__libraryName" for signature solution for secondary problem: The genwrapper accept new tokens in the configuration to custumize the property. The new PropertyInserter and the CustomPropertyInsertAttribute class has been defined The PropertyRemover has been added to the StdMapReflector The _briefHelp and _detailedHelp variable has been added in PropertyInfo, MethodInfo and ContructorInfo class modification: I have modify the genwrapper files Configuration.cpp Configuration.h add some tokens to custumize the property Doxyfile.template add the comment in the output xml genwrapper.conf customize some property in osg::Geometry RegistryBuilder.h RegistryBuilder.cpp add the process_help function (to extract help from xml) TypeRegister.cpp TypeRegister.h optimize the property detection TypeDesc.h TypeDesc.cpp modify FunctionDesc and PropertyDesc WrapperGenerator.h WrapperGenerator.cpp modify the output I also modify the fallowing osgIntrospection files: include/osgIntrospection/Attributes add the PropertyInserter and the CustomPropertyInsertAttribute class include/osgIntrospection/ConstructorInfo add the _briefHelp and _detailedHelp variable in the ConstructorInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/MethodInfo add the _briefHelp and _detailedHelp variable in the MethodInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/PropertyInfo add the _briefHelp and _detailedHelp variable in the PropertyInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/ReflectionMacro remove unused I_Property* macro modify all I_Method macro to accept the help string modify all I_Method macro to define a MethodInfo signature include/osgIntrospection/Reflector add the PropertyInserter in StdVectorReflector and StdListReflector add the PropertyRemover in the StdMapReflector include/osgIntrospection/StaticMethodInfo modify all StaticMethodInfo* to accept the help in parameter include/osgIntrospection/TypedMethodInfo modify all TypedMethodInfo* to accept the help in parameter include/osgIntrospection/TypedConstructorInfo modify all TypedConstructorInfo* to accept the help in parameter include/osgIntrospection/Type add the _briefHelp and _detailedHelp variable in the Type class "
2006-10-17 23:17:06 +08:00
// PROPERTIES
// --------------------------------------------------------------------------
From David Callu: " the main problem is the wrapper generation: The PropertyInfo class use MethodInfo class to access to the value. When the property are define with the I_Property* macro, the MethodInfo use by the property to have access to the value are instancied in the I_Property* macro, but there are already instantied by the I_Method* macro before secondary problem: - the function used by the property could no be customized in the genwrapper.conf file - an array property can't insert a value - the std::map reflector (and indexedProperty in general) haven't remove method - about the help in wrapper ... why not ... solution : To use the function define by the I_Method, I add a MethodInfo variable in the I_Method0 macro old macro : #define I_Method0(ret, fn) (\ params.clear(),\ addMethod(new osgIntrospection::TypedMethodIn fo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params))) new macro : #define I_Method0(ret, fn, signature, briefHelp, detailedHelp) \ params.clear(); \ osgIntrospection::MethodInfo* signature = addMethod(new osgIntrospection::TypedMethodInfo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature) the osgIntrospection::MethodInfo* signature is used by the I_Property macro to define the MethodInfo that it use so for I_Property macro : old macro : #define I_PropertyWithReturnType(t, n, r) \ cap=addProperty(new osgIntrospection::PropertyInfo(osgIntrospection::Reflection::getType(typeid(reflected_type)), osgIntrospection::Reflection::getType(typeid(t)), #n, \ I_Method0(t, get##n), \ I_Method1(r, set##n, IN, t, value))) new macro: #define I_SimpleProperty(t, n, get, set) \ get, \ set)) The genwrapper has been modified in this way. The method signature is define by the prototype of the method For example, the "const char* libraryName();" have "__C5_char_P1__libraryName" for signature solution for secondary problem: The genwrapper accept new tokens in the configuration to custumize the property. The new PropertyInserter and the CustomPropertyInsertAttribute class has been defined The PropertyRemover has been added to the StdMapReflector The _briefHelp and _detailedHelp variable has been added in PropertyInfo, MethodInfo and ContructorInfo class modification: I have modify the genwrapper files Configuration.cpp Configuration.h add some tokens to custumize the property Doxyfile.template add the comment in the output xml genwrapper.conf customize some property in osg::Geometry RegistryBuilder.h RegistryBuilder.cpp add the process_help function (to extract help from xml) TypeRegister.cpp TypeRegister.h optimize the property detection TypeDesc.h TypeDesc.cpp modify FunctionDesc and PropertyDesc WrapperGenerator.h WrapperGenerator.cpp modify the output I also modify the fallowing osgIntrospection files: include/osgIntrospection/Attributes add the PropertyInserter and the CustomPropertyInsertAttribute class include/osgIntrospection/ConstructorInfo add the _briefHelp and _detailedHelp variable in the ConstructorInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/MethodInfo add the _briefHelp and _detailedHelp variable in the MethodInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/PropertyInfo add the _briefHelp and _detailedHelp variable in the PropertyInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/ReflectionMacro remove unused I_Property* macro modify all I_Method macro to accept the help string modify all I_Method macro to define a MethodInfo signature include/osgIntrospection/Reflector add the PropertyInserter in StdVectorReflector and StdListReflector add the PropertyRemover in the StdMapReflector include/osgIntrospection/StaticMethodInfo modify all StaticMethodInfo* to accept the help in parameter include/osgIntrospection/TypedMethodInfo modify all TypedMethodInfo* to accept the help in parameter include/osgIntrospection/TypedConstructorInfo modify all TypedConstructorInfo* to accept the help in parameter include/osgIntrospection/Type add the _briefHelp and _detailedHelp variable in the Type class "
2006-10-17 23:17:06 +08:00
#define I_SimpleProperty(t, n, get, set) \
cap=addProperty(new osgIntrospection::PropertyInfo(osgIntrospection::Reflection::getType(extended_typeid<reflected_type>()), osgIntrospection::Reflection::getType(extended_typeid<t>()), #n, \
From David Callu: " the main problem is the wrapper generation: The PropertyInfo class use MethodInfo class to access to the value. When the property are define with the I_Property* macro, the MethodInfo use by the property to have access to the value are instancied in the I_Property* macro, but there are already instantied by the I_Method* macro before secondary problem: - the function used by the property could no be customized in the genwrapper.conf file - an array property can't insert a value - the std::map reflector (and indexedProperty in general) haven't remove method - about the help in wrapper ... why not ... solution : To use the function define by the I_Method, I add a MethodInfo variable in the I_Method0 macro old macro : #define I_Method0(ret, fn) (\ params.clear(),\ addMethod(new osgIntrospection::TypedMethodIn fo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params))) new macro : #define I_Method0(ret, fn, signature, briefHelp, detailedHelp) \ params.clear(); \ osgIntrospection::MethodInfo* signature = addMethod(new osgIntrospection::TypedMethodInfo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature) the osgIntrospection::MethodInfo* signature is used by the I_Property macro to define the MethodInfo that it use so for I_Property macro : old macro : #define I_PropertyWithReturnType(t, n, r) \ cap=addProperty(new osgIntrospection::PropertyInfo(osgIntrospection::Reflection::getType(typeid(reflected_type)), osgIntrospection::Reflection::getType(typeid(t)), #n, \ I_Method0(t, get##n), \ I_Method1(r, set##n, IN, t, value))) new macro: #define I_SimpleProperty(t, n, get, set) \ get, \ set)) The genwrapper has been modified in this way. The method signature is define by the prototype of the method For example, the "const char* libraryName();" have "__C5_char_P1__libraryName" for signature solution for secondary problem: The genwrapper accept new tokens in the configuration to custumize the property. The new PropertyInserter and the CustomPropertyInsertAttribute class has been defined The PropertyRemover has been added to the StdMapReflector The _briefHelp and _detailedHelp variable has been added in PropertyInfo, MethodInfo and ContructorInfo class modification: I have modify the genwrapper files Configuration.cpp Configuration.h add some tokens to custumize the property Doxyfile.template add the comment in the output xml genwrapper.conf customize some property in osg::Geometry RegistryBuilder.h RegistryBuilder.cpp add the process_help function (to extract help from xml) TypeRegister.cpp TypeRegister.h optimize the property detection TypeDesc.h TypeDesc.cpp modify FunctionDesc and PropertyDesc WrapperGenerator.h WrapperGenerator.cpp modify the output I also modify the fallowing osgIntrospection files: include/osgIntrospection/Attributes add the PropertyInserter and the CustomPropertyInsertAttribute class include/osgIntrospection/ConstructorInfo add the _briefHelp and _detailedHelp variable in the ConstructorInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/MethodInfo add the _briefHelp and _detailedHelp variable in the MethodInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/PropertyInfo add the _briefHelp and _detailedHelp variable in the PropertyInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/ReflectionMacro remove unused I_Property* macro modify all I_Method macro to accept the help string modify all I_Method macro to define a MethodInfo signature include/osgIntrospection/Reflector add the PropertyInserter in StdVectorReflector and StdListReflector add the PropertyRemover in the StdMapReflector include/osgIntrospection/StaticMethodInfo modify all StaticMethodInfo* to accept the help in parameter include/osgIntrospection/TypedMethodInfo modify all TypedMethodInfo* to accept the help in parameter include/osgIntrospection/TypedConstructorInfo modify all TypedConstructorInfo* to accept the help in parameter include/osgIntrospection/Type add the _briefHelp and _detailedHelp variable in the Type class "
2006-10-17 23:17:06 +08:00
get, \
set))
From David Callu: " the main problem is the wrapper generation: The PropertyInfo class use MethodInfo class to access to the value. When the property are define with the I_Property* macro, the MethodInfo use by the property to have access to the value are instancied in the I_Property* macro, but there are already instantied by the I_Method* macro before secondary problem: - the function used by the property could no be customized in the genwrapper.conf file - an array property can't insert a value - the std::map reflector (and indexedProperty in general) haven't remove method - about the help in wrapper ... why not ... solution : To use the function define by the I_Method, I add a MethodInfo variable in the I_Method0 macro old macro : #define I_Method0(ret, fn) (\ params.clear(),\ addMethod(new osgIntrospection::TypedMethodIn fo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params))) new macro : #define I_Method0(ret, fn, signature, briefHelp, detailedHelp) \ params.clear(); \ osgIntrospection::MethodInfo* signature = addMethod(new osgIntrospection::TypedMethodInfo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature) the osgIntrospection::MethodInfo* signature is used by the I_Property macro to define the MethodInfo that it use so for I_Property macro : old macro : #define I_PropertyWithReturnType(t, n, r) \ cap=addProperty(new osgIntrospection::PropertyInfo(osgIntrospection::Reflection::getType(typeid(reflected_type)), osgIntrospection::Reflection::getType(typeid(t)), #n, \ I_Method0(t, get##n), \ I_Method1(r, set##n, IN, t, value))) new macro: #define I_SimpleProperty(t, n, get, set) \ get, \ set)) The genwrapper has been modified in this way. The method signature is define by the prototype of the method For example, the "const char* libraryName();" have "__C5_char_P1__libraryName" for signature solution for secondary problem: The genwrapper accept new tokens in the configuration to custumize the property. The new PropertyInserter and the CustomPropertyInsertAttribute class has been defined The PropertyRemover has been added to the StdMapReflector The _briefHelp and _detailedHelp variable has been added in PropertyInfo, MethodInfo and ContructorInfo class modification: I have modify the genwrapper files Configuration.cpp Configuration.h add some tokens to custumize the property Doxyfile.template add the comment in the output xml genwrapper.conf customize some property in osg::Geometry RegistryBuilder.h RegistryBuilder.cpp add the process_help function (to extract help from xml) TypeRegister.cpp TypeRegister.h optimize the property detection TypeDesc.h TypeDesc.cpp modify FunctionDesc and PropertyDesc WrapperGenerator.h WrapperGenerator.cpp modify the output I also modify the fallowing osgIntrospection files: include/osgIntrospection/Attributes add the PropertyInserter and the CustomPropertyInsertAttribute class include/osgIntrospection/ConstructorInfo add the _briefHelp and _detailedHelp variable in the ConstructorInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/MethodInfo add the _briefHelp and _detailedHelp variable in the MethodInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/PropertyInfo add the _briefHelp and _detailedHelp variable in the PropertyInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/ReflectionMacro remove unused I_Property* macro modify all I_Method macro to accept the help string modify all I_Method macro to define a MethodInfo signature include/osgIntrospection/Reflector add the PropertyInserter in StdVectorReflector and StdListReflector add the PropertyRemover in the StdMapReflector include/osgIntrospection/StaticMethodInfo modify all StaticMethodInfo* to accept the help in parameter include/osgIntrospection/TypedMethodInfo modify all TypedMethodInfo* to accept the help in parameter include/osgIntrospection/TypedConstructorInfo modify all TypedConstructorInfo* to accept the help in parameter include/osgIntrospection/Type add the _briefHelp and _detailedHelp variable in the Type class "
2006-10-17 23:17:06 +08:00
#define I_ArrayProperty(t, n, get, set, count, add, insert, remove) \
cap=addProperty(new osgIntrospection::PropertyInfo(osgIntrospection::Reflection::getType(extended_typeid<reflected_type>()), osgIntrospection::Reflection::getType(extended_typeid<t>()), #n, \
From David Callu: " the main problem is the wrapper generation: The PropertyInfo class use MethodInfo class to access to the value. When the property are define with the I_Property* macro, the MethodInfo use by the property to have access to the value are instancied in the I_Property* macro, but there are already instantied by the I_Method* macro before secondary problem: - the function used by the property could no be customized in the genwrapper.conf file - an array property can't insert a value - the std::map reflector (and indexedProperty in general) haven't remove method - about the help in wrapper ... why not ... solution : To use the function define by the I_Method, I add a MethodInfo variable in the I_Method0 macro old macro : #define I_Method0(ret, fn) (\ params.clear(),\ addMethod(new osgIntrospection::TypedMethodIn fo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params))) new macro : #define I_Method0(ret, fn, signature, briefHelp, detailedHelp) \ params.clear(); \ osgIntrospection::MethodInfo* signature = addMethod(new osgIntrospection::TypedMethodInfo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature) the osgIntrospection::MethodInfo* signature is used by the I_Property macro to define the MethodInfo that it use so for I_Property macro : old macro : #define I_PropertyWithReturnType(t, n, r) \ cap=addProperty(new osgIntrospection::PropertyInfo(osgIntrospection::Reflection::getType(typeid(reflected_type)), osgIntrospection::Reflection::getType(typeid(t)), #n, \ I_Method0(t, get##n), \ I_Method1(r, set##n, IN, t, value))) new macro: #define I_SimpleProperty(t, n, get, set) \ get, \ set)) The genwrapper has been modified in this way. The method signature is define by the prototype of the method For example, the "const char* libraryName();" have "__C5_char_P1__libraryName" for signature solution for secondary problem: The genwrapper accept new tokens in the configuration to custumize the property. The new PropertyInserter and the CustomPropertyInsertAttribute class has been defined The PropertyRemover has been added to the StdMapReflector The _briefHelp and _detailedHelp variable has been added in PropertyInfo, MethodInfo and ContructorInfo class modification: I have modify the genwrapper files Configuration.cpp Configuration.h add some tokens to custumize the property Doxyfile.template add the comment in the output xml genwrapper.conf customize some property in osg::Geometry RegistryBuilder.h RegistryBuilder.cpp add the process_help function (to extract help from xml) TypeRegister.cpp TypeRegister.h optimize the property detection TypeDesc.h TypeDesc.cpp modify FunctionDesc and PropertyDesc WrapperGenerator.h WrapperGenerator.cpp modify the output I also modify the fallowing osgIntrospection files: include/osgIntrospection/Attributes add the PropertyInserter and the CustomPropertyInsertAttribute class include/osgIntrospection/ConstructorInfo add the _briefHelp and _detailedHelp variable in the ConstructorInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/MethodInfo add the _briefHelp and _detailedHelp variable in the MethodInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/PropertyInfo add the _briefHelp and _detailedHelp variable in the PropertyInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/ReflectionMacro remove unused I_Property* macro modify all I_Method macro to accept the help string modify all I_Method macro to define a MethodInfo signature include/osgIntrospection/Reflector add the PropertyInserter in StdVectorReflector and StdListReflector add the PropertyRemover in the StdMapReflector include/osgIntrospection/StaticMethodInfo modify all StaticMethodInfo* to accept the help in parameter include/osgIntrospection/TypedMethodInfo modify all TypedMethodInfo* to accept the help in parameter include/osgIntrospection/TypedConstructorInfo modify all TypedConstructorInfo* to accept the help in parameter include/osgIntrospection/Type add the _briefHelp and _detailedHelp variable in the Type class "
2006-10-17 23:17:06 +08:00
get, \
set, \
count, \
add, \
insert, \
remove))
#define I_IndexedProperty(t, n, get, set, remove) \
cap=addProperty(new osgIntrospection::PropertyInfo(osgIntrospection::Reflection::getType(extended_typeid<reflected_type>()), osgIntrospection::Reflection::getType(extended_typeid<t>()), #n, \
From David Callu: " the main problem is the wrapper generation: The PropertyInfo class use MethodInfo class to access to the value. When the property are define with the I_Property* macro, the MethodInfo use by the property to have access to the value are instancied in the I_Property* macro, but there are already instantied by the I_Method* macro before secondary problem: - the function used by the property could no be customized in the genwrapper.conf file - an array property can't insert a value - the std::map reflector (and indexedProperty in general) haven't remove method - about the help in wrapper ... why not ... solution : To use the function define by the I_Method, I add a MethodInfo variable in the I_Method0 macro old macro : #define I_Method0(ret, fn) (\ params.clear(),\ addMethod(new osgIntrospection::TypedMethodIn fo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params))) new macro : #define I_Method0(ret, fn, signature, briefHelp, detailedHelp) \ params.clear(); \ osgIntrospection::MethodInfo* signature = addMethod(new osgIntrospection::TypedMethodInfo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature) the osgIntrospection::MethodInfo* signature is used by the I_Property macro to define the MethodInfo that it use so for I_Property macro : old macro : #define I_PropertyWithReturnType(t, n, r) \ cap=addProperty(new osgIntrospection::PropertyInfo(osgIntrospection::Reflection::getType(typeid(reflected_type)), osgIntrospection::Reflection::getType(typeid(t)), #n, \ I_Method0(t, get##n), \ I_Method1(r, set##n, IN, t, value))) new macro: #define I_SimpleProperty(t, n, get, set) \ get, \ set)) The genwrapper has been modified in this way. The method signature is define by the prototype of the method For example, the "const char* libraryName();" have "__C5_char_P1__libraryName" for signature solution for secondary problem: The genwrapper accept new tokens in the configuration to custumize the property. The new PropertyInserter and the CustomPropertyInsertAttribute class has been defined The PropertyRemover has been added to the StdMapReflector The _briefHelp and _detailedHelp variable has been added in PropertyInfo, MethodInfo and ContructorInfo class modification: I have modify the genwrapper files Configuration.cpp Configuration.h add some tokens to custumize the property Doxyfile.template add the comment in the output xml genwrapper.conf customize some property in osg::Geometry RegistryBuilder.h RegistryBuilder.cpp add the process_help function (to extract help from xml) TypeRegister.cpp TypeRegister.h optimize the property detection TypeDesc.h TypeDesc.cpp modify FunctionDesc and PropertyDesc WrapperGenerator.h WrapperGenerator.cpp modify the output I also modify the fallowing osgIntrospection files: include/osgIntrospection/Attributes add the PropertyInserter and the CustomPropertyInsertAttribute class include/osgIntrospection/ConstructorInfo add the _briefHelp and _detailedHelp variable in the ConstructorInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/MethodInfo add the _briefHelp and _detailedHelp variable in the MethodInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/PropertyInfo add the _briefHelp and _detailedHelp variable in the PropertyInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/ReflectionMacro remove unused I_Property* macro modify all I_Method macro to accept the help string modify all I_Method macro to define a MethodInfo signature include/osgIntrospection/Reflector add the PropertyInserter in StdVectorReflector and StdListReflector add the PropertyRemover in the StdMapReflector include/osgIntrospection/StaticMethodInfo modify all StaticMethodInfo* to accept the help in parameter include/osgIntrospection/TypedMethodInfo modify all TypedMethodInfo* to accept the help in parameter include/osgIntrospection/TypedConstructorInfo modify all TypedConstructorInfo* to accept the help in parameter include/osgIntrospection/Type add the _briefHelp and _detailedHelp variable in the Type class "
2006-10-17 23:17:06 +08:00
get, \
set, \
remove))
// --------------------------------------------------------------------------
// CONSTRUCTORS
// --------------------------------------------------------------------------
#define I_Constructor I_Constructor0
#define I_ConstructorWithDefaults I_ConstructorWithDefaults0
From David Callu: " the main problem is the wrapper generation: The PropertyInfo class use MethodInfo class to access to the value. When the property are define with the I_Property* macro, the MethodInfo use by the property to have access to the value are instancied in the I_Property* macro, but there are already instantied by the I_Method* macro before secondary problem: - the function used by the property could no be customized in the genwrapper.conf file - an array property can't insert a value - the std::map reflector (and indexedProperty in general) haven't remove method - about the help in wrapper ... why not ... solution : To use the function define by the I_Method, I add a MethodInfo variable in the I_Method0 macro old macro : #define I_Method0(ret, fn) (\ params.clear(),\ addMethod(new osgIntrospection::TypedMethodIn fo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params))) new macro : #define I_Method0(ret, fn, signature, briefHelp, detailedHelp) \ params.clear(); \ osgIntrospection::MethodInfo* signature = addMethod(new osgIntrospection::TypedMethodInfo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature) the osgIntrospection::MethodInfo* signature is used by the I_Property macro to define the MethodInfo that it use so for I_Property macro : old macro : #define I_PropertyWithReturnType(t, n, r) \ cap=addProperty(new osgIntrospection::PropertyInfo(osgIntrospection::Reflection::getType(typeid(reflected_type)), osgIntrospection::Reflection::getType(typeid(t)), #n, \ I_Method0(t, get##n), \ I_Method1(r, set##n, IN, t, value))) new macro: #define I_SimpleProperty(t, n, get, set) \ get, \ set)) The genwrapper has been modified in this way. The method signature is define by the prototype of the method For example, the "const char* libraryName();" have "__C5_char_P1__libraryName" for signature solution for secondary problem: The genwrapper accept new tokens in the configuration to custumize the property. The new PropertyInserter and the CustomPropertyInsertAttribute class has been defined The PropertyRemover has been added to the StdMapReflector The _briefHelp and _detailedHelp variable has been added in PropertyInfo, MethodInfo and ContructorInfo class modification: I have modify the genwrapper files Configuration.cpp Configuration.h add some tokens to custumize the property Doxyfile.template add the comment in the output xml genwrapper.conf customize some property in osg::Geometry RegistryBuilder.h RegistryBuilder.cpp add the process_help function (to extract help from xml) TypeRegister.cpp TypeRegister.h optimize the property detection TypeDesc.h TypeDesc.cpp modify FunctionDesc and PropertyDesc WrapperGenerator.h WrapperGenerator.cpp modify the output I also modify the fallowing osgIntrospection files: include/osgIntrospection/Attributes add the PropertyInserter and the CustomPropertyInsertAttribute class include/osgIntrospection/ConstructorInfo add the _briefHelp and _detailedHelp variable in the ConstructorInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/MethodInfo add the _briefHelp and _detailedHelp variable in the MethodInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/PropertyInfo add the _briefHelp and _detailedHelp variable in the PropertyInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/ReflectionMacro remove unused I_Property* macro modify all I_Method macro to accept the help string modify all I_Method macro to define a MethodInfo signature include/osgIntrospection/Reflector add the PropertyInserter in StdVectorReflector and StdListReflector add the PropertyRemover in the StdMapReflector include/osgIntrospection/StaticMethodInfo modify all StaticMethodInfo* to accept the help in parameter include/osgIntrospection/TypedMethodInfo modify all TypedMethodInfo* to accept the help in parameter include/osgIntrospection/TypedConstructorInfo modify all TypedConstructorInfo* to accept the help in parameter include/osgIntrospection/Type add the _briefHelp and _detailedHelp variable in the Type class "
2006-10-17 23:17:06 +08:00
#define D_ConstructorInfoType osgIntrospection::ConstructorInfo*
#define D_ConstructorInfoType osgIntrospection::ConstructorInfo*
#define I_Constructor0(signature, briefHelp, detailedHelp) \
params.clear(); \
D_ConstructorInfoType signature = addConstructor(new osgIntrospection::TypedConstructorInfo0<reflected_type, instance_creator_type>(params, briefHelp, detailedHelp)); sink(signature)
#define I_Constructor1(A0, P0, N0, signature, briefHelp, detailedHelp) \
params.clear(); \
params.push_back(new osgIntrospection::ParameterInfo(#N0, osgIntrospection::Reflection::getType(extended_typeid<P0>()), osgIntrospection::ParameterInfo::A0)); \
From David Callu: " the main problem is the wrapper generation: The PropertyInfo class use MethodInfo class to access to the value. When the property are define with the I_Property* macro, the MethodInfo use by the property to have access to the value are instancied in the I_Property* macro, but there are already instantied by the I_Method* macro before secondary problem: - the function used by the property could no be customized in the genwrapper.conf file - an array property can't insert a value - the std::map reflector (and indexedProperty in general) haven't remove method - about the help in wrapper ... why not ... solution : To use the function define by the I_Method, I add a MethodInfo variable in the I_Method0 macro old macro : #define I_Method0(ret, fn) (\ params.clear(),\ addMethod(new osgIntrospection::TypedMethodIn fo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params))) new macro : #define I_Method0(ret, fn, signature, briefHelp, detailedHelp) \ params.clear(); \ osgIntrospection::MethodInfo* signature = addMethod(new osgIntrospection::TypedMethodInfo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature) the osgIntrospection::MethodInfo* signature is used by the I_Property macro to define the MethodInfo that it use so for I_Property macro : old macro : #define I_PropertyWithReturnType(t, n, r) \ cap=addProperty(new osgIntrospection::PropertyInfo(osgIntrospection::Reflection::getType(typeid(reflected_type)), osgIntrospection::Reflection::getType(typeid(t)), #n, \ I_Method0(t, get##n), \ I_Method1(r, set##n, IN, t, value))) new macro: #define I_SimpleProperty(t, n, get, set) \ get, \ set)) The genwrapper has been modified in this way. The method signature is define by the prototype of the method For example, the "const char* libraryName();" have "__C5_char_P1__libraryName" for signature solution for secondary problem: The genwrapper accept new tokens in the configuration to custumize the property. The new PropertyInserter and the CustomPropertyInsertAttribute class has been defined The PropertyRemover has been added to the StdMapReflector The _briefHelp and _detailedHelp variable has been added in PropertyInfo, MethodInfo and ContructorInfo class modification: I have modify the genwrapper files Configuration.cpp Configuration.h add some tokens to custumize the property Doxyfile.template add the comment in the output xml genwrapper.conf customize some property in osg::Geometry RegistryBuilder.h RegistryBuilder.cpp add the process_help function (to extract help from xml) TypeRegister.cpp TypeRegister.h optimize the property detection TypeDesc.h TypeDesc.cpp modify FunctionDesc and PropertyDesc WrapperGenerator.h WrapperGenerator.cpp modify the output I also modify the fallowing osgIntrospection files: include/osgIntrospection/Attributes add the PropertyInserter and the CustomPropertyInsertAttribute class include/osgIntrospection/ConstructorInfo add the _briefHelp and _detailedHelp variable in the ConstructorInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/MethodInfo add the _briefHelp and _detailedHelp variable in the MethodInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/PropertyInfo add the _briefHelp and _detailedHelp variable in the PropertyInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/ReflectionMacro remove unused I_Property* macro modify all I_Method macro to accept the help string modify all I_Method macro to define a MethodInfo signature include/osgIntrospection/Reflector add the PropertyInserter in StdVectorReflector and StdListReflector add the PropertyRemover in the StdMapReflector include/osgIntrospection/StaticMethodInfo modify all StaticMethodInfo* to accept the help in parameter include/osgIntrospection/TypedMethodInfo modify all TypedMethodInfo* to accept the help in parameter include/osgIntrospection/TypedConstructorInfo modify all TypedConstructorInfo* to accept the help in parameter include/osgIntrospection/Type add the _briefHelp and _detailedHelp variable in the Type class "
2006-10-17 23:17:06 +08:00
D_ConstructorInfoType signature = addConstructor(new osgIntrospection::TypedConstructorInfo1<reflected_type, instance_creator_type, P0>(params, briefHelp, detailedHelp)); sink(signature)
#define I_Constructor2(A0, P0, N0, A1, P1, N1, signature, briefHelp, detailedHelp) \
params.clear(); \
params.push_back(new osgIntrospection::ParameterInfo(#N0, osgIntrospection::Reflection::getType(extended_typeid<P0>()), osgIntrospection::ParameterInfo::A0)); \
params.push_back(new osgIntrospection::ParameterInfo(#N1, osgIntrospection::Reflection::getType(extended_typeid<P1>()), osgIntrospection::ParameterInfo::A1)); \
From David Callu: " the main problem is the wrapper generation: The PropertyInfo class use MethodInfo class to access to the value. When the property are define with the I_Property* macro, the MethodInfo use by the property to have access to the value are instancied in the I_Property* macro, but there are already instantied by the I_Method* macro before secondary problem: - the function used by the property could no be customized in the genwrapper.conf file - an array property can't insert a value - the std::map reflector (and indexedProperty in general) haven't remove method - about the help in wrapper ... why not ... solution : To use the function define by the I_Method, I add a MethodInfo variable in the I_Method0 macro old macro : #define I_Method0(ret, fn) (\ params.clear(),\ addMethod(new osgIntrospection::TypedMethodIn fo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params))) new macro : #define I_Method0(ret, fn, signature, briefHelp, detailedHelp) \ params.clear(); \ osgIntrospection::MethodInfo* signature = addMethod(new osgIntrospection::TypedMethodInfo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature) the osgIntrospection::MethodInfo* signature is used by the I_Property macro to define the MethodInfo that it use so for I_Property macro : old macro : #define I_PropertyWithReturnType(t, n, r) \ cap=addProperty(new osgIntrospection::PropertyInfo(osgIntrospection::Reflection::getType(typeid(reflected_type)), osgIntrospection::Reflection::getType(typeid(t)), #n, \ I_Method0(t, get##n), \ I_Method1(r, set##n, IN, t, value))) new macro: #define I_SimpleProperty(t, n, get, set) \ get, \ set)) The genwrapper has been modified in this way. The method signature is define by the prototype of the method For example, the "const char* libraryName();" have "__C5_char_P1__libraryName" for signature solution for secondary problem: The genwrapper accept new tokens in the configuration to custumize the property. The new PropertyInserter and the CustomPropertyInsertAttribute class has been defined The PropertyRemover has been added to the StdMapReflector The _briefHelp and _detailedHelp variable has been added in PropertyInfo, MethodInfo and ContructorInfo class modification: I have modify the genwrapper files Configuration.cpp Configuration.h add some tokens to custumize the property Doxyfile.template add the comment in the output xml genwrapper.conf customize some property in osg::Geometry RegistryBuilder.h RegistryBuilder.cpp add the process_help function (to extract help from xml) TypeRegister.cpp TypeRegister.h optimize the property detection TypeDesc.h TypeDesc.cpp modify FunctionDesc and PropertyDesc WrapperGenerator.h WrapperGenerator.cpp modify the output I also modify the fallowing osgIntrospection files: include/osgIntrospection/Attributes add the PropertyInserter and the CustomPropertyInsertAttribute class include/osgIntrospection/ConstructorInfo add the _briefHelp and _detailedHelp variable in the ConstructorInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/MethodInfo add the _briefHelp and _detailedHelp variable in the MethodInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/PropertyInfo add the _briefHelp and _detailedHelp variable in the PropertyInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/ReflectionMacro remove unused I_Property* macro modify all I_Method macro to accept the help string modify all I_Method macro to define a MethodInfo signature include/osgIntrospection/Reflector add the PropertyInserter in StdVectorReflector and StdListReflector add the PropertyRemover in the StdMapReflector include/osgIntrospection/StaticMethodInfo modify all StaticMethodInfo* to accept the help in parameter include/osgIntrospection/TypedMethodInfo modify all TypedMethodInfo* to accept the help in parameter include/osgIntrospection/TypedConstructorInfo modify all TypedConstructorInfo* to accept the help in parameter include/osgIntrospection/Type add the _briefHelp and _detailedHelp variable in the Type class "
2006-10-17 23:17:06 +08:00
D_ConstructorInfoType signature = addConstructor(new osgIntrospection::TypedConstructorInfo2<reflected_type, instance_creator_type, P0, P1>(params, briefHelp, detailedHelp)); sink(signature)
#define I_Constructor3(A0, P0, N0, A1, P1, N1, A2, P2, N2, signature, briefHelp, detailedHelp) \
params.clear(); \
params.push_back(new osgIntrospection::ParameterInfo(#N0, osgIntrospection::Reflection::getType(extended_typeid<P0>()), osgIntrospection::ParameterInfo::A0)); \
params.push_back(new osgIntrospection::ParameterInfo(#N1, osgIntrospection::Reflection::getType(extended_typeid<P1>()), osgIntrospection::ParameterInfo::A1)); \
params.push_back(new osgIntrospection::ParameterInfo(#N2, osgIntrospection::Reflection::getType(extended_typeid<P2>()), osgIntrospection::ParameterInfo::A2)); \
From David Callu: " the main problem is the wrapper generation: The PropertyInfo class use MethodInfo class to access to the value. When the property are define with the I_Property* macro, the MethodInfo use by the property to have access to the value are instancied in the I_Property* macro, but there are already instantied by the I_Method* macro before secondary problem: - the function used by the property could no be customized in the genwrapper.conf file - an array property can't insert a value - the std::map reflector (and indexedProperty in general) haven't remove method - about the help in wrapper ... why not ... solution : To use the function define by the I_Method, I add a MethodInfo variable in the I_Method0 macro old macro : #define I_Method0(ret, fn) (\ params.clear(),\ addMethod(new osgIntrospection::TypedMethodIn fo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params))) new macro : #define I_Method0(ret, fn, signature, briefHelp, detailedHelp) \ params.clear(); \ osgIntrospection::MethodInfo* signature = addMethod(new osgIntrospection::TypedMethodInfo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature) the osgIntrospection::MethodInfo* signature is used by the I_Property macro to define the MethodInfo that it use so for I_Property macro : old macro : #define I_PropertyWithReturnType(t, n, r) \ cap=addProperty(new osgIntrospection::PropertyInfo(osgIntrospection::Reflection::getType(typeid(reflected_type)), osgIntrospection::Reflection::getType(typeid(t)), #n, \ I_Method0(t, get##n), \ I_Method1(r, set##n, IN, t, value))) new macro: #define I_SimpleProperty(t, n, get, set) \ get, \ set)) The genwrapper has been modified in this way. The method signature is define by the prototype of the method For example, the "const char* libraryName();" have "__C5_char_P1__libraryName" for signature solution for secondary problem: The genwrapper accept new tokens in the configuration to custumize the property. The new PropertyInserter and the CustomPropertyInsertAttribute class has been defined The PropertyRemover has been added to the StdMapReflector The _briefHelp and _detailedHelp variable has been added in PropertyInfo, MethodInfo and ContructorInfo class modification: I have modify the genwrapper files Configuration.cpp Configuration.h add some tokens to custumize the property Doxyfile.template add the comment in the output xml genwrapper.conf customize some property in osg::Geometry RegistryBuilder.h RegistryBuilder.cpp add the process_help function (to extract help from xml) TypeRegister.cpp TypeRegister.h optimize the property detection TypeDesc.h TypeDesc.cpp modify FunctionDesc and PropertyDesc WrapperGenerator.h WrapperGenerator.cpp modify the output I also modify the fallowing osgIntrospection files: include/osgIntrospection/Attributes add the PropertyInserter and the CustomPropertyInsertAttribute class include/osgIntrospection/ConstructorInfo add the _briefHelp and _detailedHelp variable in the ConstructorInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/MethodInfo add the _briefHelp and _detailedHelp variable in the MethodInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/PropertyInfo add the _briefHelp and _detailedHelp variable in the PropertyInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/ReflectionMacro remove unused I_Property* macro modify all I_Method macro to accept the help string modify all I_Method macro to define a MethodInfo signature include/osgIntrospection/Reflector add the PropertyInserter in StdVectorReflector and StdListReflector add the PropertyRemover in the StdMapReflector include/osgIntrospection/StaticMethodInfo modify all StaticMethodInfo* to accept the help in parameter include/osgIntrospection/TypedMethodInfo modify all TypedMethodInfo* to accept the help in parameter include/osgIntrospection/TypedConstructorInfo modify all TypedConstructorInfo* to accept the help in parameter include/osgIntrospection/Type add the _briefHelp and _detailedHelp variable in the Type class "
2006-10-17 23:17:06 +08:00
D_ConstructorInfoType signature = addConstructor(new osgIntrospection::TypedConstructorInfo3<reflected_type, instance_creator_type, P0, P1, P2>(params, briefHelp, detailedHelp)); sink(signature)
#define I_Constructor4(A0, P0, N0, A1, P1, N1, A2, P2, N2, A3, P3, N3, signature, briefHelp, detailedHelp) \
params.clear(); \
params.push_back(new osgIntrospection::ParameterInfo(#N0, osgIntrospection::Reflection::getType(extended_typeid<P0>()), osgIntrospection::ParameterInfo::A0)); \
params.push_back(new osgIntrospection::ParameterInfo(#N1, osgIntrospection::Reflection::getType(extended_typeid<P1>()), osgIntrospection::ParameterInfo::A1)); \
params.push_back(new osgIntrospection::ParameterInfo(#N2, osgIntrospection::Reflection::getType(extended_typeid<P2>()), osgIntrospection::ParameterInfo::A2)); \
params.push_back(new osgIntrospection::ParameterInfo(#N3, osgIntrospection::Reflection::getType(extended_typeid<P3>()), osgIntrospection::ParameterInfo::A3)); \
From David Callu: " the main problem is the wrapper generation: The PropertyInfo class use MethodInfo class to access to the value. When the property are define with the I_Property* macro, the MethodInfo use by the property to have access to the value are instancied in the I_Property* macro, but there are already instantied by the I_Method* macro before secondary problem: - the function used by the property could no be customized in the genwrapper.conf file - an array property can't insert a value - the std::map reflector (and indexedProperty in general) haven't remove method - about the help in wrapper ... why not ... solution : To use the function define by the I_Method, I add a MethodInfo variable in the I_Method0 macro old macro : #define I_Method0(ret, fn) (\ params.clear(),\ addMethod(new osgIntrospection::TypedMethodIn fo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params))) new macro : #define I_Method0(ret, fn, signature, briefHelp, detailedHelp) \ params.clear(); \ osgIntrospection::MethodInfo* signature = addMethod(new osgIntrospection::TypedMethodInfo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature) the osgIntrospection::MethodInfo* signature is used by the I_Property macro to define the MethodInfo that it use so for I_Property macro : old macro : #define I_PropertyWithReturnType(t, n, r) \ cap=addProperty(new osgIntrospection::PropertyInfo(osgIntrospection::Reflection::getType(typeid(reflected_type)), osgIntrospection::Reflection::getType(typeid(t)), #n, \ I_Method0(t, get##n), \ I_Method1(r, set##n, IN, t, value))) new macro: #define I_SimpleProperty(t, n, get, set) \ get, \ set)) The genwrapper has been modified in this way. The method signature is define by the prototype of the method For example, the "const char* libraryName();" have "__C5_char_P1__libraryName" for signature solution for secondary problem: The genwrapper accept new tokens in the configuration to custumize the property. The new PropertyInserter and the CustomPropertyInsertAttribute class has been defined The PropertyRemover has been added to the StdMapReflector The _briefHelp and _detailedHelp variable has been added in PropertyInfo, MethodInfo and ContructorInfo class modification: I have modify the genwrapper files Configuration.cpp Configuration.h add some tokens to custumize the property Doxyfile.template add the comment in the output xml genwrapper.conf customize some property in osg::Geometry RegistryBuilder.h RegistryBuilder.cpp add the process_help function (to extract help from xml) TypeRegister.cpp TypeRegister.h optimize the property detection TypeDesc.h TypeDesc.cpp modify FunctionDesc and PropertyDesc WrapperGenerator.h WrapperGenerator.cpp modify the output I also modify the fallowing osgIntrospection files: include/osgIntrospection/Attributes add the PropertyInserter and the CustomPropertyInsertAttribute class include/osgIntrospection/ConstructorInfo add the _briefHelp and _detailedHelp variable in the ConstructorInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/MethodInfo add the _briefHelp and _detailedHelp variable in the MethodInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/PropertyInfo add the _briefHelp and _detailedHelp variable in the PropertyInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/ReflectionMacro remove unused I_Property* macro modify all I_Method macro to accept the help string modify all I_Method macro to define a MethodInfo signature include/osgIntrospection/Reflector add the PropertyInserter in StdVectorReflector and StdListReflector add the PropertyRemover in the StdMapReflector include/osgIntrospection/StaticMethodInfo modify all StaticMethodInfo* to accept the help in parameter include/osgIntrospection/TypedMethodInfo modify all TypedMethodInfo* to accept the help in parameter include/osgIntrospection/TypedConstructorInfo modify all TypedConstructorInfo* to accept the help in parameter include/osgIntrospection/Type add the _briefHelp and _detailedHelp variable in the Type class "
2006-10-17 23:17:06 +08:00
D_ConstructorInfoType signature = addConstructor(new osgIntrospection::TypedConstructorInfo4<reflected_type, instance_creator_type, P0, P1, P2, P3>(params, briefHelp, detailedHelp)); sink(signature)
#define I_Constructor5(A0, P0, N0, A1, P1, N1, A2, P2, N2, A3, P3, N3, A4, P4, N4, signature, briefHelp, detailedHelp) \
params.clear(); \
params.push_back(new osgIntrospection::ParameterInfo(#N0, osgIntrospection::Reflection::getType(extended_typeid<P0>()), osgIntrospection::ParameterInfo::A0)); \
params.push_back(new osgIntrospection::ParameterInfo(#N1, osgIntrospection::Reflection::getType(extended_typeid<P1>()), osgIntrospection::ParameterInfo::A1)); \
params.push_back(new osgIntrospection::ParameterInfo(#N2, osgIntrospection::Reflection::getType(extended_typeid<P2>()), osgIntrospection::ParameterInfo::A2)); \
params.push_back(new osgIntrospection::ParameterInfo(#N3, osgIntrospection::Reflection::getType(extended_typeid<P3>()), osgIntrospection::ParameterInfo::A3)); \
params.push_back(new osgIntrospection::ParameterInfo(#N4, osgIntrospection::Reflection::getType(extended_typeid<P4>()), osgIntrospection::ParameterInfo::A4)); \
From David Callu: " the main problem is the wrapper generation: The PropertyInfo class use MethodInfo class to access to the value. When the property are define with the I_Property* macro, the MethodInfo use by the property to have access to the value are instancied in the I_Property* macro, but there are already instantied by the I_Method* macro before secondary problem: - the function used by the property could no be customized in the genwrapper.conf file - an array property can't insert a value - the std::map reflector (and indexedProperty in general) haven't remove method - about the help in wrapper ... why not ... solution : To use the function define by the I_Method, I add a MethodInfo variable in the I_Method0 macro old macro : #define I_Method0(ret, fn) (\ params.clear(),\ addMethod(new osgIntrospection::TypedMethodIn fo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params))) new macro : #define I_Method0(ret, fn, signature, briefHelp, detailedHelp) \ params.clear(); \ osgIntrospection::MethodInfo* signature = addMethod(new osgIntrospection::TypedMethodInfo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature) the osgIntrospection::MethodInfo* signature is used by the I_Property macro to define the MethodInfo that it use so for I_Property macro : old macro : #define I_PropertyWithReturnType(t, n, r) \ cap=addProperty(new osgIntrospection::PropertyInfo(osgIntrospection::Reflection::getType(typeid(reflected_type)), osgIntrospection::Reflection::getType(typeid(t)), #n, \ I_Method0(t, get##n), \ I_Method1(r, set##n, IN, t, value))) new macro: #define I_SimpleProperty(t, n, get, set) \ get, \ set)) The genwrapper has been modified in this way. The method signature is define by the prototype of the method For example, the "const char* libraryName();" have "__C5_char_P1__libraryName" for signature solution for secondary problem: The genwrapper accept new tokens in the configuration to custumize the property. The new PropertyInserter and the CustomPropertyInsertAttribute class has been defined The PropertyRemover has been added to the StdMapReflector The _briefHelp and _detailedHelp variable has been added in PropertyInfo, MethodInfo and ContructorInfo class modification: I have modify the genwrapper files Configuration.cpp Configuration.h add some tokens to custumize the property Doxyfile.template add the comment in the output xml genwrapper.conf customize some property in osg::Geometry RegistryBuilder.h RegistryBuilder.cpp add the process_help function (to extract help from xml) TypeRegister.cpp TypeRegister.h optimize the property detection TypeDesc.h TypeDesc.cpp modify FunctionDesc and PropertyDesc WrapperGenerator.h WrapperGenerator.cpp modify the output I also modify the fallowing osgIntrospection files: include/osgIntrospection/Attributes add the PropertyInserter and the CustomPropertyInsertAttribute class include/osgIntrospection/ConstructorInfo add the _briefHelp and _detailedHelp variable in the ConstructorInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/MethodInfo add the _briefHelp and _detailedHelp variable in the MethodInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/PropertyInfo add the _briefHelp and _detailedHelp variable in the PropertyInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/ReflectionMacro remove unused I_Property* macro modify all I_Method macro to accept the help string modify all I_Method macro to define a MethodInfo signature include/osgIntrospection/Reflector add the PropertyInserter in StdVectorReflector and StdListReflector add the PropertyRemover in the StdMapReflector include/osgIntrospection/StaticMethodInfo modify all StaticMethodInfo* to accept the help in parameter include/osgIntrospection/TypedMethodInfo modify all TypedMethodInfo* to accept the help in parameter include/osgIntrospection/TypedConstructorInfo modify all TypedConstructorInfo* to accept the help in parameter include/osgIntrospection/Type add the _briefHelp and _detailedHelp variable in the Type class "
2006-10-17 23:17:06 +08:00
D_ConstructorInfoType signature = addConstructor(new osgIntrospection::TypedConstructorInfo5<reflected_type, instance_creator_type, P0, P1, P2, P3, P4>(params, briefHelp, detailedHelp)); sink(signature)
#define I_Constructor6(A0, P0, N0, A1, P1, N1, A2, P2, N2, A3, P3, N3, A4, P4, N4, A5, P5, N5, signature, briefHelp, detailedHelp) \
params.clear(); \
params.push_back(new osgIntrospection::ParameterInfo(#N0, osgIntrospection::Reflection::getType(extended_typeid<P0>()), osgIntrospection::ParameterInfo::A0)); \
params.push_back(new osgIntrospection::ParameterInfo(#N1, osgIntrospection::Reflection::getType(extended_typeid<P1>()), osgIntrospection::ParameterInfo::A1)); \
params.push_back(new osgIntrospection::ParameterInfo(#N2, osgIntrospection::Reflection::getType(extended_typeid<P2>()), osgIntrospection::ParameterInfo::A2)); \
params.push_back(new osgIntrospection::ParameterInfo(#N3, osgIntrospection::Reflection::getType(extended_typeid<P3>()), osgIntrospection::ParameterInfo::A3)); \
params.push_back(new osgIntrospection::ParameterInfo(#N4, osgIntrospection::Reflection::getType(extended_typeid<P4>()), osgIntrospection::ParameterInfo::A4)); \
params.push_back(new osgIntrospection::ParameterInfo(#N5, osgIntrospection::Reflection::getType(extended_typeid<P5>()), osgIntrospection::ParameterInfo::A5)); \
From David Callu: " the main problem is the wrapper generation: The PropertyInfo class use MethodInfo class to access to the value. When the property are define with the I_Property* macro, the MethodInfo use by the property to have access to the value are instancied in the I_Property* macro, but there are already instantied by the I_Method* macro before secondary problem: - the function used by the property could no be customized in the genwrapper.conf file - an array property can't insert a value - the std::map reflector (and indexedProperty in general) haven't remove method - about the help in wrapper ... why not ... solution : To use the function define by the I_Method, I add a MethodInfo variable in the I_Method0 macro old macro : #define I_Method0(ret, fn) (\ params.clear(),\ addMethod(new osgIntrospection::TypedMethodIn fo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params))) new macro : #define I_Method0(ret, fn, signature, briefHelp, detailedHelp) \ params.clear(); \ osgIntrospection::MethodInfo* signature = addMethod(new osgIntrospection::TypedMethodInfo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature) the osgIntrospection::MethodInfo* signature is used by the I_Property macro to define the MethodInfo that it use so for I_Property macro : old macro : #define I_PropertyWithReturnType(t, n, r) \ cap=addProperty(new osgIntrospection::PropertyInfo(osgIntrospection::Reflection::getType(typeid(reflected_type)), osgIntrospection::Reflection::getType(typeid(t)), #n, \ I_Method0(t, get##n), \ I_Method1(r, set##n, IN, t, value))) new macro: #define I_SimpleProperty(t, n, get, set) \ get, \ set)) The genwrapper has been modified in this way. The method signature is define by the prototype of the method For example, the "const char* libraryName();" have "__C5_char_P1__libraryName" for signature solution for secondary problem: The genwrapper accept new tokens in the configuration to custumize the property. The new PropertyInserter and the CustomPropertyInsertAttribute class has been defined The PropertyRemover has been added to the StdMapReflector The _briefHelp and _detailedHelp variable has been added in PropertyInfo, MethodInfo and ContructorInfo class modification: I have modify the genwrapper files Configuration.cpp Configuration.h add some tokens to custumize the property Doxyfile.template add the comment in the output xml genwrapper.conf customize some property in osg::Geometry RegistryBuilder.h RegistryBuilder.cpp add the process_help function (to extract help from xml) TypeRegister.cpp TypeRegister.h optimize the property detection TypeDesc.h TypeDesc.cpp modify FunctionDesc and PropertyDesc WrapperGenerator.h WrapperGenerator.cpp modify the output I also modify the fallowing osgIntrospection files: include/osgIntrospection/Attributes add the PropertyInserter and the CustomPropertyInsertAttribute class include/osgIntrospection/ConstructorInfo add the _briefHelp and _detailedHelp variable in the ConstructorInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/MethodInfo add the _briefHelp and _detailedHelp variable in the MethodInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/PropertyInfo add the _briefHelp and _detailedHelp variable in the PropertyInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/ReflectionMacro remove unused I_Property* macro modify all I_Method macro to accept the help string modify all I_Method macro to define a MethodInfo signature include/osgIntrospection/Reflector add the PropertyInserter in StdVectorReflector and StdListReflector add the PropertyRemover in the StdMapReflector include/osgIntrospection/StaticMethodInfo modify all StaticMethodInfo* to accept the help in parameter include/osgIntrospection/TypedMethodInfo modify all TypedMethodInfo* to accept the help in parameter include/osgIntrospection/TypedConstructorInfo modify all TypedConstructorInfo* to accept the help in parameter include/osgIntrospection/Type add the _briefHelp and _detailedHelp variable in the Type class "
2006-10-17 23:17:06 +08:00
D_ConstructorInfoType signature = addConstructor(new osgIntrospection::TypedConstructorInfo6<reflected_type, instance_creator_type, P0, P1, P2, P3, P4, P5>(params, briefHelp, detailedHelp)); sink(signature)
#define I_Constructor7(A0, P0, N0, A1, P1, N1, A2, P2, N2, A3, P3, N3, A4, P4, N4, A5, P5, N5, A6, P6, N6, signature, briefHelp, detailedHelp) \
params.clear(); \
params.push_back(new osgIntrospection::ParameterInfo(#N0, osgIntrospection::Reflection::getType(extended_typeid<P0>()), osgIntrospection::ParameterInfo::A0)); \
params.push_back(new osgIntrospection::ParameterInfo(#N1, osgIntrospection::Reflection::getType(extended_typeid<P1>()), osgIntrospection::ParameterInfo::A1)); \
params.push_back(new osgIntrospection::ParameterInfo(#N2, osgIntrospection::Reflection::getType(extended_typeid<P2>()), osgIntrospection::ParameterInfo::A2)); \
params.push_back(new osgIntrospection::ParameterInfo(#N3, osgIntrospection::Reflection::getType(extended_typeid<P3>()), osgIntrospection::ParameterInfo::A3)); \
params.push_back(new osgIntrospection::ParameterInfo(#N4, osgIntrospection::Reflection::getType(extended_typeid<P4>()), osgIntrospection::ParameterInfo::A4)); \
params.push_back(new osgIntrospection::ParameterInfo(#N5, osgIntrospection::Reflection::getType(extended_typeid<P5>()), osgIntrospection::ParameterInfo::A5)); \
params.push_back(new osgIntrospection::ParameterInfo(#N6, osgIntrospection::Reflection::getType(extended_typeid<P6>()), osgIntrospection::ParameterInfo::A6)); \
From David Callu: " the main problem is the wrapper generation: The PropertyInfo class use MethodInfo class to access to the value. When the property are define with the I_Property* macro, the MethodInfo use by the property to have access to the value are instancied in the I_Property* macro, but there are already instantied by the I_Method* macro before secondary problem: - the function used by the property could no be customized in the genwrapper.conf file - an array property can't insert a value - the std::map reflector (and indexedProperty in general) haven't remove method - about the help in wrapper ... why not ... solution : To use the function define by the I_Method, I add a MethodInfo variable in the I_Method0 macro old macro : #define I_Method0(ret, fn) (\ params.clear(),\ addMethod(new osgIntrospection::TypedMethodIn fo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params))) new macro : #define I_Method0(ret, fn, signature, briefHelp, detailedHelp) \ params.clear(); \ osgIntrospection::MethodInfo* signature = addMethod(new osgIntrospection::TypedMethodInfo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature) the osgIntrospection::MethodInfo* signature is used by the I_Property macro to define the MethodInfo that it use so for I_Property macro : old macro : #define I_PropertyWithReturnType(t, n, r) \ cap=addProperty(new osgIntrospection::PropertyInfo(osgIntrospection::Reflection::getType(typeid(reflected_type)), osgIntrospection::Reflection::getType(typeid(t)), #n, \ I_Method0(t, get##n), \ I_Method1(r, set##n, IN, t, value))) new macro: #define I_SimpleProperty(t, n, get, set) \ get, \ set)) The genwrapper has been modified in this way. The method signature is define by the prototype of the method For example, the "const char* libraryName();" have "__C5_char_P1__libraryName" for signature solution for secondary problem: The genwrapper accept new tokens in the configuration to custumize the property. The new PropertyInserter and the CustomPropertyInsertAttribute class has been defined The PropertyRemover has been added to the StdMapReflector The _briefHelp and _detailedHelp variable has been added in PropertyInfo, MethodInfo and ContructorInfo class modification: I have modify the genwrapper files Configuration.cpp Configuration.h add some tokens to custumize the property Doxyfile.template add the comment in the output xml genwrapper.conf customize some property in osg::Geometry RegistryBuilder.h RegistryBuilder.cpp add the process_help function (to extract help from xml) TypeRegister.cpp TypeRegister.h optimize the property detection TypeDesc.h TypeDesc.cpp modify FunctionDesc and PropertyDesc WrapperGenerator.h WrapperGenerator.cpp modify the output I also modify the fallowing osgIntrospection files: include/osgIntrospection/Attributes add the PropertyInserter and the CustomPropertyInsertAttribute class include/osgIntrospection/ConstructorInfo add the _briefHelp and _detailedHelp variable in the ConstructorInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/MethodInfo add the _briefHelp and _detailedHelp variable in the MethodInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/PropertyInfo add the _briefHelp and _detailedHelp variable in the PropertyInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/ReflectionMacro remove unused I_Property* macro modify all I_Method macro to accept the help string modify all I_Method macro to define a MethodInfo signature include/osgIntrospection/Reflector add the PropertyInserter in StdVectorReflector and StdListReflector add the PropertyRemover in the StdMapReflector include/osgIntrospection/StaticMethodInfo modify all StaticMethodInfo* to accept the help in parameter include/osgIntrospection/TypedMethodInfo modify all TypedMethodInfo* to accept the help in parameter include/osgIntrospection/TypedConstructorInfo modify all TypedConstructorInfo* to accept the help in parameter include/osgIntrospection/Type add the _briefHelp and _detailedHelp variable in the Type class "
2006-10-17 23:17:06 +08:00
D_ConstructorInfoType signature = addConstructor(new osgIntrospection::TypedConstructorInfo7<reflected_type, instance_creator_type, P0, P1, P2, P3, P4, P5, P6>(params, briefHelp, detailedHelp)); sink(signature)
#define I_Constructor8(A0, P0, N0, A1, P1, N1, A2, P2, N2, A3, P3, N3, A4, P4, N4, A5, P5, N5, A6, P6, N6, A7, P7, N7, signature, briefHelp, detailedHelp) \
params.clear(); \
params.push_back(new osgIntrospection::ParameterInfo(#N0, osgIntrospection::Reflection::getType(extended_typeid<P0>()), osgIntrospection::ParameterInfo::A0)); \
params.push_back(new osgIntrospection::ParameterInfo(#N1, osgIntrospection::Reflection::getType(extended_typeid<P1>()), osgIntrospection::ParameterInfo::A1)); \
params.push_back(new osgIntrospection::ParameterInfo(#N2, osgIntrospection::Reflection::getType(extended_typeid<P2>()), osgIntrospection::ParameterInfo::A2)); \
params.push_back(new osgIntrospection::ParameterInfo(#N3, osgIntrospection::Reflection::getType(extended_typeid<P3>()), osgIntrospection::ParameterInfo::A3)); \
params.push_back(new osgIntrospection::ParameterInfo(#N4, osgIntrospection::Reflection::getType(extended_typeid<P4>()), osgIntrospection::ParameterInfo::A4)); \
params.push_back(new osgIntrospection::ParameterInfo(#N5, osgIntrospection::Reflection::getType(extended_typeid<P5>()), osgIntrospection::ParameterInfo::A5)); \
params.push_back(new osgIntrospection::ParameterInfo(#N6, osgIntrospection::Reflection::getType(extended_typeid<P6>()), osgIntrospection::ParameterInfo::A6)); \
params.push_back(new osgIntrospection::ParameterInfo(#N7, osgIntrospection::Reflection::getType(extended_typeid<P7>()), osgIntrospection::ParameterInfo::A7)); \
From David Callu: " the main problem is the wrapper generation: The PropertyInfo class use MethodInfo class to access to the value. When the property are define with the I_Property* macro, the MethodInfo use by the property to have access to the value are instancied in the I_Property* macro, but there are already instantied by the I_Method* macro before secondary problem: - the function used by the property could no be customized in the genwrapper.conf file - an array property can't insert a value - the std::map reflector (and indexedProperty in general) haven't remove method - about the help in wrapper ... why not ... solution : To use the function define by the I_Method, I add a MethodInfo variable in the I_Method0 macro old macro : #define I_Method0(ret, fn) (\ params.clear(),\ addMethod(new osgIntrospection::TypedMethodIn fo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params))) new macro : #define I_Method0(ret, fn, signature, briefHelp, detailedHelp) \ params.clear(); \ osgIntrospection::MethodInfo* signature = addMethod(new osgIntrospection::TypedMethodInfo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature) the osgIntrospection::MethodInfo* signature is used by the I_Property macro to define the MethodInfo that it use so for I_Property macro : old macro : #define I_PropertyWithReturnType(t, n, r) \ cap=addProperty(new osgIntrospection::PropertyInfo(osgIntrospection::Reflection::getType(typeid(reflected_type)), osgIntrospection::Reflection::getType(typeid(t)), #n, \ I_Method0(t, get##n), \ I_Method1(r, set##n, IN, t, value))) new macro: #define I_SimpleProperty(t, n, get, set) \ get, \ set)) The genwrapper has been modified in this way. The method signature is define by the prototype of the method For example, the "const char* libraryName();" have "__C5_char_P1__libraryName" for signature solution for secondary problem: The genwrapper accept new tokens in the configuration to custumize the property. The new PropertyInserter and the CustomPropertyInsertAttribute class has been defined The PropertyRemover has been added to the StdMapReflector The _briefHelp and _detailedHelp variable has been added in PropertyInfo, MethodInfo and ContructorInfo class modification: I have modify the genwrapper files Configuration.cpp Configuration.h add some tokens to custumize the property Doxyfile.template add the comment in the output xml genwrapper.conf customize some property in osg::Geometry RegistryBuilder.h RegistryBuilder.cpp add the process_help function (to extract help from xml) TypeRegister.cpp TypeRegister.h optimize the property detection TypeDesc.h TypeDesc.cpp modify FunctionDesc and PropertyDesc WrapperGenerator.h WrapperGenerator.cpp modify the output I also modify the fallowing osgIntrospection files: include/osgIntrospection/Attributes add the PropertyInserter and the CustomPropertyInsertAttribute class include/osgIntrospection/ConstructorInfo add the _briefHelp and _detailedHelp variable in the ConstructorInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/MethodInfo add the _briefHelp and _detailedHelp variable in the MethodInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/PropertyInfo add the _briefHelp and _detailedHelp variable in the PropertyInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/ReflectionMacro remove unused I_Property* macro modify all I_Method macro to accept the help string modify all I_Method macro to define a MethodInfo signature include/osgIntrospection/Reflector add the PropertyInserter in StdVectorReflector and StdListReflector add the PropertyRemover in the StdMapReflector include/osgIntrospection/StaticMethodInfo modify all StaticMethodInfo* to accept the help in parameter include/osgIntrospection/TypedMethodInfo modify all TypedMethodInfo* to accept the help in parameter include/osgIntrospection/TypedConstructorInfo modify all TypedConstructorInfo* to accept the help in parameter include/osgIntrospection/Type add the _briefHelp and _detailedHelp variable in the Type class "
2006-10-17 23:17:06 +08:00
D_ConstructorInfoType signature = addConstructor(new osgIntrospection::TypedConstructorInfo8<reflected_type, instance_creator_type, P0, P1, P2, P3, P4, P5, P6, P7>(params, briefHelp, detailedHelp)); sink(signature)
#define I_Constructor9(A0, P0, N0, A1, P1, N1, A2, P2, N2, A3, P3, N3, A4, P4, N4, A5, P5, N5, A6, P6, N6, A7, P7, N7, A8, P8, N8, signature, briefHelp, detailedHelp) \
params.clear(); \
params.push_back(new osgIntrospection::ParameterInfo(#N0, osgIntrospection::Reflection::getType(extended_typeid<P0>()), osgIntrospection::ParameterInfo::A0)); \
params.push_back(new osgIntrospection::ParameterInfo(#N1, osgIntrospection::Reflection::getType(extended_typeid<P1>()), osgIntrospection::ParameterInfo::A1)); \
params.push_back(new osgIntrospection::ParameterInfo(#N2, osgIntrospection::Reflection::getType(extended_typeid<P2>()), osgIntrospection::ParameterInfo::A2)); \
params.push_back(new osgIntrospection::ParameterInfo(#N3, osgIntrospection::Reflection::getType(extended_typeid<P3>()), osgIntrospection::ParameterInfo::A3)); \
params.push_back(new osgIntrospection::ParameterInfo(#N4, osgIntrospection::Reflection::getType(extended_typeid<P4>()), osgIntrospection::ParameterInfo::A4)); \
params.push_back(new osgIntrospection::ParameterInfo(#N5, osgIntrospection::Reflection::getType(extended_typeid<P5>()), osgIntrospection::ParameterInfo::A5)); \
params.push_back(new osgIntrospection::ParameterInfo(#N6, osgIntrospection::Reflection::getType(extended_typeid<P6>()), osgIntrospection::ParameterInfo::A6)); \
params.push_back(new osgIntrospection::ParameterInfo(#N7, osgIntrospection::Reflection::getType(extended_typeid<P7>()), osgIntrospection::ParameterInfo::A7)); \
params.push_back(new osgIntrospection::ParameterInfo(#N8, osgIntrospection::Reflection::getType(extended_typeid<P8>()), osgIntrospection::ParameterInfo::A8)); \
From David Callu: " the main problem is the wrapper generation: The PropertyInfo class use MethodInfo class to access to the value. When the property are define with the I_Property* macro, the MethodInfo use by the property to have access to the value are instancied in the I_Property* macro, but there are already instantied by the I_Method* macro before secondary problem: - the function used by the property could no be customized in the genwrapper.conf file - an array property can't insert a value - the std::map reflector (and indexedProperty in general) haven't remove method - about the help in wrapper ... why not ... solution : To use the function define by the I_Method, I add a MethodInfo variable in the I_Method0 macro old macro : #define I_Method0(ret, fn) (\ params.clear(),\ addMethod(new osgIntrospection::TypedMethodIn fo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params))) new macro : #define I_Method0(ret, fn, signature, briefHelp, detailedHelp) \ params.clear(); \ osgIntrospection::MethodInfo* signature = addMethod(new osgIntrospection::TypedMethodInfo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature) the osgIntrospection::MethodInfo* signature is used by the I_Property macro to define the MethodInfo that it use so for I_Property macro : old macro : #define I_PropertyWithReturnType(t, n, r) \ cap=addProperty(new osgIntrospection::PropertyInfo(osgIntrospection::Reflection::getType(typeid(reflected_type)), osgIntrospection::Reflection::getType(typeid(t)), #n, \ I_Method0(t, get##n), \ I_Method1(r, set##n, IN, t, value))) new macro: #define I_SimpleProperty(t, n, get, set) \ get, \ set)) The genwrapper has been modified in this way. The method signature is define by the prototype of the method For example, the "const char* libraryName();" have "__C5_char_P1__libraryName" for signature solution for secondary problem: The genwrapper accept new tokens in the configuration to custumize the property. The new PropertyInserter and the CustomPropertyInsertAttribute class has been defined The PropertyRemover has been added to the StdMapReflector The _briefHelp and _detailedHelp variable has been added in PropertyInfo, MethodInfo and ContructorInfo class modification: I have modify the genwrapper files Configuration.cpp Configuration.h add some tokens to custumize the property Doxyfile.template add the comment in the output xml genwrapper.conf customize some property in osg::Geometry RegistryBuilder.h RegistryBuilder.cpp add the process_help function (to extract help from xml) TypeRegister.cpp TypeRegister.h optimize the property detection TypeDesc.h TypeDesc.cpp modify FunctionDesc and PropertyDesc WrapperGenerator.h WrapperGenerator.cpp modify the output I also modify the fallowing osgIntrospection files: include/osgIntrospection/Attributes add the PropertyInserter and the CustomPropertyInsertAttribute class include/osgIntrospection/ConstructorInfo add the _briefHelp and _detailedHelp variable in the ConstructorInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/MethodInfo add the _briefHelp and _detailedHelp variable in the MethodInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/PropertyInfo add the _briefHelp and _detailedHelp variable in the PropertyInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/ReflectionMacro remove unused I_Property* macro modify all I_Method macro to accept the help string modify all I_Method macro to define a MethodInfo signature include/osgIntrospection/Reflector add the PropertyInserter in StdVectorReflector and StdListReflector add the PropertyRemover in the StdMapReflector include/osgIntrospection/StaticMethodInfo modify all StaticMethodInfo* to accept the help in parameter include/osgIntrospection/TypedMethodInfo modify all TypedMethodInfo* to accept the help in parameter include/osgIntrospection/TypedConstructorInfo modify all TypedConstructorInfo* to accept the help in parameter include/osgIntrospection/Type add the _briefHelp and _detailedHelp variable in the Type class "
2006-10-17 23:17:06 +08:00
D_ConstructorInfoType signature = addConstructor(new osgIntrospection::TypedConstructorInfo9<reflected_type, instance_creator_type, P0, P1, P2, P3, P4, P5, P6, P7, P8>(params, briefHelp, detailedHelp)); sink(signature)
#define I_Constructor10(A0, P0, N0, A1, P1, N1, A2, P2, N2, A3, P3, N3, A4, P4, N4, A5, P5, N5, A6, P6, N6, A7, P7, N7, A8, P8, N8, A9, P9, N9, signature, briefHelp, detailedHelp) \
params.clear(); \
params.push_back(new osgIntrospection::ParameterInfo(#N0, osgIntrospection::Reflection::getType(extended_typeid<P0>()), osgIntrospection::ParameterInfo::A0)); \
params.push_back(new osgIntrospection::ParameterInfo(#N1, osgIntrospection::Reflection::getType(extended_typeid<P1>()), osgIntrospection::ParameterInfo::A1)); \
params.push_back(new osgIntrospection::ParameterInfo(#N2, osgIntrospection::Reflection::getType(extended_typeid<P2>()), osgIntrospection::ParameterInfo::A2)); \
params.push_back(new osgIntrospection::ParameterInfo(#N3, osgIntrospection::Reflection::getType(extended_typeid<P3>()), osgIntrospection::ParameterInfo::A3)); \
params.push_back(new osgIntrospection::ParameterInfo(#N4, osgIntrospection::Reflection::getType(extended_typeid<P4>()), osgIntrospection::ParameterInfo::A4)); \
params.push_back(new osgIntrospection::ParameterInfo(#N5, osgIntrospection::Reflection::getType(extended_typeid<P5>()), osgIntrospection::ParameterInfo::A5)); \
params.push_back(new osgIntrospection::ParameterInfo(#N6, osgIntrospection::Reflection::getType(extended_typeid<P6>()), osgIntrospection::ParameterInfo::A6)); \
params.push_back(new osgIntrospection::ParameterInfo(#N7, osgIntrospection::Reflection::getType(extended_typeid<P7>()), osgIntrospection::ParameterInfo::A7)); \
params.push_back(new osgIntrospection::ParameterInfo(#N8, osgIntrospection::Reflection::getType(extended_typeid<P8>()), osgIntrospection::ParameterInfo::A8)); \
params.push_back(new osgIntrospection::ParameterInfo(#N9, osgIntrospection::Reflection::getType(extended_typeid<P9>()), osgIntrospection::ParameterInfo::A9)); \
From David Callu: " the main problem is the wrapper generation: The PropertyInfo class use MethodInfo class to access to the value. When the property are define with the I_Property* macro, the MethodInfo use by the property to have access to the value are instancied in the I_Property* macro, but there are already instantied by the I_Method* macro before secondary problem: - the function used by the property could no be customized in the genwrapper.conf file - an array property can't insert a value - the std::map reflector (and indexedProperty in general) haven't remove method - about the help in wrapper ... why not ... solution : To use the function define by the I_Method, I add a MethodInfo variable in the I_Method0 macro old macro : #define I_Method0(ret, fn) (\ params.clear(),\ addMethod(new osgIntrospection::TypedMethodIn fo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params))) new macro : #define I_Method0(ret, fn, signature, briefHelp, detailedHelp) \ params.clear(); \ osgIntrospection::MethodInfo* signature = addMethod(new osgIntrospection::TypedMethodInfo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature) the osgIntrospection::MethodInfo* signature is used by the I_Property macro to define the MethodInfo that it use so for I_Property macro : old macro : #define I_PropertyWithReturnType(t, n, r) \ cap=addProperty(new osgIntrospection::PropertyInfo(osgIntrospection::Reflection::getType(typeid(reflected_type)), osgIntrospection::Reflection::getType(typeid(t)), #n, \ I_Method0(t, get##n), \ I_Method1(r, set##n, IN, t, value))) new macro: #define I_SimpleProperty(t, n, get, set) \ get, \ set)) The genwrapper has been modified in this way. The method signature is define by the prototype of the method For example, the "const char* libraryName();" have "__C5_char_P1__libraryName" for signature solution for secondary problem: The genwrapper accept new tokens in the configuration to custumize the property. The new PropertyInserter and the CustomPropertyInsertAttribute class has been defined The PropertyRemover has been added to the StdMapReflector The _briefHelp and _detailedHelp variable has been added in PropertyInfo, MethodInfo and ContructorInfo class modification: I have modify the genwrapper files Configuration.cpp Configuration.h add some tokens to custumize the property Doxyfile.template add the comment in the output xml genwrapper.conf customize some property in osg::Geometry RegistryBuilder.h RegistryBuilder.cpp add the process_help function (to extract help from xml) TypeRegister.cpp TypeRegister.h optimize the property detection TypeDesc.h TypeDesc.cpp modify FunctionDesc and PropertyDesc WrapperGenerator.h WrapperGenerator.cpp modify the output I also modify the fallowing osgIntrospection files: include/osgIntrospection/Attributes add the PropertyInserter and the CustomPropertyInsertAttribute class include/osgIntrospection/ConstructorInfo add the _briefHelp and _detailedHelp variable in the ConstructorInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/MethodInfo add the _briefHelp and _detailedHelp variable in the MethodInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/PropertyInfo add the _briefHelp and _detailedHelp variable in the PropertyInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/ReflectionMacro remove unused I_Property* macro modify all I_Method macro to accept the help string modify all I_Method macro to define a MethodInfo signature include/osgIntrospection/Reflector add the PropertyInserter in StdVectorReflector and StdListReflector add the PropertyRemover in the StdMapReflector include/osgIntrospection/StaticMethodInfo modify all StaticMethodInfo* to accept the help in parameter include/osgIntrospection/TypedMethodInfo modify all TypedMethodInfo* to accept the help in parameter include/osgIntrospection/TypedConstructorInfo modify all TypedConstructorInfo* to accept the help in parameter include/osgIntrospection/Type add the _briefHelp and _detailedHelp variable in the Type class "
2006-10-17 23:17:06 +08:00
D_ConstructorInfoType signature = addConstructor(new osgIntrospection::TypedConstructorInfo10<reflected_type, instance_creator_type, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9>(params, briefHelp, detailedHelp)); sink(signature)
#define I_Constructor11(A0, P0, N0, A1, P1, N1, A2, P2, N2, A3, P3, N3, A4, P4, N4, A5, P5, N5, A6, P6, N6, A7, P7, N7, A8, P8, N8, A9, P9, N9, A10, P10, N10, signature, briefHelp, detailedHelp) \
params.clear(); \
params.push_back(new osgIntrospection::ParameterInfo(#N0, osgIntrospection::Reflection::getType(extended_typeid<P0>()), osgIntrospection::ParameterInfo::A0)); \
params.push_back(new osgIntrospection::ParameterInfo(#N1, osgIntrospection::Reflection::getType(extended_typeid<P1>()), osgIntrospection::ParameterInfo::A1)); \
params.push_back(new osgIntrospection::ParameterInfo(#N2, osgIntrospection::Reflection::getType(extended_typeid<P2>()), osgIntrospection::ParameterInfo::A2)); \
params.push_back(new osgIntrospection::ParameterInfo(#N3, osgIntrospection::Reflection::getType(extended_typeid<P3>()), osgIntrospection::ParameterInfo::A3)); \
params.push_back(new osgIntrospection::ParameterInfo(#N4, osgIntrospection::Reflection::getType(extended_typeid<P4>()), osgIntrospection::ParameterInfo::A4)); \
params.push_back(new osgIntrospection::ParameterInfo(#N5, osgIntrospection::Reflection::getType(extended_typeid<P5>()), osgIntrospection::ParameterInfo::A5)); \
params.push_back(new osgIntrospection::ParameterInfo(#N6, osgIntrospection::Reflection::getType(extended_typeid<P6>()), osgIntrospection::ParameterInfo::A6)); \
params.push_back(new osgIntrospection::ParameterInfo(#N7, osgIntrospection::Reflection::getType(extended_typeid<P7>()), osgIntrospection::ParameterInfo::A7)); \
params.push_back(new osgIntrospection::ParameterInfo(#N8, osgIntrospection::Reflection::getType(extended_typeid<P8>()), osgIntrospection::ParameterInfo::A8)); \
params.push_back(new osgIntrospection::ParameterInfo(#N9, osgIntrospection::Reflection::getType(extended_typeid<P9>()), osgIntrospection::ParameterInfo::A9)); \
params.push_back(new osgIntrospection::ParameterInfo(#N10, osgIntrospection::Reflection::getType(extended_typeid<P10>()), osgIntrospection::ParameterInfo::A10)); \
From David Callu: " the main problem is the wrapper generation: The PropertyInfo class use MethodInfo class to access to the value. When the property are define with the I_Property* macro, the MethodInfo use by the property to have access to the value are instancied in the I_Property* macro, but there are already instantied by the I_Method* macro before secondary problem: - the function used by the property could no be customized in the genwrapper.conf file - an array property can't insert a value - the std::map reflector (and indexedProperty in general) haven't remove method - about the help in wrapper ... why not ... solution : To use the function define by the I_Method, I add a MethodInfo variable in the I_Method0 macro old macro : #define I_Method0(ret, fn) (\ params.clear(),\ addMethod(new osgIntrospection::TypedMethodIn fo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params))) new macro : #define I_Method0(ret, fn, signature, briefHelp, detailedHelp) \ params.clear(); \ osgIntrospection::MethodInfo* signature = addMethod(new osgIntrospection::TypedMethodInfo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature) the osgIntrospection::MethodInfo* signature is used by the I_Property macro to define the MethodInfo that it use so for I_Property macro : old macro : #define I_PropertyWithReturnType(t, n, r) \ cap=addProperty(new osgIntrospection::PropertyInfo(osgIntrospection::Reflection::getType(typeid(reflected_type)), osgIntrospection::Reflection::getType(typeid(t)), #n, \ I_Method0(t, get##n), \ I_Method1(r, set##n, IN, t, value))) new macro: #define I_SimpleProperty(t, n, get, set) \ get, \ set)) The genwrapper has been modified in this way. The method signature is define by the prototype of the method For example, the "const char* libraryName();" have "__C5_char_P1__libraryName" for signature solution for secondary problem: The genwrapper accept new tokens in the configuration to custumize the property. The new PropertyInserter and the CustomPropertyInsertAttribute class has been defined The PropertyRemover has been added to the StdMapReflector The _briefHelp and _detailedHelp variable has been added in PropertyInfo, MethodInfo and ContructorInfo class modification: I have modify the genwrapper files Configuration.cpp Configuration.h add some tokens to custumize the property Doxyfile.template add the comment in the output xml genwrapper.conf customize some property in osg::Geometry RegistryBuilder.h RegistryBuilder.cpp add the process_help function (to extract help from xml) TypeRegister.cpp TypeRegister.h optimize the property detection TypeDesc.h TypeDesc.cpp modify FunctionDesc and PropertyDesc WrapperGenerator.h WrapperGenerator.cpp modify the output I also modify the fallowing osgIntrospection files: include/osgIntrospection/Attributes add the PropertyInserter and the CustomPropertyInsertAttribute class include/osgIntrospection/ConstructorInfo add the _briefHelp and _detailedHelp variable in the ConstructorInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/MethodInfo add the _briefHelp and _detailedHelp variable in the MethodInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/PropertyInfo add the _briefHelp and _detailedHelp variable in the PropertyInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/ReflectionMacro remove unused I_Property* macro modify all I_Method macro to accept the help string modify all I_Method macro to define a MethodInfo signature include/osgIntrospection/Reflector add the PropertyInserter in StdVectorReflector and StdListReflector add the PropertyRemover in the StdMapReflector include/osgIntrospection/StaticMethodInfo modify all StaticMethodInfo* to accept the help in parameter include/osgIntrospection/TypedMethodInfo modify all TypedMethodInfo* to accept the help in parameter include/osgIntrospection/TypedConstructorInfo modify all TypedConstructorInfo* to accept the help in parameter include/osgIntrospection/Type add the _briefHelp and _detailedHelp variable in the Type class "
2006-10-17 23:17:06 +08:00
D_ConstructorInfoType signature = addConstructor(new osgIntrospection::TypedConstructorInfo11<reflected_type, instance_creator_type, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10>(params, briefHelp, detailedHelp)); sink(signature)
#define I_Constructor12(A0, P0, N0, A1, P1, N1, A2, P2, N2, A3, P3, N3, A4, P4, N4, A5, P5, N5, A6, P6, N6, A7, P7, N7, A8, P8, N8, A9, P9, N9, A10, P10, N10, A11, P11, N11, signature, briefHelp, detailedHelp) \
params.clear(); \
params.push_back(new osgIntrospection::ParameterInfo(#N0, osgIntrospection::Reflection::getType(extended_typeid<P0>()), osgIntrospection::ParameterInfo::A0)); \
params.push_back(new osgIntrospection::ParameterInfo(#N1, osgIntrospection::Reflection::getType(extended_typeid<P1>()), osgIntrospection::ParameterInfo::A1)); \
params.push_back(new osgIntrospection::ParameterInfo(#N2, osgIntrospection::Reflection::getType(extended_typeid<P2>()), osgIntrospection::ParameterInfo::A2)); \
params.push_back(new osgIntrospection::ParameterInfo(#N3, osgIntrospection::Reflection::getType(extended_typeid<P3>()), osgIntrospection::ParameterInfo::A3)); \
params.push_back(new osgIntrospection::ParameterInfo(#N4, osgIntrospection::Reflection::getType(extended_typeid<P4>()), osgIntrospection::ParameterInfo::A4)); \
params.push_back(new osgIntrospection::ParameterInfo(#N5, osgIntrospection::Reflection::getType(extended_typeid<P5>()), osgIntrospection::ParameterInfo::A5)); \
params.push_back(new osgIntrospection::ParameterInfo(#N6, osgIntrospection::Reflection::getType(extended_typeid<P6>()), osgIntrospection::ParameterInfo::A6)); \
params.push_back(new osgIntrospection::ParameterInfo(#N7, osgIntrospection::Reflection::getType(extended_typeid<P7>()), osgIntrospection::ParameterInfo::A7)); \
params.push_back(new osgIntrospection::ParameterInfo(#N8, osgIntrospection::Reflection::getType(extended_typeid<P8>()), osgIntrospection::ParameterInfo::A8)); \
params.push_back(new osgIntrospection::ParameterInfo(#N9, osgIntrospection::Reflection::getType(extended_typeid<P9>()), osgIntrospection::ParameterInfo::A9)); \
params.push_back(new osgIntrospection::ParameterInfo(#N10, osgIntrospection::Reflection::getType(extended_typeid<P10>()), osgIntrospection::ParameterInfo::A10)); \
params.push_back(new osgIntrospection::ParameterInfo(#N11, osgIntrospection::Reflection::getType(extended_typeid<P11>()), osgIntrospection::ParameterInfo::A11)); \
From David Callu: " the main problem is the wrapper generation: The PropertyInfo class use MethodInfo class to access to the value. When the property are define with the I_Property* macro, the MethodInfo use by the property to have access to the value are instancied in the I_Property* macro, but there are already instantied by the I_Method* macro before secondary problem: - the function used by the property could no be customized in the genwrapper.conf file - an array property can't insert a value - the std::map reflector (and indexedProperty in general) haven't remove method - about the help in wrapper ... why not ... solution : To use the function define by the I_Method, I add a MethodInfo variable in the I_Method0 macro old macro : #define I_Method0(ret, fn) (\ params.clear(),\ addMethod(new osgIntrospection::TypedMethodIn fo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params))) new macro : #define I_Method0(ret, fn, signature, briefHelp, detailedHelp) \ params.clear(); \ osgIntrospection::MethodInfo* signature = addMethod(new osgIntrospection::TypedMethodInfo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature) the osgIntrospection::MethodInfo* signature is used by the I_Property macro to define the MethodInfo that it use so for I_Property macro : old macro : #define I_PropertyWithReturnType(t, n, r) \ cap=addProperty(new osgIntrospection::PropertyInfo(osgIntrospection::Reflection::getType(typeid(reflected_type)), osgIntrospection::Reflection::getType(typeid(t)), #n, \ I_Method0(t, get##n), \ I_Method1(r, set##n, IN, t, value))) new macro: #define I_SimpleProperty(t, n, get, set) \ get, \ set)) The genwrapper has been modified in this way. The method signature is define by the prototype of the method For example, the "const char* libraryName();" have "__C5_char_P1__libraryName" for signature solution for secondary problem: The genwrapper accept new tokens in the configuration to custumize the property. The new PropertyInserter and the CustomPropertyInsertAttribute class has been defined The PropertyRemover has been added to the StdMapReflector The _briefHelp and _detailedHelp variable has been added in PropertyInfo, MethodInfo and ContructorInfo class modification: I have modify the genwrapper files Configuration.cpp Configuration.h add some tokens to custumize the property Doxyfile.template add the comment in the output xml genwrapper.conf customize some property in osg::Geometry RegistryBuilder.h RegistryBuilder.cpp add the process_help function (to extract help from xml) TypeRegister.cpp TypeRegister.h optimize the property detection TypeDesc.h TypeDesc.cpp modify FunctionDesc and PropertyDesc WrapperGenerator.h WrapperGenerator.cpp modify the output I also modify the fallowing osgIntrospection files: include/osgIntrospection/Attributes add the PropertyInserter and the CustomPropertyInsertAttribute class include/osgIntrospection/ConstructorInfo add the _briefHelp and _detailedHelp variable in the ConstructorInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/MethodInfo add the _briefHelp and _detailedHelp variable in the MethodInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/PropertyInfo add the _briefHelp and _detailedHelp variable in the PropertyInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/ReflectionMacro remove unused I_Property* macro modify all I_Method macro to accept the help string modify all I_Method macro to define a MethodInfo signature include/osgIntrospection/Reflector add the PropertyInserter in StdVectorReflector and StdListReflector add the PropertyRemover in the StdMapReflector include/osgIntrospection/StaticMethodInfo modify all StaticMethodInfo* to accept the help in parameter include/osgIntrospection/TypedMethodInfo modify all TypedMethodInfo* to accept the help in parameter include/osgIntrospection/TypedConstructorInfo modify all TypedConstructorInfo* to accept the help in parameter include/osgIntrospection/Type add the _briefHelp and _detailedHelp variable in the Type class "
2006-10-17 23:17:06 +08:00
D_ConstructorInfoType signature = addConstructor(new osgIntrospection::TypedConstructorInfo12<reflected_type, instance_creator_type, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11>(params, briefHelp, detailedHelp)); sink(signature)
#define I_Constructor13(A0, P0, N0, A1, P1, N1, A2, P2, N2, A3, P3, N3, A4, P4, N4, A5, P5, N5, A6, P6, N6, A7, P7, N7, A8, P8, N8, A9, P9, N9, A10, P10, N10, A11, P11, N11, A12, P12, N12, signature, briefHelp, detailedHelp) \
params.clear(); \
params.push_back(new osgIntrospection::ParameterInfo(#N0, osgIntrospection::Reflection::getType(extended_typeid<P0>()), osgIntrospection::ParameterInfo::A0)); \
params.push_back(new osgIntrospection::ParameterInfo(#N1, osgIntrospection::Reflection::getType(extended_typeid<P1>()), osgIntrospection::ParameterInfo::A1)); \
params.push_back(new osgIntrospection::ParameterInfo(#N2, osgIntrospection::Reflection::getType(extended_typeid<P2>()), osgIntrospection::ParameterInfo::A2)); \
params.push_back(new osgIntrospection::ParameterInfo(#N3, osgIntrospection::Reflection::getType(extended_typeid<P3>()), osgIntrospection::ParameterInfo::A3)); \
params.push_back(new osgIntrospection::ParameterInfo(#N4, osgIntrospection::Reflection::getType(extended_typeid<P4>()), osgIntrospection::ParameterInfo::A4)); \
params.push_back(new osgIntrospection::ParameterInfo(#N5, osgIntrospection::Reflection::getType(extended_typeid<P5>()), osgIntrospection::ParameterInfo::A5)); \
params.push_back(new osgIntrospection::ParameterInfo(#N6, osgIntrospection::Reflection::getType(extended_typeid<P6>()), osgIntrospection::ParameterInfo::A6)); \
params.push_back(new osgIntrospection::ParameterInfo(#N7, osgIntrospection::Reflection::getType(extended_typeid<P7>()), osgIntrospection::ParameterInfo::A7)); \
params.push_back(new osgIntrospection::ParameterInfo(#N8, osgIntrospection::Reflection::getType(extended_typeid<P8>()), osgIntrospection::ParameterInfo::A8)); \
params.push_back(new osgIntrospection::ParameterInfo(#N9, osgIntrospection::Reflection::getType(extended_typeid<P9>()), osgIntrospection::ParameterInfo::A9)); \
params.push_back(new osgIntrospection::ParameterInfo(#N10, osgIntrospection::Reflection::getType(extended_typeid<P10>()), osgIntrospection::ParameterInfo::A10)); \
params.push_back(new osgIntrospection::ParameterInfo(#N11, osgIntrospection::Reflection::getType(extended_typeid<P11>()), osgIntrospection::ParameterInfo::A11)); \
params.push_back(new osgIntrospection::ParameterInfo(#N12, osgIntrospection::Reflection::getType(extended_typeid<P12>()), osgIntrospection::ParameterInfo::A12)); \
From David Callu: " the main problem is the wrapper generation: The PropertyInfo class use MethodInfo class to access to the value. When the property are define with the I_Property* macro, the MethodInfo use by the property to have access to the value are instancied in the I_Property* macro, but there are already instantied by the I_Method* macro before secondary problem: - the function used by the property could no be customized in the genwrapper.conf file - an array property can't insert a value - the std::map reflector (and indexedProperty in general) haven't remove method - about the help in wrapper ... why not ... solution : To use the function define by the I_Method, I add a MethodInfo variable in the I_Method0 macro old macro : #define I_Method0(ret, fn) (\ params.clear(),\ addMethod(new osgIntrospection::TypedMethodIn fo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params))) new macro : #define I_Method0(ret, fn, signature, briefHelp, detailedHelp) \ params.clear(); \ osgIntrospection::MethodInfo* signature = addMethod(new osgIntrospection::TypedMethodInfo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature) the osgIntrospection::MethodInfo* signature is used by the I_Property macro to define the MethodInfo that it use so for I_Property macro : old macro : #define I_PropertyWithReturnType(t, n, r) \ cap=addProperty(new osgIntrospection::PropertyInfo(osgIntrospection::Reflection::getType(typeid(reflected_type)), osgIntrospection::Reflection::getType(typeid(t)), #n, \ I_Method0(t, get##n), \ I_Method1(r, set##n, IN, t, value))) new macro: #define I_SimpleProperty(t, n, get, set) \ get, \ set)) The genwrapper has been modified in this way. The method signature is define by the prototype of the method For example, the "const char* libraryName();" have "__C5_char_P1__libraryName" for signature solution for secondary problem: The genwrapper accept new tokens in the configuration to custumize the property. The new PropertyInserter and the CustomPropertyInsertAttribute class has been defined The PropertyRemover has been added to the StdMapReflector The _briefHelp and _detailedHelp variable has been added in PropertyInfo, MethodInfo and ContructorInfo class modification: I have modify the genwrapper files Configuration.cpp Configuration.h add some tokens to custumize the property Doxyfile.template add the comment in the output xml genwrapper.conf customize some property in osg::Geometry RegistryBuilder.h RegistryBuilder.cpp add the process_help function (to extract help from xml) TypeRegister.cpp TypeRegister.h optimize the property detection TypeDesc.h TypeDesc.cpp modify FunctionDesc and PropertyDesc WrapperGenerator.h WrapperGenerator.cpp modify the output I also modify the fallowing osgIntrospection files: include/osgIntrospection/Attributes add the PropertyInserter and the CustomPropertyInsertAttribute class include/osgIntrospection/ConstructorInfo add the _briefHelp and _detailedHelp variable in the ConstructorInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/MethodInfo add the _briefHelp and _detailedHelp variable in the MethodInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/PropertyInfo add the _briefHelp and _detailedHelp variable in the PropertyInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/ReflectionMacro remove unused I_Property* macro modify all I_Method macro to accept the help string modify all I_Method macro to define a MethodInfo signature include/osgIntrospection/Reflector add the PropertyInserter in StdVectorReflector and StdListReflector add the PropertyRemover in the StdMapReflector include/osgIntrospection/StaticMethodInfo modify all StaticMethodInfo* to accept the help in parameter include/osgIntrospection/TypedMethodInfo modify all TypedMethodInfo* to accept the help in parameter include/osgIntrospection/TypedConstructorInfo modify all TypedConstructorInfo* to accept the help in parameter include/osgIntrospection/Type add the _briefHelp and _detailedHelp variable in the Type class "
2006-10-17 23:17:06 +08:00
D_ConstructorInfoType signature = addConstructor(new osgIntrospection::TypedConstructorInfo13<reflected_type, instance_creator_type, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12>(params, briefHelp, detailedHelp)); sink(signature)
#define I_Constructor14(A0, P0, N0, A1, P1, N1, A2, P2, N2, A3, P3, N3, A4, P4, N4, A5, P5, N5, A6, P6, N6, A7, P7, N7, A8, P8, N8, A9, P9, N9, A10, P10, N10, A11, P11, N11, A12, P12, N12, A13, P13, N13, signature, briefHelp, detailedHelp) \
params.clear(); \
params.push_back(new osgIntrospection::ParameterInfo(#N0, osgIntrospection::Reflection::getType(extended_typeid<P0>()), osgIntrospection::ParameterInfo::A0)); \
params.push_back(new osgIntrospection::ParameterInfo(#N1, osgIntrospection::Reflection::getType(extended_typeid<P1>()), osgIntrospection::ParameterInfo::A1)); \
params.push_back(new osgIntrospection::ParameterInfo(#N2, osgIntrospection::Reflection::getType(extended_typeid<P2>()), osgIntrospection::ParameterInfo::A2)); \
params.push_back(new osgIntrospection::ParameterInfo(#N3, osgIntrospection::Reflection::getType(extended_typeid<P3>()), osgIntrospection::ParameterInfo::A3)); \
params.push_back(new osgIntrospection::ParameterInfo(#N4, osgIntrospection::Reflection::getType(extended_typeid<P4>()), osgIntrospection::ParameterInfo::A4)); \
params.push_back(new osgIntrospection::ParameterInfo(#N5, osgIntrospection::Reflection::getType(extended_typeid<P5>()), osgIntrospection::ParameterInfo::A5)); \
params.push_back(new osgIntrospection::ParameterInfo(#N6, osgIntrospection::Reflection::getType(extended_typeid<P6>()), osgIntrospection::ParameterInfo::A6)); \
params.push_back(new osgIntrospection::ParameterInfo(#N7, osgIntrospection::Reflection::getType(extended_typeid<P7>()), osgIntrospection::ParameterInfo::A7)); \
params.push_back(new osgIntrospection::ParameterInfo(#N8, osgIntrospection::Reflection::getType(extended_typeid<P8>()), osgIntrospection::ParameterInfo::A8)); \
params.push_back(new osgIntrospection::ParameterInfo(#N9, osgIntrospection::Reflection::getType(extended_typeid<P9>()), osgIntrospection::ParameterInfo::A9)); \
params.push_back(new osgIntrospection::ParameterInfo(#N10, osgIntrospection::Reflection::getType(extended_typeid<P10>()), osgIntrospection::ParameterInfo::A10)); \
params.push_back(new osgIntrospection::ParameterInfo(#N11, osgIntrospection::Reflection::getType(extended_typeid<P11>()), osgIntrospection::ParameterInfo::A11)); \
params.push_back(new osgIntrospection::ParameterInfo(#N12, osgIntrospection::Reflection::getType(extended_typeid<P12>()), osgIntrospection::ParameterInfo::A12)); \
params.push_back(new osgIntrospection::ParameterInfo(#N13, osgIntrospection::Reflection::getType(extended_typeid<P13>()), osgIntrospection::ParameterInfo::A13)); \
From David Callu: " the main problem is the wrapper generation: The PropertyInfo class use MethodInfo class to access to the value. When the property are define with the I_Property* macro, the MethodInfo use by the property to have access to the value are instancied in the I_Property* macro, but there are already instantied by the I_Method* macro before secondary problem: - the function used by the property could no be customized in the genwrapper.conf file - an array property can't insert a value - the std::map reflector (and indexedProperty in general) haven't remove method - about the help in wrapper ... why not ... solution : To use the function define by the I_Method, I add a MethodInfo variable in the I_Method0 macro old macro : #define I_Method0(ret, fn) (\ params.clear(),\ addMethod(new osgIntrospection::TypedMethodIn fo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params))) new macro : #define I_Method0(ret, fn, signature, briefHelp, detailedHelp) \ params.clear(); \ osgIntrospection::MethodInfo* signature = addMethod(new osgIntrospection::TypedMethodInfo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature) the osgIntrospection::MethodInfo* signature is used by the I_Property macro to define the MethodInfo that it use so for I_Property macro : old macro : #define I_PropertyWithReturnType(t, n, r) \ cap=addProperty(new osgIntrospection::PropertyInfo(osgIntrospection::Reflection::getType(typeid(reflected_type)), osgIntrospection::Reflection::getType(typeid(t)), #n, \ I_Method0(t, get##n), \ I_Method1(r, set##n, IN, t, value))) new macro: #define I_SimpleProperty(t, n, get, set) \ get, \ set)) The genwrapper has been modified in this way. The method signature is define by the prototype of the method For example, the "const char* libraryName();" have "__C5_char_P1__libraryName" for signature solution for secondary problem: The genwrapper accept new tokens in the configuration to custumize the property. The new PropertyInserter and the CustomPropertyInsertAttribute class has been defined The PropertyRemover has been added to the StdMapReflector The _briefHelp and _detailedHelp variable has been added in PropertyInfo, MethodInfo and ContructorInfo class modification: I have modify the genwrapper files Configuration.cpp Configuration.h add some tokens to custumize the property Doxyfile.template add the comment in the output xml genwrapper.conf customize some property in osg::Geometry RegistryBuilder.h RegistryBuilder.cpp add the process_help function (to extract help from xml) TypeRegister.cpp TypeRegister.h optimize the property detection TypeDesc.h TypeDesc.cpp modify FunctionDesc and PropertyDesc WrapperGenerator.h WrapperGenerator.cpp modify the output I also modify the fallowing osgIntrospection files: include/osgIntrospection/Attributes add the PropertyInserter and the CustomPropertyInsertAttribute class include/osgIntrospection/ConstructorInfo add the _briefHelp and _detailedHelp variable in the ConstructorInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/MethodInfo add the _briefHelp and _detailedHelp variable in the MethodInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/PropertyInfo add the _briefHelp and _detailedHelp variable in the PropertyInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/ReflectionMacro remove unused I_Property* macro modify all I_Method macro to accept the help string modify all I_Method macro to define a MethodInfo signature include/osgIntrospection/Reflector add the PropertyInserter in StdVectorReflector and StdListReflector add the PropertyRemover in the StdMapReflector include/osgIntrospection/StaticMethodInfo modify all StaticMethodInfo* to accept the help in parameter include/osgIntrospection/TypedMethodInfo modify all TypedMethodInfo* to accept the help in parameter include/osgIntrospection/TypedConstructorInfo modify all TypedConstructorInfo* to accept the help in parameter include/osgIntrospection/Type add the _briefHelp and _detailedHelp variable in the Type class "
2006-10-17 23:17:06 +08:00
D_ConstructorInfoType signature = addConstructor(new osgIntrospection::TypedConstructorInfo14<reflected_type, instance_creator_type, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13>(params, briefHelp, detailedHelp)); sink(signature)
#define I_Constructor15(A0, P0, N0, A1, P1, N1, A2, P2, N2, A3, P3, N3, A4, P4, N4, A5, P5, N5, A6, P6, N6, A7, P7, N7, A8, P8, N8, A9, P9, N9, A10, P10, N10, A11, P11, N11, A12, P12, N12, A13, P13, N13, A14, P14, N14, signature, briefHelp, detailedHelp) \
params.clear(); \
params.push_back(new osgIntrospection::ParameterInfo(#N0, osgIntrospection::Reflection::getType(extended_typeid<P0>()), osgIntrospection::ParameterInfo::A0)); \
params.push_back(new osgIntrospection::ParameterInfo(#N1, osgIntrospection::Reflection::getType(extended_typeid<P1>()), osgIntrospection::ParameterInfo::A1)); \
params.push_back(new osgIntrospection::ParameterInfo(#N2, osgIntrospection::Reflection::getType(extended_typeid<P2>()), osgIntrospection::ParameterInfo::A2)); \
params.push_back(new osgIntrospection::ParameterInfo(#N3, osgIntrospection::Reflection::getType(extended_typeid<P3>()), osgIntrospection::ParameterInfo::A3)); \
params.push_back(new osgIntrospection::ParameterInfo(#N4, osgIntrospection::Reflection::getType(extended_typeid<P4>()), osgIntrospection::ParameterInfo::A4)); \
params.push_back(new osgIntrospection::ParameterInfo(#N5, osgIntrospection::Reflection::getType(extended_typeid<P5>()), osgIntrospection::ParameterInfo::A5)); \
params.push_back(new osgIntrospection::ParameterInfo(#N6, osgIntrospection::Reflection::getType(extended_typeid<P6>()), osgIntrospection::ParameterInfo::A6)); \
params.push_back(new osgIntrospection::ParameterInfo(#N7, osgIntrospection::Reflection::getType(extended_typeid<P7>()), osgIntrospection::ParameterInfo::A7)); \
params.push_back(new osgIntrospection::ParameterInfo(#N8, osgIntrospection::Reflection::getType(extended_typeid<P8>()), osgIntrospection::ParameterInfo::A8)); \
params.push_back(new osgIntrospection::ParameterInfo(#N9, osgIntrospection::Reflection::getType(extended_typeid<P9>()), osgIntrospection::ParameterInfo::A9)); \
params.push_back(new osgIntrospection::ParameterInfo(#N10, osgIntrospection::Reflection::getType(extended_typeid<P10>()), osgIntrospection::ParameterInfo::A10)); \
params.push_back(new osgIntrospection::ParameterInfo(#N11, osgIntrospection::Reflection::getType(extended_typeid<P11>()), osgIntrospection::ParameterInfo::A11)); \
params.push_back(new osgIntrospection::ParameterInfo(#N12, osgIntrospection::Reflection::getType(extended_typeid<P12>()), osgIntrospection::ParameterInfo::A12)); \
params.push_back(new osgIntrospection::ParameterInfo(#N13, osgIntrospection::Reflection::getType(extended_typeid<P13>()), osgIntrospection::ParameterInfo::A13)); \
params.push_back(new osgIntrospection::ParameterInfo(#N14, osgIntrospection::Reflection::getType(extended_typeid<P14>()), osgIntrospection::ParameterInfo::A14)); \
From David Callu: " the main problem is the wrapper generation: The PropertyInfo class use MethodInfo class to access to the value. When the property are define with the I_Property* macro, the MethodInfo use by the property to have access to the value are instancied in the I_Property* macro, but there are already instantied by the I_Method* macro before secondary problem: - the function used by the property could no be customized in the genwrapper.conf file - an array property can't insert a value - the std::map reflector (and indexedProperty in general) haven't remove method - about the help in wrapper ... why not ... solution : To use the function define by the I_Method, I add a MethodInfo variable in the I_Method0 macro old macro : #define I_Method0(ret, fn) (\ params.clear(),\ addMethod(new osgIntrospection::TypedMethodIn fo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params))) new macro : #define I_Method0(ret, fn, signature, briefHelp, detailedHelp) \ params.clear(); \ osgIntrospection::MethodInfo* signature = addMethod(new osgIntrospection::TypedMethodInfo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature) the osgIntrospection::MethodInfo* signature is used by the I_Property macro to define the MethodInfo that it use so for I_Property macro : old macro : #define I_PropertyWithReturnType(t, n, r) \ cap=addProperty(new osgIntrospection::PropertyInfo(osgIntrospection::Reflection::getType(typeid(reflected_type)), osgIntrospection::Reflection::getType(typeid(t)), #n, \ I_Method0(t, get##n), \ I_Method1(r, set##n, IN, t, value))) new macro: #define I_SimpleProperty(t, n, get, set) \ get, \ set)) The genwrapper has been modified in this way. The method signature is define by the prototype of the method For example, the "const char* libraryName();" have "__C5_char_P1__libraryName" for signature solution for secondary problem: The genwrapper accept new tokens in the configuration to custumize the property. The new PropertyInserter and the CustomPropertyInsertAttribute class has been defined The PropertyRemover has been added to the StdMapReflector The _briefHelp and _detailedHelp variable has been added in PropertyInfo, MethodInfo and ContructorInfo class modification: I have modify the genwrapper files Configuration.cpp Configuration.h add some tokens to custumize the property Doxyfile.template add the comment in the output xml genwrapper.conf customize some property in osg::Geometry RegistryBuilder.h RegistryBuilder.cpp add the process_help function (to extract help from xml) TypeRegister.cpp TypeRegister.h optimize the property detection TypeDesc.h TypeDesc.cpp modify FunctionDesc and PropertyDesc WrapperGenerator.h WrapperGenerator.cpp modify the output I also modify the fallowing osgIntrospection files: include/osgIntrospection/Attributes add the PropertyInserter and the CustomPropertyInsertAttribute class include/osgIntrospection/ConstructorInfo add the _briefHelp and _detailedHelp variable in the ConstructorInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/MethodInfo add the _briefHelp and _detailedHelp variable in the MethodInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/PropertyInfo add the _briefHelp and _detailedHelp variable in the PropertyInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/ReflectionMacro remove unused I_Property* macro modify all I_Method macro to accept the help string modify all I_Method macro to define a MethodInfo signature include/osgIntrospection/Reflector add the PropertyInserter in StdVectorReflector and StdListReflector add the PropertyRemover in the StdMapReflector include/osgIntrospection/StaticMethodInfo modify all StaticMethodInfo* to accept the help in parameter include/osgIntrospection/TypedMethodInfo modify all TypedMethodInfo* to accept the help in parameter include/osgIntrospection/TypedConstructorInfo modify all TypedConstructorInfo* to accept the help in parameter include/osgIntrospection/Type add the _briefHelp and _detailedHelp variable in the Type class "
2006-10-17 23:17:06 +08:00
D_ConstructorInfoType signature = addConstructor(new osgIntrospection::TypedConstructorInfo15<reflected_type, instance_creator_type, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14>(params, briefHelp, detailedHelp)); sink(signature)
#define I_Constructor16(A0, P0, N0, A1, P1, N1, A2, P2, N2, A3, P3, N3, A4, P4, N4, A5, P5, N5, A6, P6, N6, A7, P7, N7, A8, P8, N8, A9, P9, N9, A10, P10, N10, A11, P11, N11, A12, P12, N12, A13, P13, N13, A14, P14, N14, A15, P15, N15, signature, briefHelp, detailedHelp) \
params.clear(); \
params.push_back(new osgIntrospection::ParameterInfo(#N0, osgIntrospection::Reflection::getType(extended_typeid<P0>()), osgIntrospection::ParameterInfo::A0)); \
params.push_back(new osgIntrospection::ParameterInfo(#N1, osgIntrospection::Reflection::getType(extended_typeid<P1>()), osgIntrospection::ParameterInfo::A1)); \
params.push_back(new osgIntrospection::ParameterInfo(#N2, osgIntrospection::Reflection::getType(extended_typeid<P2>()), osgIntrospection::ParameterInfo::A2)); \
params.push_back(new osgIntrospection::ParameterInfo(#N3, osgIntrospection::Reflection::getType(extended_typeid<P3>()), osgIntrospection::ParameterInfo::A3)); \
params.push_back(new osgIntrospection::ParameterInfo(#N4, osgIntrospection::Reflection::getType(extended_typeid<P4>()), osgIntrospection::ParameterInfo::A4)); \
params.push_back(new osgIntrospection::ParameterInfo(#N5, osgIntrospection::Reflection::getType(extended_typeid<P5>()), osgIntrospection::ParameterInfo::A5)); \
params.push_back(new osgIntrospection::ParameterInfo(#N6, osgIntrospection::Reflection::getType(extended_typeid<P6>()), osgIntrospection::ParameterInfo::A6)); \
params.push_back(new osgIntrospection::ParameterInfo(#N7, osgIntrospection::Reflection::getType(extended_typeid<P7>()), osgIntrospection::ParameterInfo::A7)); \
params.push_back(new osgIntrospection::ParameterInfo(#N8, osgIntrospection::Reflection::getType(extended_typeid<P8>()), osgIntrospection::ParameterInfo::A8)); \
params.push_back(new osgIntrospection::ParameterInfo(#N9, osgIntrospection::Reflection::getType(extended_typeid<P9>()), osgIntrospection::ParameterInfo::A9)); \
params.push_back(new osgIntrospection::ParameterInfo(#N10, osgIntrospection::Reflection::getType(extended_typeid<P10>()), osgIntrospection::ParameterInfo::A10)); \
params.push_back(new osgIntrospection::ParameterInfo(#N11, osgIntrospection::Reflection::getType(extended_typeid<P11>()), osgIntrospection::ParameterInfo::A11)); \
params.push_back(new osgIntrospection::ParameterInfo(#N12, osgIntrospection::Reflection::getType(extended_typeid<P12>()), osgIntrospection::ParameterInfo::A12)); \
params.push_back(new osgIntrospection::ParameterInfo(#N13, osgIntrospection::Reflection::getType(extended_typeid<P13>()), osgIntrospection::ParameterInfo::A13)); \
params.push_back(new osgIntrospection::ParameterInfo(#N14, osgIntrospection::Reflection::getType(extended_typeid<P14>()), osgIntrospection::ParameterInfo::A14)); \
params.push_back(new osgIntrospection::ParameterInfo(#N15, osgIntrospection::Reflection::getType(extended_typeid<P15>()), osgIntrospection::ParameterInfo::A15)); \
From David Callu: " the main problem is the wrapper generation: The PropertyInfo class use MethodInfo class to access to the value. When the property are define with the I_Property* macro, the MethodInfo use by the property to have access to the value are instancied in the I_Property* macro, but there are already instantied by the I_Method* macro before secondary problem: - the function used by the property could no be customized in the genwrapper.conf file - an array property can't insert a value - the std::map reflector (and indexedProperty in general) haven't remove method - about the help in wrapper ... why not ... solution : To use the function define by the I_Method, I add a MethodInfo variable in the I_Method0 macro old macro : #define I_Method0(ret, fn) (\ params.clear(),\ addMethod(new osgIntrospection::TypedMethodIn fo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params))) new macro : #define I_Method0(ret, fn, signature, briefHelp, detailedHelp) \ params.clear(); \ osgIntrospection::MethodInfo* signature = addMethod(new osgIntrospection::TypedMethodInfo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature) the osgIntrospection::MethodInfo* signature is used by the I_Property macro to define the MethodInfo that it use so for I_Property macro : old macro : #define I_PropertyWithReturnType(t, n, r) \ cap=addProperty(new osgIntrospection::PropertyInfo(osgIntrospection::Reflection::getType(typeid(reflected_type)), osgIntrospection::Reflection::getType(typeid(t)), #n, \ I_Method0(t, get##n), \ I_Method1(r, set##n, IN, t, value))) new macro: #define I_SimpleProperty(t, n, get, set) \ get, \ set)) The genwrapper has been modified in this way. The method signature is define by the prototype of the method For example, the "const char* libraryName();" have "__C5_char_P1__libraryName" for signature solution for secondary problem: The genwrapper accept new tokens in the configuration to custumize the property. The new PropertyInserter and the CustomPropertyInsertAttribute class has been defined The PropertyRemover has been added to the StdMapReflector The _briefHelp and _detailedHelp variable has been added in PropertyInfo, MethodInfo and ContructorInfo class modification: I have modify the genwrapper files Configuration.cpp Configuration.h add some tokens to custumize the property Doxyfile.template add the comment in the output xml genwrapper.conf customize some property in osg::Geometry RegistryBuilder.h RegistryBuilder.cpp add the process_help function (to extract help from xml) TypeRegister.cpp TypeRegister.h optimize the property detection TypeDesc.h TypeDesc.cpp modify FunctionDesc and PropertyDesc WrapperGenerator.h WrapperGenerator.cpp modify the output I also modify the fallowing osgIntrospection files: include/osgIntrospection/Attributes add the PropertyInserter and the CustomPropertyInsertAttribute class include/osgIntrospection/ConstructorInfo add the _briefHelp and _detailedHelp variable in the ConstructorInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/MethodInfo add the _briefHelp and _detailedHelp variable in the MethodInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/PropertyInfo add the _briefHelp and _detailedHelp variable in the PropertyInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/ReflectionMacro remove unused I_Property* macro modify all I_Method macro to accept the help string modify all I_Method macro to define a MethodInfo signature include/osgIntrospection/Reflector add the PropertyInserter in StdVectorReflector and StdListReflector add the PropertyRemover in the StdMapReflector include/osgIntrospection/StaticMethodInfo modify all StaticMethodInfo* to accept the help in parameter include/osgIntrospection/TypedMethodInfo modify all TypedMethodInfo* to accept the help in parameter include/osgIntrospection/TypedConstructorInfo modify all TypedConstructorInfo* to accept the help in parameter include/osgIntrospection/Type add the _briefHelp and _detailedHelp variable in the Type class "
2006-10-17 23:17:06 +08:00
D_ConstructorInfoType signature = addConstructor(new osgIntrospection::TypedConstructorInfo16<reflected_type, instance_creator_type, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15>(params, briefHelp, detailedHelp)); sink(signature)
#define I_ConstructorWithDefaults0(signature, briefHelp, detailedHelp) \
params.clear(); \
D_ConstructorInfoType signature = addConstructor(new osgIntrospection::TypedConstructorInfo0<reflected_type, instance_creator_type>(params, briefHelp, detailedHelp)); sink(signature)
#define I_ConstructorWithDefaults1(A0, P0, N0, D0, signature, briefHelp, detailedHelp) \
params.clear(); \
params.push_back(new osgIntrospection::ParameterInfo(#N0, osgIntrospection::Reflection::getType(extended_typeid<P0>()), osgIntrospection::ParameterInfo::A0, osgIntrospection::Value(D0))); \
From David Callu: " the main problem is the wrapper generation: The PropertyInfo class use MethodInfo class to access to the value. When the property are define with the I_Property* macro, the MethodInfo use by the property to have access to the value are instancied in the I_Property* macro, but there are already instantied by the I_Method* macro before secondary problem: - the function used by the property could no be customized in the genwrapper.conf file - an array property can't insert a value - the std::map reflector (and indexedProperty in general) haven't remove method - about the help in wrapper ... why not ... solution : To use the function define by the I_Method, I add a MethodInfo variable in the I_Method0 macro old macro : #define I_Method0(ret, fn) (\ params.clear(),\ addMethod(new osgIntrospection::TypedMethodIn fo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params))) new macro : #define I_Method0(ret, fn, signature, briefHelp, detailedHelp) \ params.clear(); \ osgIntrospection::MethodInfo* signature = addMethod(new osgIntrospection::TypedMethodInfo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature) the osgIntrospection::MethodInfo* signature is used by the I_Property macro to define the MethodInfo that it use so for I_Property macro : old macro : #define I_PropertyWithReturnType(t, n, r) \ cap=addProperty(new osgIntrospection::PropertyInfo(osgIntrospection::Reflection::getType(typeid(reflected_type)), osgIntrospection::Reflection::getType(typeid(t)), #n, \ I_Method0(t, get##n), \ I_Method1(r, set##n, IN, t, value))) new macro: #define I_SimpleProperty(t, n, get, set) \ get, \ set)) The genwrapper has been modified in this way. The method signature is define by the prototype of the method For example, the "const char* libraryName();" have "__C5_char_P1__libraryName" for signature solution for secondary problem: The genwrapper accept new tokens in the configuration to custumize the property. The new PropertyInserter and the CustomPropertyInsertAttribute class has been defined The PropertyRemover has been added to the StdMapReflector The _briefHelp and _detailedHelp variable has been added in PropertyInfo, MethodInfo and ContructorInfo class modification: I have modify the genwrapper files Configuration.cpp Configuration.h add some tokens to custumize the property Doxyfile.template add the comment in the output xml genwrapper.conf customize some property in osg::Geometry RegistryBuilder.h RegistryBuilder.cpp add the process_help function (to extract help from xml) TypeRegister.cpp TypeRegister.h optimize the property detection TypeDesc.h TypeDesc.cpp modify FunctionDesc and PropertyDesc WrapperGenerator.h WrapperGenerator.cpp modify the output I also modify the fallowing osgIntrospection files: include/osgIntrospection/Attributes add the PropertyInserter and the CustomPropertyInsertAttribute class include/osgIntrospection/ConstructorInfo add the _briefHelp and _detailedHelp variable in the ConstructorInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/MethodInfo add the _briefHelp and _detailedHelp variable in the MethodInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/PropertyInfo add the _briefHelp and _detailedHelp variable in the PropertyInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/ReflectionMacro remove unused I_Property* macro modify all I_Method macro to accept the help string modify all I_Method macro to define a MethodInfo signature include/osgIntrospection/Reflector add the PropertyInserter in StdVectorReflector and StdListReflector add the PropertyRemover in the StdMapReflector include/osgIntrospection/StaticMethodInfo modify all StaticMethodInfo* to accept the help in parameter include/osgIntrospection/TypedMethodInfo modify all TypedMethodInfo* to accept the help in parameter include/osgIntrospection/TypedConstructorInfo modify all TypedConstructorInfo* to accept the help in parameter include/osgIntrospection/Type add the _briefHelp and _detailedHelp variable in the Type class "
2006-10-17 23:17:06 +08:00
D_ConstructorInfoType signature = addConstructor(new osgIntrospection::TypedConstructorInfo1<reflected_type, instance_creator_type, P0>(params, briefHelp, detailedHelp)); sink(signature)
#define I_ConstructorWithDefaults2(A0, P0, N0, D0, A1, P1, N1, D1, signature, briefHelp, detailedHelp) \
params.clear(); \
params.push_back(new osgIntrospection::ParameterInfo(#N0, osgIntrospection::Reflection::getType(extended_typeid<P0>()), osgIntrospection::ParameterInfo::A0, osgIntrospection::Value(D0))); \
params.push_back(new osgIntrospection::ParameterInfo(#N1, osgIntrospection::Reflection::getType(extended_typeid<P1>()), osgIntrospection::ParameterInfo::A1, osgIntrospection::Value(D1))); \
From David Callu: " the main problem is the wrapper generation: The PropertyInfo class use MethodInfo class to access to the value. When the property are define with the I_Property* macro, the MethodInfo use by the property to have access to the value are instancied in the I_Property* macro, but there are already instantied by the I_Method* macro before secondary problem: - the function used by the property could no be customized in the genwrapper.conf file - an array property can't insert a value - the std::map reflector (and indexedProperty in general) haven't remove method - about the help in wrapper ... why not ... solution : To use the function define by the I_Method, I add a MethodInfo variable in the I_Method0 macro old macro : #define I_Method0(ret, fn) (\ params.clear(),\ addMethod(new osgIntrospection::TypedMethodIn fo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params))) new macro : #define I_Method0(ret, fn, signature, briefHelp, detailedHelp) \ params.clear(); \ osgIntrospection::MethodInfo* signature = addMethod(new osgIntrospection::TypedMethodInfo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature) the osgIntrospection::MethodInfo* signature is used by the I_Property macro to define the MethodInfo that it use so for I_Property macro : old macro : #define I_PropertyWithReturnType(t, n, r) \ cap=addProperty(new osgIntrospection::PropertyInfo(osgIntrospection::Reflection::getType(typeid(reflected_type)), osgIntrospection::Reflection::getType(typeid(t)), #n, \ I_Method0(t, get##n), \ I_Method1(r, set##n, IN, t, value))) new macro: #define I_SimpleProperty(t, n, get, set) \ get, \ set)) The genwrapper has been modified in this way. The method signature is define by the prototype of the method For example, the "const char* libraryName();" have "__C5_char_P1__libraryName" for signature solution for secondary problem: The genwrapper accept new tokens in the configuration to custumize the property. The new PropertyInserter and the CustomPropertyInsertAttribute class has been defined The PropertyRemover has been added to the StdMapReflector The _briefHelp and _detailedHelp variable has been added in PropertyInfo, MethodInfo and ContructorInfo class modification: I have modify the genwrapper files Configuration.cpp Configuration.h add some tokens to custumize the property Doxyfile.template add the comment in the output xml genwrapper.conf customize some property in osg::Geometry RegistryBuilder.h RegistryBuilder.cpp add the process_help function (to extract help from xml) TypeRegister.cpp TypeRegister.h optimize the property detection TypeDesc.h TypeDesc.cpp modify FunctionDesc and PropertyDesc WrapperGenerator.h WrapperGenerator.cpp modify the output I also modify the fallowing osgIntrospection files: include/osgIntrospection/Attributes add the PropertyInserter and the CustomPropertyInsertAttribute class include/osgIntrospection/ConstructorInfo add the _briefHelp and _detailedHelp variable in the ConstructorInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/MethodInfo add the _briefHelp and _detailedHelp variable in the MethodInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/PropertyInfo add the _briefHelp and _detailedHelp variable in the PropertyInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/ReflectionMacro remove unused I_Property* macro modify all I_Method macro to accept the help string modify all I_Method macro to define a MethodInfo signature include/osgIntrospection/Reflector add the PropertyInserter in StdVectorReflector and StdListReflector add the PropertyRemover in the StdMapReflector include/osgIntrospection/StaticMethodInfo modify all StaticMethodInfo* to accept the help in parameter include/osgIntrospection/TypedMethodInfo modify all TypedMethodInfo* to accept the help in parameter include/osgIntrospection/TypedConstructorInfo modify all TypedConstructorInfo* to accept the help in parameter include/osgIntrospection/Type add the _briefHelp and _detailedHelp variable in the Type class "
2006-10-17 23:17:06 +08:00
D_ConstructorInfoType signature = addConstructor(new osgIntrospection::TypedConstructorInfo2<reflected_type, instance_creator_type, P0, P1>(params, briefHelp, detailedHelp)); sink(signature)
#define I_ConstructorWithDefaults3(A0, P0, N0, D0, A1, P1, N1, D1, A2, P2, N2, D2, signature, briefHelp, detailedHelp) \
params.clear(); \
params.push_back(new osgIntrospection::ParameterInfo(#N0, osgIntrospection::Reflection::getType(extended_typeid<P0>()), osgIntrospection::ParameterInfo::A0, osgIntrospection::Value(D0))); \
params.push_back(new osgIntrospection::ParameterInfo(#N1, osgIntrospection::Reflection::getType(extended_typeid<P1>()), osgIntrospection::ParameterInfo::A1, osgIntrospection::Value(D1))); \
params.push_back(new osgIntrospection::ParameterInfo(#N2, osgIntrospection::Reflection::getType(extended_typeid<P2>()), osgIntrospection::ParameterInfo::A2, osgIntrospection::Value(D2))); \
From David Callu: " the main problem is the wrapper generation: The PropertyInfo class use MethodInfo class to access to the value. When the property are define with the I_Property* macro, the MethodInfo use by the property to have access to the value are instancied in the I_Property* macro, but there are already instantied by the I_Method* macro before secondary problem: - the function used by the property could no be customized in the genwrapper.conf file - an array property can't insert a value - the std::map reflector (and indexedProperty in general) haven't remove method - about the help in wrapper ... why not ... solution : To use the function define by the I_Method, I add a MethodInfo variable in the I_Method0 macro old macro : #define I_Method0(ret, fn) (\ params.clear(),\ addMethod(new osgIntrospection::TypedMethodIn fo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params))) new macro : #define I_Method0(ret, fn, signature, briefHelp, detailedHelp) \ params.clear(); \ osgIntrospection::MethodInfo* signature = addMethod(new osgIntrospection::TypedMethodInfo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature) the osgIntrospection::MethodInfo* signature is used by the I_Property macro to define the MethodInfo that it use so for I_Property macro : old macro : #define I_PropertyWithReturnType(t, n, r) \ cap=addProperty(new osgIntrospection::PropertyInfo(osgIntrospection::Reflection::getType(typeid(reflected_type)), osgIntrospection::Reflection::getType(typeid(t)), #n, \ I_Method0(t, get##n), \ I_Method1(r, set##n, IN, t, value))) new macro: #define I_SimpleProperty(t, n, get, set) \ get, \ set)) The genwrapper has been modified in this way. The method signature is define by the prototype of the method For example, the "const char* libraryName();" have "__C5_char_P1__libraryName" for signature solution for secondary problem: The genwrapper accept new tokens in the configuration to custumize the property. The new PropertyInserter and the CustomPropertyInsertAttribute class has been defined The PropertyRemover has been added to the StdMapReflector The _briefHelp and _detailedHelp variable has been added in PropertyInfo, MethodInfo and ContructorInfo class modification: I have modify the genwrapper files Configuration.cpp Configuration.h add some tokens to custumize the property Doxyfile.template add the comment in the output xml genwrapper.conf customize some property in osg::Geometry RegistryBuilder.h RegistryBuilder.cpp add the process_help function (to extract help from xml) TypeRegister.cpp TypeRegister.h optimize the property detection TypeDesc.h TypeDesc.cpp modify FunctionDesc and PropertyDesc WrapperGenerator.h WrapperGenerator.cpp modify the output I also modify the fallowing osgIntrospection files: include/osgIntrospection/Attributes add the PropertyInserter and the CustomPropertyInsertAttribute class include/osgIntrospection/ConstructorInfo add the _briefHelp and _detailedHelp variable in the ConstructorInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/MethodInfo add the _briefHelp and _detailedHelp variable in the MethodInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/PropertyInfo add the _briefHelp and _detailedHelp variable in the PropertyInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/ReflectionMacro remove unused I_Property* macro modify all I_Method macro to accept the help string modify all I_Method macro to define a MethodInfo signature include/osgIntrospection/Reflector add the PropertyInserter in StdVectorReflector and StdListReflector add the PropertyRemover in the StdMapReflector include/osgIntrospection/StaticMethodInfo modify all StaticMethodInfo* to accept the help in parameter include/osgIntrospection/TypedMethodInfo modify all TypedMethodInfo* to accept the help in parameter include/osgIntrospection/TypedConstructorInfo modify all TypedConstructorInfo* to accept the help in parameter include/osgIntrospection/Type add the _briefHelp and _detailedHelp variable in the Type class "
2006-10-17 23:17:06 +08:00
D_ConstructorInfoType signature = addConstructor(new osgIntrospection::TypedConstructorInfo3<reflected_type, instance_creator_type, P0, P1, P2>(params, briefHelp, detailedHelp)); sink(signature)
#define I_ConstructorWithDefaults4(A0, P0, N0, D0, A1, P1, N1, D1, A2, P2, N2, D2, A3, P3, N3, D3, signature, briefHelp, detailedHelp) \
params.clear(); \
params.push_back(new osgIntrospection::ParameterInfo(#N0, osgIntrospection::Reflection::getType(extended_typeid<P0>()), osgIntrospection::ParameterInfo::A0, osgIntrospection::Value(D0))); \
params.push_back(new osgIntrospection::ParameterInfo(#N1, osgIntrospection::Reflection::getType(extended_typeid<P1>()), osgIntrospection::ParameterInfo::A1, osgIntrospection::Value(D1))); \
params.push_back(new osgIntrospection::ParameterInfo(#N2, osgIntrospection::Reflection::getType(extended_typeid<P2>()), osgIntrospection::ParameterInfo::A2, osgIntrospection::Value(D2))); \
params.push_back(new osgIntrospection::ParameterInfo(#N3, osgIntrospection::Reflection::getType(extended_typeid<P3>()), osgIntrospection::ParameterInfo::A3, osgIntrospection::Value(D3))); \
From David Callu: " the main problem is the wrapper generation: The PropertyInfo class use MethodInfo class to access to the value. When the property are define with the I_Property* macro, the MethodInfo use by the property to have access to the value are instancied in the I_Property* macro, but there are already instantied by the I_Method* macro before secondary problem: - the function used by the property could no be customized in the genwrapper.conf file - an array property can't insert a value - the std::map reflector (and indexedProperty in general) haven't remove method - about the help in wrapper ... why not ... solution : To use the function define by the I_Method, I add a MethodInfo variable in the I_Method0 macro old macro : #define I_Method0(ret, fn) (\ params.clear(),\ addMethod(new osgIntrospection::TypedMethodIn fo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params))) new macro : #define I_Method0(ret, fn, signature, briefHelp, detailedHelp) \ params.clear(); \ osgIntrospection::MethodInfo* signature = addMethod(new osgIntrospection::TypedMethodInfo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature) the osgIntrospection::MethodInfo* signature is used by the I_Property macro to define the MethodInfo that it use so for I_Property macro : old macro : #define I_PropertyWithReturnType(t, n, r) \ cap=addProperty(new osgIntrospection::PropertyInfo(osgIntrospection::Reflection::getType(typeid(reflected_type)), osgIntrospection::Reflection::getType(typeid(t)), #n, \ I_Method0(t, get##n), \ I_Method1(r, set##n, IN, t, value))) new macro: #define I_SimpleProperty(t, n, get, set) \ get, \ set)) The genwrapper has been modified in this way. The method signature is define by the prototype of the method For example, the "const char* libraryName();" have "__C5_char_P1__libraryName" for signature solution for secondary problem: The genwrapper accept new tokens in the configuration to custumize the property. The new PropertyInserter and the CustomPropertyInsertAttribute class has been defined The PropertyRemover has been added to the StdMapReflector The _briefHelp and _detailedHelp variable has been added in PropertyInfo, MethodInfo and ContructorInfo class modification: I have modify the genwrapper files Configuration.cpp Configuration.h add some tokens to custumize the property Doxyfile.template add the comment in the output xml genwrapper.conf customize some property in osg::Geometry RegistryBuilder.h RegistryBuilder.cpp add the process_help function (to extract help from xml) TypeRegister.cpp TypeRegister.h optimize the property detection TypeDesc.h TypeDesc.cpp modify FunctionDesc and PropertyDesc WrapperGenerator.h WrapperGenerator.cpp modify the output I also modify the fallowing osgIntrospection files: include/osgIntrospection/Attributes add the PropertyInserter and the CustomPropertyInsertAttribute class include/osgIntrospection/ConstructorInfo add the _briefHelp and _detailedHelp variable in the ConstructorInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/MethodInfo add the _briefHelp and _detailedHelp variable in the MethodInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/PropertyInfo add the _briefHelp and _detailedHelp variable in the PropertyInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/ReflectionMacro remove unused I_Property* macro modify all I_Method macro to accept the help string modify all I_Method macro to define a MethodInfo signature include/osgIntrospection/Reflector add the PropertyInserter in StdVectorReflector and StdListReflector add the PropertyRemover in the StdMapReflector include/osgIntrospection/StaticMethodInfo modify all StaticMethodInfo* to accept the help in parameter include/osgIntrospection/TypedMethodInfo modify all TypedMethodInfo* to accept the help in parameter include/osgIntrospection/TypedConstructorInfo modify all TypedConstructorInfo* to accept the help in parameter include/osgIntrospection/Type add the _briefHelp and _detailedHelp variable in the Type class "
2006-10-17 23:17:06 +08:00
D_ConstructorInfoType signature = addConstructor(new osgIntrospection::TypedConstructorInfo4<reflected_type, instance_creator_type, P0, P1, P2, P3>(params, briefHelp, detailedHelp)); sink(signature)
#define I_ConstructorWithDefaults5(A0, P0, N0, D0, A1, P1, N1, D1, A2, P2, N2, D2, A3, P3, N3, D3, A4, P4, N4, D4, signature, briefHelp, detailedHelp) \
params.clear(); \
params.push_back(new osgIntrospection::ParameterInfo(#N0, osgIntrospection::Reflection::getType(extended_typeid<P0>()), osgIntrospection::ParameterInfo::A0, osgIntrospection::Value(D0))); \
params.push_back(new osgIntrospection::ParameterInfo(#N1, osgIntrospection::Reflection::getType(extended_typeid<P1>()), osgIntrospection::ParameterInfo::A1, osgIntrospection::Value(D1))); \
params.push_back(new osgIntrospection::ParameterInfo(#N2, osgIntrospection::Reflection::getType(extended_typeid<P2>()), osgIntrospection::ParameterInfo::A2, osgIntrospection::Value(D2))); \
params.push_back(new osgIntrospection::ParameterInfo(#N3, osgIntrospection::Reflection::getType(extended_typeid<P3>()), osgIntrospection::ParameterInfo::A3, osgIntrospection::Value(D3))); \
params.push_back(new osgIntrospection::ParameterInfo(#N4, osgIntrospection::Reflection::getType(extended_typeid<P4>()), osgIntrospection::ParameterInfo::A4, osgIntrospection::Value(D4))); \
From David Callu: " the main problem is the wrapper generation: The PropertyInfo class use MethodInfo class to access to the value. When the property are define with the I_Property* macro, the MethodInfo use by the property to have access to the value are instancied in the I_Property* macro, but there are already instantied by the I_Method* macro before secondary problem: - the function used by the property could no be customized in the genwrapper.conf file - an array property can't insert a value - the std::map reflector (and indexedProperty in general) haven't remove method - about the help in wrapper ... why not ... solution : To use the function define by the I_Method, I add a MethodInfo variable in the I_Method0 macro old macro : #define I_Method0(ret, fn) (\ params.clear(),\ addMethod(new osgIntrospection::TypedMethodIn fo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params))) new macro : #define I_Method0(ret, fn, signature, briefHelp, detailedHelp) \ params.clear(); \ osgIntrospection::MethodInfo* signature = addMethod(new osgIntrospection::TypedMethodInfo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature) the osgIntrospection::MethodInfo* signature is used by the I_Property macro to define the MethodInfo that it use so for I_Property macro : old macro : #define I_PropertyWithReturnType(t, n, r) \ cap=addProperty(new osgIntrospection::PropertyInfo(osgIntrospection::Reflection::getType(typeid(reflected_type)), osgIntrospection::Reflection::getType(typeid(t)), #n, \ I_Method0(t, get##n), \ I_Method1(r, set##n, IN, t, value))) new macro: #define I_SimpleProperty(t, n, get, set) \ get, \ set)) The genwrapper has been modified in this way. The method signature is define by the prototype of the method For example, the "const char* libraryName();" have "__C5_char_P1__libraryName" for signature solution for secondary problem: The genwrapper accept new tokens in the configuration to custumize the property. The new PropertyInserter and the CustomPropertyInsertAttribute class has been defined The PropertyRemover has been added to the StdMapReflector The _briefHelp and _detailedHelp variable has been added in PropertyInfo, MethodInfo and ContructorInfo class modification: I have modify the genwrapper files Configuration.cpp Configuration.h add some tokens to custumize the property Doxyfile.template add the comment in the output xml genwrapper.conf customize some property in osg::Geometry RegistryBuilder.h RegistryBuilder.cpp add the process_help function (to extract help from xml) TypeRegister.cpp TypeRegister.h optimize the property detection TypeDesc.h TypeDesc.cpp modify FunctionDesc and PropertyDesc WrapperGenerator.h WrapperGenerator.cpp modify the output I also modify the fallowing osgIntrospection files: include/osgIntrospection/Attributes add the PropertyInserter and the CustomPropertyInsertAttribute class include/osgIntrospection/ConstructorInfo add the _briefHelp and _detailedHelp variable in the ConstructorInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/MethodInfo add the _briefHelp and _detailedHelp variable in the MethodInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/PropertyInfo add the _briefHelp and _detailedHelp variable in the PropertyInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/ReflectionMacro remove unused I_Property* macro modify all I_Method macro to accept the help string modify all I_Method macro to define a MethodInfo signature include/osgIntrospection/Reflector add the PropertyInserter in StdVectorReflector and StdListReflector add the PropertyRemover in the StdMapReflector include/osgIntrospection/StaticMethodInfo modify all StaticMethodInfo* to accept the help in parameter include/osgIntrospection/TypedMethodInfo modify all TypedMethodInfo* to accept the help in parameter include/osgIntrospection/TypedConstructorInfo modify all TypedConstructorInfo* to accept the help in parameter include/osgIntrospection/Type add the _briefHelp and _detailedHelp variable in the Type class "
2006-10-17 23:17:06 +08:00
D_ConstructorInfoType signature = addConstructor(new osgIntrospection::TypedConstructorInfo5<reflected_type, instance_creator_type, P0, P1, P2, P3, P4>(params, briefHelp, detailedHelp)); sink(signature)
#define I_ConstructorWithDefaults6(A0, P0, N0, D0, A1, P1, N1, D1, A2, P2, N2, D2, A3, P3, N3, D3, A4, P4, N4, D4, A5, P5, N5, D5, signature, briefHelp, detailedHelp) \
params.clear(); \
params.push_back(new osgIntrospection::ParameterInfo(#N0, osgIntrospection::Reflection::getType(extended_typeid<P0>()), osgIntrospection::ParameterInfo::A0, osgIntrospection::Value(D0))); \
params.push_back(new osgIntrospection::ParameterInfo(#N1, osgIntrospection::Reflection::getType(extended_typeid<P1>()), osgIntrospection::ParameterInfo::A1, osgIntrospection::Value(D1))); \
params.push_back(new osgIntrospection::ParameterInfo(#N2, osgIntrospection::Reflection::getType(extended_typeid<P2>()), osgIntrospection::ParameterInfo::A2, osgIntrospection::Value(D2))); \
params.push_back(new osgIntrospection::ParameterInfo(#N3, osgIntrospection::Reflection::getType(extended_typeid<P3>()), osgIntrospection::ParameterInfo::A3, osgIntrospection::Value(D3))); \
params.push_back(new osgIntrospection::ParameterInfo(#N4, osgIntrospection::Reflection::getType(extended_typeid<P4>()), osgIntrospection::ParameterInfo::A4, osgIntrospection::Value(D4))); \
params.push_back(new osgIntrospection::ParameterInfo(#N5, osgIntrospection::Reflection::getType(extended_typeid<P5>()), osgIntrospection::ParameterInfo::A5, osgIntrospection::Value(D5))); \
From David Callu: " the main problem is the wrapper generation: The PropertyInfo class use MethodInfo class to access to the value. When the property are define with the I_Property* macro, the MethodInfo use by the property to have access to the value are instancied in the I_Property* macro, but there are already instantied by the I_Method* macro before secondary problem: - the function used by the property could no be customized in the genwrapper.conf file - an array property can't insert a value - the std::map reflector (and indexedProperty in general) haven't remove method - about the help in wrapper ... why not ... solution : To use the function define by the I_Method, I add a MethodInfo variable in the I_Method0 macro old macro : #define I_Method0(ret, fn) (\ params.clear(),\ addMethod(new osgIntrospection::TypedMethodIn fo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params))) new macro : #define I_Method0(ret, fn, signature, briefHelp, detailedHelp) \ params.clear(); \ osgIntrospection::MethodInfo* signature = addMethod(new osgIntrospection::TypedMethodInfo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature) the osgIntrospection::MethodInfo* signature is used by the I_Property macro to define the MethodInfo that it use so for I_Property macro : old macro : #define I_PropertyWithReturnType(t, n, r) \ cap=addProperty(new osgIntrospection::PropertyInfo(osgIntrospection::Reflection::getType(typeid(reflected_type)), osgIntrospection::Reflection::getType(typeid(t)), #n, \ I_Method0(t, get##n), \ I_Method1(r, set##n, IN, t, value))) new macro: #define I_SimpleProperty(t, n, get, set) \ get, \ set)) The genwrapper has been modified in this way. The method signature is define by the prototype of the method For example, the "const char* libraryName();" have "__C5_char_P1__libraryName" for signature solution for secondary problem: The genwrapper accept new tokens in the configuration to custumize the property. The new PropertyInserter and the CustomPropertyInsertAttribute class has been defined The PropertyRemover has been added to the StdMapReflector The _briefHelp and _detailedHelp variable has been added in PropertyInfo, MethodInfo and ContructorInfo class modification: I have modify the genwrapper files Configuration.cpp Configuration.h add some tokens to custumize the property Doxyfile.template add the comment in the output xml genwrapper.conf customize some property in osg::Geometry RegistryBuilder.h RegistryBuilder.cpp add the process_help function (to extract help from xml) TypeRegister.cpp TypeRegister.h optimize the property detection TypeDesc.h TypeDesc.cpp modify FunctionDesc and PropertyDesc WrapperGenerator.h WrapperGenerator.cpp modify the output I also modify the fallowing osgIntrospection files: include/osgIntrospection/Attributes add the PropertyInserter and the CustomPropertyInsertAttribute class include/osgIntrospection/ConstructorInfo add the _briefHelp and _detailedHelp variable in the ConstructorInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/MethodInfo add the _briefHelp and _detailedHelp variable in the MethodInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/PropertyInfo add the _briefHelp and _detailedHelp variable in the PropertyInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/ReflectionMacro remove unused I_Property* macro modify all I_Method macro to accept the help string modify all I_Method macro to define a MethodInfo signature include/osgIntrospection/Reflector add the PropertyInserter in StdVectorReflector and StdListReflector add the PropertyRemover in the StdMapReflector include/osgIntrospection/StaticMethodInfo modify all StaticMethodInfo* to accept the help in parameter include/osgIntrospection/TypedMethodInfo modify all TypedMethodInfo* to accept the help in parameter include/osgIntrospection/TypedConstructorInfo modify all TypedConstructorInfo* to accept the help in parameter include/osgIntrospection/Type add the _briefHelp and _detailedHelp variable in the Type class "
2006-10-17 23:17:06 +08:00
D_ConstructorInfoType signature = addConstructor(new osgIntrospection::TypedConstructorInfo6<reflected_type, instance_creator_type, P0, P1, P2, P3, P4, P5>(params, briefHelp, detailedHelp)); sink(signature)
#define I_ConstructorWithDefaults7(A0, P0, N0, D0, A1, P1, N1, D1, A2, P2, N2, D2, A3, P3, N3, D3, A4, P4, N4, D4, A5, P5, N5, D5, A6, P6, N6, D6, signature, briefHelp, detailedHelp) \
params.clear(); \
params.push_back(new osgIntrospection::ParameterInfo(#N0, osgIntrospection::Reflection::getType(extended_typeid<P0>()), osgIntrospection::ParameterInfo::A0, osgIntrospection::Value(D0))); \
params.push_back(new osgIntrospection::ParameterInfo(#N1, osgIntrospection::Reflection::getType(extended_typeid<P1>()), osgIntrospection::ParameterInfo::A1, osgIntrospection::Value(D1))); \
params.push_back(new osgIntrospection::ParameterInfo(#N2, osgIntrospection::Reflection::getType(extended_typeid<P2>()), osgIntrospection::ParameterInfo::A2, osgIntrospection::Value(D2))); \
params.push_back(new osgIntrospection::ParameterInfo(#N3, osgIntrospection::Reflection::getType(extended_typeid<P3>()), osgIntrospection::ParameterInfo::A3, osgIntrospection::Value(D3))); \
params.push_back(new osgIntrospection::ParameterInfo(#N4, osgIntrospection::Reflection::getType(extended_typeid<P4>()), osgIntrospection::ParameterInfo::A4, osgIntrospection::Value(D4))); \
params.push_back(new osgIntrospection::ParameterInfo(#N5, osgIntrospection::Reflection::getType(extended_typeid<P5>()), osgIntrospection::ParameterInfo::A5, osgIntrospection::Value(D5))); \
params.push_back(new osgIntrospection::ParameterInfo(#N6, osgIntrospection::Reflection::getType(extended_typeid<P6>()), osgIntrospection::ParameterInfo::A6, osgIntrospection::Value(D6))); \
From David Callu: " the main problem is the wrapper generation: The PropertyInfo class use MethodInfo class to access to the value. When the property are define with the I_Property* macro, the MethodInfo use by the property to have access to the value are instancied in the I_Property* macro, but there are already instantied by the I_Method* macro before secondary problem: - the function used by the property could no be customized in the genwrapper.conf file - an array property can't insert a value - the std::map reflector (and indexedProperty in general) haven't remove method - about the help in wrapper ... why not ... solution : To use the function define by the I_Method, I add a MethodInfo variable in the I_Method0 macro old macro : #define I_Method0(ret, fn) (\ params.clear(),\ addMethod(new osgIntrospection::TypedMethodIn fo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params))) new macro : #define I_Method0(ret, fn, signature, briefHelp, detailedHelp) \ params.clear(); \ osgIntrospection::MethodInfo* signature = addMethod(new osgIntrospection::TypedMethodInfo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature) the osgIntrospection::MethodInfo* signature is used by the I_Property macro to define the MethodInfo that it use so for I_Property macro : old macro : #define I_PropertyWithReturnType(t, n, r) \ cap=addProperty(new osgIntrospection::PropertyInfo(osgIntrospection::Reflection::getType(typeid(reflected_type)), osgIntrospection::Reflection::getType(typeid(t)), #n, \ I_Method0(t, get##n), \ I_Method1(r, set##n, IN, t, value))) new macro: #define I_SimpleProperty(t, n, get, set) \ get, \ set)) The genwrapper has been modified in this way. The method signature is define by the prototype of the method For example, the "const char* libraryName();" have "__C5_char_P1__libraryName" for signature solution for secondary problem: The genwrapper accept new tokens in the configuration to custumize the property. The new PropertyInserter and the CustomPropertyInsertAttribute class has been defined The PropertyRemover has been added to the StdMapReflector The _briefHelp and _detailedHelp variable has been added in PropertyInfo, MethodInfo and ContructorInfo class modification: I have modify the genwrapper files Configuration.cpp Configuration.h add some tokens to custumize the property Doxyfile.template add the comment in the output xml genwrapper.conf customize some property in osg::Geometry RegistryBuilder.h RegistryBuilder.cpp add the process_help function (to extract help from xml) TypeRegister.cpp TypeRegister.h optimize the property detection TypeDesc.h TypeDesc.cpp modify FunctionDesc and PropertyDesc WrapperGenerator.h WrapperGenerator.cpp modify the output I also modify the fallowing osgIntrospection files: include/osgIntrospection/Attributes add the PropertyInserter and the CustomPropertyInsertAttribute class include/osgIntrospection/ConstructorInfo add the _briefHelp and _detailedHelp variable in the ConstructorInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/MethodInfo add the _briefHelp and _detailedHelp variable in the MethodInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/PropertyInfo add the _briefHelp and _detailedHelp variable in the PropertyInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/ReflectionMacro remove unused I_Property* macro modify all I_Method macro to accept the help string modify all I_Method macro to define a MethodInfo signature include/osgIntrospection/Reflector add the PropertyInserter in StdVectorReflector and StdListReflector add the PropertyRemover in the StdMapReflector include/osgIntrospection/StaticMethodInfo modify all StaticMethodInfo* to accept the help in parameter include/osgIntrospection/TypedMethodInfo modify all TypedMethodInfo* to accept the help in parameter include/osgIntrospection/TypedConstructorInfo modify all TypedConstructorInfo* to accept the help in parameter include/osgIntrospection/Type add the _briefHelp and _detailedHelp variable in the Type class "
2006-10-17 23:17:06 +08:00
D_ConstructorInfoType signature = addConstructor(new osgIntrospection::TypedConstructorInfo7<reflected_type, instance_creator_type, P0, P1, P2, P3, P4, P5, P6>(params, briefHelp, detailedHelp)); sink(signature)
#define I_ConstructorWithDefaults8(A0, P0, N0, D0, A1, P1, N1, D1, A2, P2, N2, D2, A3, P3, N3, D3, A4, P4, N4, D4, A5, P5, N5, D5, A6, P6, N6, D6, A7, P7, N7, D7, signature, briefHelp, detailedHelp) \
params.clear(); \
params.push_back(new osgIntrospection::ParameterInfo(#N0, osgIntrospection::Reflection::getType(extended_typeid<P0>()), osgIntrospection::ParameterInfo::A0, osgIntrospection::Value(D0))); \
params.push_back(new osgIntrospection::ParameterInfo(#N1, osgIntrospection::Reflection::getType(extended_typeid<P1>()), osgIntrospection::ParameterInfo::A1, osgIntrospection::Value(D1))); \
params.push_back(new osgIntrospection::ParameterInfo(#N2, osgIntrospection::Reflection::getType(extended_typeid<P2>()), osgIntrospection::ParameterInfo::A2, osgIntrospection::Value(D2))); \
params.push_back(new osgIntrospection::ParameterInfo(#N3, osgIntrospection::Reflection::getType(extended_typeid<P3>()), osgIntrospection::ParameterInfo::A3, osgIntrospection::Value(D3))); \
params.push_back(new osgIntrospection::ParameterInfo(#N4, osgIntrospection::Reflection::getType(extended_typeid<P4>()), osgIntrospection::ParameterInfo::A4, osgIntrospection::Value(D4))); \
params.push_back(new osgIntrospection::ParameterInfo(#N5, osgIntrospection::Reflection::getType(extended_typeid<P5>()), osgIntrospection::ParameterInfo::A5, osgIntrospection::Value(D5))); \
params.push_back(new osgIntrospection::ParameterInfo(#N6, osgIntrospection::Reflection::getType(extended_typeid<P6>()), osgIntrospection::ParameterInfo::A6, osgIntrospection::Value(D6))); \
params.push_back(new osgIntrospection::ParameterInfo(#N7, osgIntrospection::Reflection::getType(extended_typeid<P7>()), osgIntrospection::ParameterInfo::A7, osgIntrospection::Value(D7))); \
From David Callu: " the main problem is the wrapper generation: The PropertyInfo class use MethodInfo class to access to the value. When the property are define with the I_Property* macro, the MethodInfo use by the property to have access to the value are instancied in the I_Property* macro, but there are already instantied by the I_Method* macro before secondary problem: - the function used by the property could no be customized in the genwrapper.conf file - an array property can't insert a value - the std::map reflector (and indexedProperty in general) haven't remove method - about the help in wrapper ... why not ... solution : To use the function define by the I_Method, I add a MethodInfo variable in the I_Method0 macro old macro : #define I_Method0(ret, fn) (\ params.clear(),\ addMethod(new osgIntrospection::TypedMethodIn fo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params))) new macro : #define I_Method0(ret, fn, signature, briefHelp, detailedHelp) \ params.clear(); \ osgIntrospection::MethodInfo* signature = addMethod(new osgIntrospection::TypedMethodInfo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature) the osgIntrospection::MethodInfo* signature is used by the I_Property macro to define the MethodInfo that it use so for I_Property macro : old macro : #define I_PropertyWithReturnType(t, n, r) \ cap=addProperty(new osgIntrospection::PropertyInfo(osgIntrospection::Reflection::getType(typeid(reflected_type)), osgIntrospection::Reflection::getType(typeid(t)), #n, \ I_Method0(t, get##n), \ I_Method1(r, set##n, IN, t, value))) new macro: #define I_SimpleProperty(t, n, get, set) \ get, \ set)) The genwrapper has been modified in this way. The method signature is define by the prototype of the method For example, the "const char* libraryName();" have "__C5_char_P1__libraryName" for signature solution for secondary problem: The genwrapper accept new tokens in the configuration to custumize the property. The new PropertyInserter and the CustomPropertyInsertAttribute class has been defined The PropertyRemover has been added to the StdMapReflector The _briefHelp and _detailedHelp variable has been added in PropertyInfo, MethodInfo and ContructorInfo class modification: I have modify the genwrapper files Configuration.cpp Configuration.h add some tokens to custumize the property Doxyfile.template add the comment in the output xml genwrapper.conf customize some property in osg::Geometry RegistryBuilder.h RegistryBuilder.cpp add the process_help function (to extract help from xml) TypeRegister.cpp TypeRegister.h optimize the property detection TypeDesc.h TypeDesc.cpp modify FunctionDesc and PropertyDesc WrapperGenerator.h WrapperGenerator.cpp modify the output I also modify the fallowing osgIntrospection files: include/osgIntrospection/Attributes add the PropertyInserter and the CustomPropertyInsertAttribute class include/osgIntrospection/ConstructorInfo add the _briefHelp and _detailedHelp variable in the ConstructorInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/MethodInfo add the _briefHelp and _detailedHelp variable in the MethodInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/PropertyInfo add the _briefHelp and _detailedHelp variable in the PropertyInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/ReflectionMacro remove unused I_Property* macro modify all I_Method macro to accept the help string modify all I_Method macro to define a MethodInfo signature include/osgIntrospection/Reflector add the PropertyInserter in StdVectorReflector and StdListReflector add the PropertyRemover in the StdMapReflector include/osgIntrospection/StaticMethodInfo modify all StaticMethodInfo* to accept the help in parameter include/osgIntrospection/TypedMethodInfo modify all TypedMethodInfo* to accept the help in parameter include/osgIntrospection/TypedConstructorInfo modify all TypedConstructorInfo* to accept the help in parameter include/osgIntrospection/Type add the _briefHelp and _detailedHelp variable in the Type class "
2006-10-17 23:17:06 +08:00
D_ConstructorInfoType signature = addConstructor(new osgIntrospection::TypedConstructorInfo8<reflected_type, instance_creator_type, P0, P1, P2, P3, P4, P5, P6, P7>(params, briefHelp, detailedHelp)); sink(signature)
#define I_ConstructorWithDefaults9(A0, P0, N0, D0, A1, P1, N1, D1, A2, P2, N2, D2, A3, P3, N3, D3, A4, P4, N4, D4, A5, P5, N5, D5, A6, P6, N6, D6, A7, P7, N7, D7, A8, P8, N8, D8, signature, briefHelp, detailedHelp) \
params.clear(); \
params.push_back(new osgIntrospection::ParameterInfo(#N0, osgIntrospection::Reflection::getType(extended_typeid<P0>()), osgIntrospection::ParameterInfo::A0, osgIntrospection::Value(D0))); \
params.push_back(new osgIntrospection::ParameterInfo(#N1, osgIntrospection::Reflection::getType(extended_typeid<P1>()), osgIntrospection::ParameterInfo::A1, osgIntrospection::Value(D1))); \
params.push_back(new osgIntrospection::ParameterInfo(#N2, osgIntrospection::Reflection::getType(extended_typeid<P2>()), osgIntrospection::ParameterInfo::A2, osgIntrospection::Value(D2))); \
params.push_back(new osgIntrospection::ParameterInfo(#N3, osgIntrospection::Reflection::getType(extended_typeid<P3>()), osgIntrospection::ParameterInfo::A3, osgIntrospection::Value(D3))); \
params.push_back(new osgIntrospection::ParameterInfo(#N4, osgIntrospection::Reflection::getType(extended_typeid<P4>()), osgIntrospection::ParameterInfo::A4, osgIntrospection::Value(D4))); \
params.push_back(new osgIntrospection::ParameterInfo(#N5, osgIntrospection::Reflection::getType(extended_typeid<P5>()), osgIntrospection::ParameterInfo::A5, osgIntrospection::Value(D5))); \
params.push_back(new osgIntrospection::ParameterInfo(#N6, osgIntrospection::Reflection::getType(extended_typeid<P6>()), osgIntrospection::ParameterInfo::A6, osgIntrospection::Value(D6))); \
params.push_back(new osgIntrospection::ParameterInfo(#N7, osgIntrospection::Reflection::getType(extended_typeid<P7>()), osgIntrospection::ParameterInfo::A7, osgIntrospection::Value(D7))); \
params.push_back(new osgIntrospection::ParameterInfo(#N8, osgIntrospection::Reflection::getType(extended_typeid<P8>()), osgIntrospection::ParameterInfo::A8, osgIntrospection::Value(D8))); \
From David Callu: " the main problem is the wrapper generation: The PropertyInfo class use MethodInfo class to access to the value. When the property are define with the I_Property* macro, the MethodInfo use by the property to have access to the value are instancied in the I_Property* macro, but there are already instantied by the I_Method* macro before secondary problem: - the function used by the property could no be customized in the genwrapper.conf file - an array property can't insert a value - the std::map reflector (and indexedProperty in general) haven't remove method - about the help in wrapper ... why not ... solution : To use the function define by the I_Method, I add a MethodInfo variable in the I_Method0 macro old macro : #define I_Method0(ret, fn) (\ params.clear(),\ addMethod(new osgIntrospection::TypedMethodIn fo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params))) new macro : #define I_Method0(ret, fn, signature, briefHelp, detailedHelp) \ params.clear(); \ osgIntrospection::MethodInfo* signature = addMethod(new osgIntrospection::TypedMethodInfo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature) the osgIntrospection::MethodInfo* signature is used by the I_Property macro to define the MethodInfo that it use so for I_Property macro : old macro : #define I_PropertyWithReturnType(t, n, r) \ cap=addProperty(new osgIntrospection::PropertyInfo(osgIntrospection::Reflection::getType(typeid(reflected_type)), osgIntrospection::Reflection::getType(typeid(t)), #n, \ I_Method0(t, get##n), \ I_Method1(r, set##n, IN, t, value))) new macro: #define I_SimpleProperty(t, n, get, set) \ get, \ set)) The genwrapper has been modified in this way. The method signature is define by the prototype of the method For example, the "const char* libraryName();" have "__C5_char_P1__libraryName" for signature solution for secondary problem: The genwrapper accept new tokens in the configuration to custumize the property. The new PropertyInserter and the CustomPropertyInsertAttribute class has been defined The PropertyRemover has been added to the StdMapReflector The _briefHelp and _detailedHelp variable has been added in PropertyInfo, MethodInfo and ContructorInfo class modification: I have modify the genwrapper files Configuration.cpp Configuration.h add some tokens to custumize the property Doxyfile.template add the comment in the output xml genwrapper.conf customize some property in osg::Geometry RegistryBuilder.h RegistryBuilder.cpp add the process_help function (to extract help from xml) TypeRegister.cpp TypeRegister.h optimize the property detection TypeDesc.h TypeDesc.cpp modify FunctionDesc and PropertyDesc WrapperGenerator.h WrapperGenerator.cpp modify the output I also modify the fallowing osgIntrospection files: include/osgIntrospection/Attributes add the PropertyInserter and the CustomPropertyInsertAttribute class include/osgIntrospection/ConstructorInfo add the _briefHelp and _detailedHelp variable in the ConstructorInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/MethodInfo add the _briefHelp and _detailedHelp variable in the MethodInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/PropertyInfo add the _briefHelp and _detailedHelp variable in the PropertyInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/ReflectionMacro remove unused I_Property* macro modify all I_Method macro to accept the help string modify all I_Method macro to define a MethodInfo signature include/osgIntrospection/Reflector add the PropertyInserter in StdVectorReflector and StdListReflector add the PropertyRemover in the StdMapReflector include/osgIntrospection/StaticMethodInfo modify all StaticMethodInfo* to accept the help in parameter include/osgIntrospection/TypedMethodInfo modify all TypedMethodInfo* to accept the help in parameter include/osgIntrospection/TypedConstructorInfo modify all TypedConstructorInfo* to accept the help in parameter include/osgIntrospection/Type add the _briefHelp and _detailedHelp variable in the Type class "
2006-10-17 23:17:06 +08:00
D_ConstructorInfoType signature = addConstructor(new osgIntrospection::TypedConstructorInfo9<reflected_type, instance_creator_type, P0, P1, P2, P3, P4, P5, P6, P7, P8>(params, briefHelp, detailedHelp)); sink(signature)
#define I_ConstructorWithDefaults10(A0, P0, N0, D0, A1, P1, N1, D1, A2, P2, N2, D2, A3, P3, N3, D3, A4, P4, N4, D4, A5, P5, N5, D5, A6, P6, N6, D6, A7, P7, N7, D7, A8, P8, N8, D8, A9, P9, N9, D9, signature, briefHelp, detailedHelp) \
params.clear(); \
params.push_back(new osgIntrospection::ParameterInfo(#N0, osgIntrospection::Reflection::getType(extended_typeid<P0>()), osgIntrospection::ParameterInfo::A0, osgIntrospection::Value(D0))); \
params.push_back(new osgIntrospection::ParameterInfo(#N1, osgIntrospection::Reflection::getType(extended_typeid<P1>()), osgIntrospection::ParameterInfo::A1, osgIntrospection::Value(D1))); \
params.push_back(new osgIntrospection::ParameterInfo(#N2, osgIntrospection::Reflection::getType(extended_typeid<P2>()), osgIntrospection::ParameterInfo::A2, osgIntrospection::Value(D2))); \
params.push_back(new osgIntrospection::ParameterInfo(#N3, osgIntrospection::Reflection::getType(extended_typeid<P3>()), osgIntrospection::ParameterInfo::A3, osgIntrospection::Value(D3))); \
params.push_back(new osgIntrospection::ParameterInfo(#N4, osgIntrospection::Reflection::getType(extended_typeid<P4>()), osgIntrospection::ParameterInfo::A4, osgIntrospection::Value(D4))); \
params.push_back(new osgIntrospection::ParameterInfo(#N5, osgIntrospection::Reflection::getType(extended_typeid<P5>()), osgIntrospection::ParameterInfo::A5, osgIntrospection::Value(D5))); \
params.push_back(new osgIntrospection::ParameterInfo(#N6, osgIntrospection::Reflection::getType(extended_typeid<P6>()), osgIntrospection::ParameterInfo::A6, osgIntrospection::Value(D6))); \
params.push_back(new osgIntrospection::ParameterInfo(#N7, osgIntrospection::Reflection::getType(extended_typeid<P7>()), osgIntrospection::ParameterInfo::A7, osgIntrospection::Value(D7))); \
params.push_back(new osgIntrospection::ParameterInfo(#N8, osgIntrospection::Reflection::getType(extended_typeid<P8>()), osgIntrospection::ParameterInfo::A8, osgIntrospection::Value(D8))); \
params.push_back(new osgIntrospection::ParameterInfo(#N9, osgIntrospection::Reflection::getType(extended_typeid<P9>()), osgIntrospection::ParameterInfo::A9, osgIntrospection::Value(D9))); \
From David Callu: " the main problem is the wrapper generation: The PropertyInfo class use MethodInfo class to access to the value. When the property are define with the I_Property* macro, the MethodInfo use by the property to have access to the value are instancied in the I_Property* macro, but there are already instantied by the I_Method* macro before secondary problem: - the function used by the property could no be customized in the genwrapper.conf file - an array property can't insert a value - the std::map reflector (and indexedProperty in general) haven't remove method - about the help in wrapper ... why not ... solution : To use the function define by the I_Method, I add a MethodInfo variable in the I_Method0 macro old macro : #define I_Method0(ret, fn) (\ params.clear(),\ addMethod(new osgIntrospection::TypedMethodIn fo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params))) new macro : #define I_Method0(ret, fn, signature, briefHelp, detailedHelp) \ params.clear(); \ osgIntrospection::MethodInfo* signature = addMethod(new osgIntrospection::TypedMethodInfo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature) the osgIntrospection::MethodInfo* signature is used by the I_Property macro to define the MethodInfo that it use so for I_Property macro : old macro : #define I_PropertyWithReturnType(t, n, r) \ cap=addProperty(new osgIntrospection::PropertyInfo(osgIntrospection::Reflection::getType(typeid(reflected_type)), osgIntrospection::Reflection::getType(typeid(t)), #n, \ I_Method0(t, get##n), \ I_Method1(r, set##n, IN, t, value))) new macro: #define I_SimpleProperty(t, n, get, set) \ get, \ set)) The genwrapper has been modified in this way. The method signature is define by the prototype of the method For example, the "const char* libraryName();" have "__C5_char_P1__libraryName" for signature solution for secondary problem: The genwrapper accept new tokens in the configuration to custumize the property. The new PropertyInserter and the CustomPropertyInsertAttribute class has been defined The PropertyRemover has been added to the StdMapReflector The _briefHelp and _detailedHelp variable has been added in PropertyInfo, MethodInfo and ContructorInfo class modification: I have modify the genwrapper files Configuration.cpp Configuration.h add some tokens to custumize the property Doxyfile.template add the comment in the output xml genwrapper.conf customize some property in osg::Geometry RegistryBuilder.h RegistryBuilder.cpp add the process_help function (to extract help from xml) TypeRegister.cpp TypeRegister.h optimize the property detection TypeDesc.h TypeDesc.cpp modify FunctionDesc and PropertyDesc WrapperGenerator.h WrapperGenerator.cpp modify the output I also modify the fallowing osgIntrospection files: include/osgIntrospection/Attributes add the PropertyInserter and the CustomPropertyInsertAttribute class include/osgIntrospection/ConstructorInfo add the _briefHelp and _detailedHelp variable in the ConstructorInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/MethodInfo add the _briefHelp and _detailedHelp variable in the MethodInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/PropertyInfo add the _briefHelp and _detailedHelp variable in the PropertyInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/ReflectionMacro remove unused I_Property* macro modify all I_Method macro to accept the help string modify all I_Method macro to define a MethodInfo signature include/osgIntrospection/Reflector add the PropertyInserter in StdVectorReflector and StdListReflector add the PropertyRemover in the StdMapReflector include/osgIntrospection/StaticMethodInfo modify all StaticMethodInfo* to accept the help in parameter include/osgIntrospection/TypedMethodInfo modify all TypedMethodInfo* to accept the help in parameter include/osgIntrospection/TypedConstructorInfo modify all TypedConstructorInfo* to accept the help in parameter include/osgIntrospection/Type add the _briefHelp and _detailedHelp variable in the Type class "
2006-10-17 23:17:06 +08:00
D_ConstructorInfoType signature = addConstructor(new osgIntrospection::TypedConstructorInfo10<reflected_type, instance_creator_type, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9>(params, briefHelp, detailedHelp)); sink(signature)
#define I_ConstructorWithDefaults11(A0, P0, N0, D0, A1, P1, N1, D1, A2, P2, N2, D2, A3, P3, N3, D3, A4, P4, N4, D4, A5, P5, N5, D5, A6, P6, N6, D6, A7, P7, N7, D7, A8, P8, N8, D8, A9, P9, N9, D9, A10, P10, N10, D10, signature, briefHelp, detailedHelp) \
params.clear(); \
params.push_back(new osgIntrospection::ParameterInfo(#N0, osgIntrospection::Reflection::getType(extended_typeid<P0>()), osgIntrospection::ParameterInfo::A0, osgIntrospection::Value(D0))); \
params.push_back(new osgIntrospection::ParameterInfo(#N1, osgIntrospection::Reflection::getType(extended_typeid<P1>()), osgIntrospection::ParameterInfo::A1, osgIntrospection::Value(D1))); \
params.push_back(new osgIntrospection::ParameterInfo(#N2, osgIntrospection::Reflection::getType(extended_typeid<P2>()), osgIntrospection::ParameterInfo::A2, osgIntrospection::Value(D2))); \
params.push_back(new osgIntrospection::ParameterInfo(#N3, osgIntrospection::Reflection::getType(extended_typeid<P3>()), osgIntrospection::ParameterInfo::A3, osgIntrospection::Value(D3))); \
params.push_back(new osgIntrospection::ParameterInfo(#N4, osgIntrospection::Reflection::getType(extended_typeid<P4>()), osgIntrospection::ParameterInfo::A4, osgIntrospection::Value(D4))); \
params.push_back(new osgIntrospection::ParameterInfo(#N5, osgIntrospection::Reflection::getType(extended_typeid<P5>()), osgIntrospection::ParameterInfo::A5, osgIntrospection::Value(D5))); \
params.push_back(new osgIntrospection::ParameterInfo(#N6, osgIntrospection::Reflection::getType(extended_typeid<P6>()), osgIntrospection::ParameterInfo::A6, osgIntrospection::Value(D6))); \
params.push_back(new osgIntrospection::ParameterInfo(#N7, osgIntrospection::Reflection::getType(extended_typeid<P7>()), osgIntrospection::ParameterInfo::A7, osgIntrospection::Value(D7))); \
params.push_back(new osgIntrospection::ParameterInfo(#N8, osgIntrospection::Reflection::getType(extended_typeid<P8>()), osgIntrospection::ParameterInfo::A8, osgIntrospection::Value(D8))); \
params.push_back(new osgIntrospection::ParameterInfo(#N9, osgIntrospection::Reflection::getType(extended_typeid<P9>()), osgIntrospection::ParameterInfo::A9, osgIntrospection::Value(D9))); \
params.push_back(new osgIntrospection::ParameterInfo(#N10, osgIntrospection::Reflection::getType(extended_typeid<P10>()), osgIntrospection::ParameterInfo::A10, osgIntrospection::Value(D10))); \
From David Callu: " the main problem is the wrapper generation: The PropertyInfo class use MethodInfo class to access to the value. When the property are define with the I_Property* macro, the MethodInfo use by the property to have access to the value are instancied in the I_Property* macro, but there are already instantied by the I_Method* macro before secondary problem: - the function used by the property could no be customized in the genwrapper.conf file - an array property can't insert a value - the std::map reflector (and indexedProperty in general) haven't remove method - about the help in wrapper ... why not ... solution : To use the function define by the I_Method, I add a MethodInfo variable in the I_Method0 macro old macro : #define I_Method0(ret, fn) (\ params.clear(),\ addMethod(new osgIntrospection::TypedMethodIn fo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params))) new macro : #define I_Method0(ret, fn, signature, briefHelp, detailedHelp) \ params.clear(); \ osgIntrospection::MethodInfo* signature = addMethod(new osgIntrospection::TypedMethodInfo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature) the osgIntrospection::MethodInfo* signature is used by the I_Property macro to define the MethodInfo that it use so for I_Property macro : old macro : #define I_PropertyWithReturnType(t, n, r) \ cap=addProperty(new osgIntrospection::PropertyInfo(osgIntrospection::Reflection::getType(typeid(reflected_type)), osgIntrospection::Reflection::getType(typeid(t)), #n, \ I_Method0(t, get##n), \ I_Method1(r, set##n, IN, t, value))) new macro: #define I_SimpleProperty(t, n, get, set) \ get, \ set)) The genwrapper has been modified in this way. The method signature is define by the prototype of the method For example, the "const char* libraryName();" have "__C5_char_P1__libraryName" for signature solution for secondary problem: The genwrapper accept new tokens in the configuration to custumize the property. The new PropertyInserter and the CustomPropertyInsertAttribute class has been defined The PropertyRemover has been added to the StdMapReflector The _briefHelp and _detailedHelp variable has been added in PropertyInfo, MethodInfo and ContructorInfo class modification: I have modify the genwrapper files Configuration.cpp Configuration.h add some tokens to custumize the property Doxyfile.template add the comment in the output xml genwrapper.conf customize some property in osg::Geometry RegistryBuilder.h RegistryBuilder.cpp add the process_help function (to extract help from xml) TypeRegister.cpp TypeRegister.h optimize the property detection TypeDesc.h TypeDesc.cpp modify FunctionDesc and PropertyDesc WrapperGenerator.h WrapperGenerator.cpp modify the output I also modify the fallowing osgIntrospection files: include/osgIntrospection/Attributes add the PropertyInserter and the CustomPropertyInsertAttribute class include/osgIntrospection/ConstructorInfo add the _briefHelp and _detailedHelp variable in the ConstructorInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/MethodInfo add the _briefHelp and _detailedHelp variable in the MethodInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/PropertyInfo add the _briefHelp and _detailedHelp variable in the PropertyInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/ReflectionMacro remove unused I_Property* macro modify all I_Method macro to accept the help string modify all I_Method macro to define a MethodInfo signature include/osgIntrospection/Reflector add the PropertyInserter in StdVectorReflector and StdListReflector add the PropertyRemover in the StdMapReflector include/osgIntrospection/StaticMethodInfo modify all StaticMethodInfo* to accept the help in parameter include/osgIntrospection/TypedMethodInfo modify all TypedMethodInfo* to accept the help in parameter include/osgIntrospection/TypedConstructorInfo modify all TypedConstructorInfo* to accept the help in parameter include/osgIntrospection/Type add the _briefHelp and _detailedHelp variable in the Type class "
2006-10-17 23:17:06 +08:00
D_ConstructorInfoType signature = addConstructor(new osgIntrospection::TypedConstructorInfo11<reflected_type, instance_creator_type, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10>(params, briefHelp, detailedHelp)); sink(signature)
#define I_ConstructorWithDefaults12(A0, P0, N0, D0, A1, P1, N1, D1, A2, P2, N2, D2, A3, P3, N3, D3, A4, P4, N4, D4, A5, P5, N5, D5, A6, P6, N6, D6, A7, P7, N7, D7, A8, P8, N8, D8, A9, P9, N9, D9, A10, P10, N10, D10, A11, P11, N11, D11, signature, briefHelp, detailedHelp) \
params.clear(); \
params.push_back(new osgIntrospection::ParameterInfo(#N0, osgIntrospection::Reflection::getType(extended_typeid<P0>()), osgIntrospection::ParameterInfo::A0, osgIntrospection::Value(D0))); \
params.push_back(new osgIntrospection::ParameterInfo(#N1, osgIntrospection::Reflection::getType(extended_typeid<P1>()), osgIntrospection::ParameterInfo::A1, osgIntrospection::Value(D1))); \
params.push_back(new osgIntrospection::ParameterInfo(#N2, osgIntrospection::Reflection::getType(extended_typeid<P2>()), osgIntrospection::ParameterInfo::A2, osgIntrospection::Value(D2))); \
params.push_back(new osgIntrospection::ParameterInfo(#N3, osgIntrospection::Reflection::getType(extended_typeid<P3>()), osgIntrospection::ParameterInfo::A3, osgIntrospection::Value(D3))); \
params.push_back(new osgIntrospection::ParameterInfo(#N4, osgIntrospection::Reflection::getType(extended_typeid<P4>()), osgIntrospection::ParameterInfo::A4, osgIntrospection::Value(D4))); \
params.push_back(new osgIntrospection::ParameterInfo(#N5, osgIntrospection::Reflection::getType(extended_typeid<P5>()), osgIntrospection::ParameterInfo::A5, osgIntrospection::Value(D5))); \
params.push_back(new osgIntrospection::ParameterInfo(#N6, osgIntrospection::Reflection::getType(extended_typeid<P6>()), osgIntrospection::ParameterInfo::A6, osgIntrospection::Value(D6))); \
params.push_back(new osgIntrospection::ParameterInfo(#N7, osgIntrospection::Reflection::getType(extended_typeid<P7>()), osgIntrospection::ParameterInfo::A7, osgIntrospection::Value(D7))); \
params.push_back(new osgIntrospection::ParameterInfo(#N8, osgIntrospection::Reflection::getType(extended_typeid<P8>()), osgIntrospection::ParameterInfo::A8, osgIntrospection::Value(D8))); \
params.push_back(new osgIntrospection::ParameterInfo(#N9, osgIntrospection::Reflection::getType(extended_typeid<P9>()), osgIntrospection::ParameterInfo::A9, osgIntrospection::Value(D9))); \
params.push_back(new osgIntrospection::ParameterInfo(#N10, osgIntrospection::Reflection::getType(extended_typeid<P10>()), osgIntrospection::ParameterInfo::A10, osgIntrospection::Value(D10))); \
params.push_back(new osgIntrospection::ParameterInfo(#N11, osgIntrospection::Reflection::getType(extended_typeid<P11>()), osgIntrospection::ParameterInfo::A11, osgIntrospection::Value(D11))); \
From David Callu: " the main problem is the wrapper generation: The PropertyInfo class use MethodInfo class to access to the value. When the property are define with the I_Property* macro, the MethodInfo use by the property to have access to the value are instancied in the I_Property* macro, but there are already instantied by the I_Method* macro before secondary problem: - the function used by the property could no be customized in the genwrapper.conf file - an array property can't insert a value - the std::map reflector (and indexedProperty in general) haven't remove method - about the help in wrapper ... why not ... solution : To use the function define by the I_Method, I add a MethodInfo variable in the I_Method0 macro old macro : #define I_Method0(ret, fn) (\ params.clear(),\ addMethod(new osgIntrospection::TypedMethodIn fo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params))) new macro : #define I_Method0(ret, fn, signature, briefHelp, detailedHelp) \ params.clear(); \ osgIntrospection::MethodInfo* signature = addMethod(new osgIntrospection::TypedMethodInfo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature) the osgIntrospection::MethodInfo* signature is used by the I_Property macro to define the MethodInfo that it use so for I_Property macro : old macro : #define I_PropertyWithReturnType(t, n, r) \ cap=addProperty(new osgIntrospection::PropertyInfo(osgIntrospection::Reflection::getType(typeid(reflected_type)), osgIntrospection::Reflection::getType(typeid(t)), #n, \ I_Method0(t, get##n), \ I_Method1(r, set##n, IN, t, value))) new macro: #define I_SimpleProperty(t, n, get, set) \ get, \ set)) The genwrapper has been modified in this way. The method signature is define by the prototype of the method For example, the "const char* libraryName();" have "__C5_char_P1__libraryName" for signature solution for secondary problem: The genwrapper accept new tokens in the configuration to custumize the property. The new PropertyInserter and the CustomPropertyInsertAttribute class has been defined The PropertyRemover has been added to the StdMapReflector The _briefHelp and _detailedHelp variable has been added in PropertyInfo, MethodInfo and ContructorInfo class modification: I have modify the genwrapper files Configuration.cpp Configuration.h add some tokens to custumize the property Doxyfile.template add the comment in the output xml genwrapper.conf customize some property in osg::Geometry RegistryBuilder.h RegistryBuilder.cpp add the process_help function (to extract help from xml) TypeRegister.cpp TypeRegister.h optimize the property detection TypeDesc.h TypeDesc.cpp modify FunctionDesc and PropertyDesc WrapperGenerator.h WrapperGenerator.cpp modify the output I also modify the fallowing osgIntrospection files: include/osgIntrospection/Attributes add the PropertyInserter and the CustomPropertyInsertAttribute class include/osgIntrospection/ConstructorInfo add the _briefHelp and _detailedHelp variable in the ConstructorInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/MethodInfo add the _briefHelp and _detailedHelp variable in the MethodInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/PropertyInfo add the _briefHelp and _detailedHelp variable in the PropertyInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/ReflectionMacro remove unused I_Property* macro modify all I_Method macro to accept the help string modify all I_Method macro to define a MethodInfo signature include/osgIntrospection/Reflector add the PropertyInserter in StdVectorReflector and StdListReflector add the PropertyRemover in the StdMapReflector include/osgIntrospection/StaticMethodInfo modify all StaticMethodInfo* to accept the help in parameter include/osgIntrospection/TypedMethodInfo modify all TypedMethodInfo* to accept the help in parameter include/osgIntrospection/TypedConstructorInfo modify all TypedConstructorInfo* to accept the help in parameter include/osgIntrospection/Type add the _briefHelp and _detailedHelp variable in the Type class "
2006-10-17 23:17:06 +08:00
D_ConstructorInfoType signature = addConstructor(new osgIntrospection::TypedConstructorInfo12<reflected_type, instance_creator_type, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11>(params, briefHelp, detailedHelp)); sink(signature)
#define I_ConstructorWithDefaults13(A0, P0, N0, D0, A1, P1, N1, D1, A2, P2, N2, D2, A3, P3, N3, D3, A4, P4, N4, D4, A5, P5, N5, D5, A6, P6, N6, D6, A7, P7, N7, D7, A8, P8, N8, D8, A9, P9, N9, D9, A10, P10, N10, D10, A11, P11, N11, D11, A12, P12, N12, D12, signature, briefHelp, detailedHelp) \
params.clear(); \
params.push_back(new osgIntrospection::ParameterInfo(#N0, osgIntrospection::Reflection::getType(extended_typeid<P0>()), osgIntrospection::ParameterInfo::A0, osgIntrospection::Value(D0))); \
params.push_back(new osgIntrospection::ParameterInfo(#N1, osgIntrospection::Reflection::getType(extended_typeid<P1>()), osgIntrospection::ParameterInfo::A1, osgIntrospection::Value(D1))); \
params.push_back(new osgIntrospection::ParameterInfo(#N2, osgIntrospection::Reflection::getType(extended_typeid<P2>()), osgIntrospection::ParameterInfo::A2, osgIntrospection::Value(D2))); \
params.push_back(new osgIntrospection::ParameterInfo(#N3, osgIntrospection::Reflection::getType(extended_typeid<P3>()), osgIntrospection::ParameterInfo::A3, osgIntrospection::Value(D3))); \
params.push_back(new osgIntrospection::ParameterInfo(#N4, osgIntrospection::Reflection::getType(extended_typeid<P4>()), osgIntrospection::ParameterInfo::A4, osgIntrospection::Value(D4))); \
params.push_back(new osgIntrospection::ParameterInfo(#N5, osgIntrospection::Reflection::getType(extended_typeid<P5>()), osgIntrospection::ParameterInfo::A5, osgIntrospection::Value(D5))); \
params.push_back(new osgIntrospection::ParameterInfo(#N6, osgIntrospection::Reflection::getType(extended_typeid<P6>()), osgIntrospection::ParameterInfo::A6, osgIntrospection::Value(D6))); \
params.push_back(new osgIntrospection::ParameterInfo(#N7, osgIntrospection::Reflection::getType(extended_typeid<P7>()), osgIntrospection::ParameterInfo::A7, osgIntrospection::Value(D7))); \
params.push_back(new osgIntrospection::ParameterInfo(#N8, osgIntrospection::Reflection::getType(extended_typeid<P8>()), osgIntrospection::ParameterInfo::A8, osgIntrospection::Value(D8))); \
params.push_back(new osgIntrospection::ParameterInfo(#N9, osgIntrospection::Reflection::getType(extended_typeid<P9>()), osgIntrospection::ParameterInfo::A9, osgIntrospection::Value(D9))); \
params.push_back(new osgIntrospection::ParameterInfo(#N10, osgIntrospection::Reflection::getType(extended_typeid<P10>()), osgIntrospection::ParameterInfo::A10, osgIntrospection::Value(D10))); \
params.push_back(new osgIntrospection::ParameterInfo(#N11, osgIntrospection::Reflection::getType(extended_typeid<P11>()), osgIntrospection::ParameterInfo::A11, osgIntrospection::Value(D11))); \
params.push_back(new osgIntrospection::ParameterInfo(#N12, osgIntrospection::Reflection::getType(extended_typeid<P12>()), osgIntrospection::ParameterInfo::A12, osgIntrospection::Value(D12))); \
From David Callu: " the main problem is the wrapper generation: The PropertyInfo class use MethodInfo class to access to the value. When the property are define with the I_Property* macro, the MethodInfo use by the property to have access to the value are instancied in the I_Property* macro, but there are already instantied by the I_Method* macro before secondary problem: - the function used by the property could no be customized in the genwrapper.conf file - an array property can't insert a value - the std::map reflector (and indexedProperty in general) haven't remove method - about the help in wrapper ... why not ... solution : To use the function define by the I_Method, I add a MethodInfo variable in the I_Method0 macro old macro : #define I_Method0(ret, fn) (\ params.clear(),\ addMethod(new osgIntrospection::TypedMethodIn fo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params))) new macro : #define I_Method0(ret, fn, signature, briefHelp, detailedHelp) \ params.clear(); \ osgIntrospection::MethodInfo* signature = addMethod(new osgIntrospection::TypedMethodInfo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature) the osgIntrospection::MethodInfo* signature is used by the I_Property macro to define the MethodInfo that it use so for I_Property macro : old macro : #define I_PropertyWithReturnType(t, n, r) \ cap=addProperty(new osgIntrospection::PropertyInfo(osgIntrospection::Reflection::getType(typeid(reflected_type)), osgIntrospection::Reflection::getType(typeid(t)), #n, \ I_Method0(t, get##n), \ I_Method1(r, set##n, IN, t, value))) new macro: #define I_SimpleProperty(t, n, get, set) \ get, \ set)) The genwrapper has been modified in this way. The method signature is define by the prototype of the method For example, the "const char* libraryName();" have "__C5_char_P1__libraryName" for signature solution for secondary problem: The genwrapper accept new tokens in the configuration to custumize the property. The new PropertyInserter and the CustomPropertyInsertAttribute class has been defined The PropertyRemover has been added to the StdMapReflector The _briefHelp and _detailedHelp variable has been added in PropertyInfo, MethodInfo and ContructorInfo class modification: I have modify the genwrapper files Configuration.cpp Configuration.h add some tokens to custumize the property Doxyfile.template add the comment in the output xml genwrapper.conf customize some property in osg::Geometry RegistryBuilder.h RegistryBuilder.cpp add the process_help function (to extract help from xml) TypeRegister.cpp TypeRegister.h optimize the property detection TypeDesc.h TypeDesc.cpp modify FunctionDesc and PropertyDesc WrapperGenerator.h WrapperGenerator.cpp modify the output I also modify the fallowing osgIntrospection files: include/osgIntrospection/Attributes add the PropertyInserter and the CustomPropertyInsertAttribute class include/osgIntrospection/ConstructorInfo add the _briefHelp and _detailedHelp variable in the ConstructorInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/MethodInfo add the _briefHelp and _detailedHelp variable in the MethodInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/PropertyInfo add the _briefHelp and _detailedHelp variable in the PropertyInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/ReflectionMacro remove unused I_Property* macro modify all I_Method macro to accept the help string modify all I_Method macro to define a MethodInfo signature include/osgIntrospection/Reflector add the PropertyInserter in StdVectorReflector and StdListReflector add the PropertyRemover in the StdMapReflector include/osgIntrospection/StaticMethodInfo modify all StaticMethodInfo* to accept the help in parameter include/osgIntrospection/TypedMethodInfo modify all TypedMethodInfo* to accept the help in parameter include/osgIntrospection/TypedConstructorInfo modify all TypedConstructorInfo* to accept the help in parameter include/osgIntrospection/Type add the _briefHelp and _detailedHelp variable in the Type class "
2006-10-17 23:17:06 +08:00
D_ConstructorInfoType signature = addConstructor(new osgIntrospection::TypedConstructorInfo13<reflected_type, instance_creator_type, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12>(params, briefHelp, detailedHelp)); sink(signature)
#define I_ConstructorWithDefaults14(A0, P0, N0, D0, A1, P1, N1, D1, A2, P2, N2, D2, A3, P3, N3, D3, A4, P4, N4, D4, A5, P5, N5, D5, A6, P6, N6, D6, A7, P7, N7, D7, A8, P8, N8, D8, A9, P9, N9, D9, A10, P10, N10, D10, A11, P11, N11, D11, A12, P12, N12, D12, A13, P13, N13, D13, signature, briefHelp, detailedHelp) \
params.clear(); \
params.push_back(new osgIntrospection::ParameterInfo(#N0, osgIntrospection::Reflection::getType(extended_typeid<P0>()), osgIntrospection::ParameterInfo::A0, osgIntrospection::Value(D0))); \
params.push_back(new osgIntrospection::ParameterInfo(#N1, osgIntrospection::Reflection::getType(extended_typeid<P1>()), osgIntrospection::ParameterInfo::A1, osgIntrospection::Value(D1))); \
params.push_back(new osgIntrospection::ParameterInfo(#N2, osgIntrospection::Reflection::getType(extended_typeid<P2>()), osgIntrospection::ParameterInfo::A2, osgIntrospection::Value(D2))); \
params.push_back(new osgIntrospection::ParameterInfo(#N3, osgIntrospection::Reflection::getType(extended_typeid<P3>()), osgIntrospection::ParameterInfo::A3, osgIntrospection::Value(D3))); \
params.push_back(new osgIntrospection::ParameterInfo(#N4, osgIntrospection::Reflection::getType(extended_typeid<P4>()), osgIntrospection::ParameterInfo::A4, osgIntrospection::Value(D4))); \
params.push_back(new osgIntrospection::ParameterInfo(#N5, osgIntrospection::Reflection::getType(extended_typeid<P5>()), osgIntrospection::ParameterInfo::A5, osgIntrospection::Value(D5))); \
params.push_back(new osgIntrospection::ParameterInfo(#N6, osgIntrospection::Reflection::getType(extended_typeid<P6>()), osgIntrospection::ParameterInfo::A6, osgIntrospection::Value(D6))); \
params.push_back(new osgIntrospection::ParameterInfo(#N7, osgIntrospection::Reflection::getType(extended_typeid<P7>()), osgIntrospection::ParameterInfo::A7, osgIntrospection::Value(D7))); \
params.push_back(new osgIntrospection::ParameterInfo(#N8, osgIntrospection::Reflection::getType(extended_typeid<P8>()), osgIntrospection::ParameterInfo::A8, osgIntrospection::Value(D8))); \
params.push_back(new osgIntrospection::ParameterInfo(#N9, osgIntrospection::Reflection::getType(extended_typeid<P9>()), osgIntrospection::ParameterInfo::A9, osgIntrospection::Value(D9))); \
params.push_back(new osgIntrospection::ParameterInfo(#N10, osgIntrospection::Reflection::getType(extended_typeid<P10>()), osgIntrospection::ParameterInfo::A10, osgIntrospection::Value(D10))); \
params.push_back(new osgIntrospection::ParameterInfo(#N11, osgIntrospection::Reflection::getType(extended_typeid<P11>()), osgIntrospection::ParameterInfo::A11, osgIntrospection::Value(D11))); \
params.push_back(new osgIntrospection::ParameterInfo(#N12, osgIntrospection::Reflection::getType(extended_typeid<P12>()), osgIntrospection::ParameterInfo::A12, osgIntrospection::Value(D12))); \
params.push_back(new osgIntrospection::ParameterInfo(#N13, osgIntrospection::Reflection::getType(extended_typeid<P13>()), osgIntrospection::ParameterInfo::A13, osgIntrospection::Value(D13))); \
From David Callu: " the main problem is the wrapper generation: The PropertyInfo class use MethodInfo class to access to the value. When the property are define with the I_Property* macro, the MethodInfo use by the property to have access to the value are instancied in the I_Property* macro, but there are already instantied by the I_Method* macro before secondary problem: - the function used by the property could no be customized in the genwrapper.conf file - an array property can't insert a value - the std::map reflector (and indexedProperty in general) haven't remove method - about the help in wrapper ... why not ... solution : To use the function define by the I_Method, I add a MethodInfo variable in the I_Method0 macro old macro : #define I_Method0(ret, fn) (\ params.clear(),\ addMethod(new osgIntrospection::TypedMethodIn fo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params))) new macro : #define I_Method0(ret, fn, signature, briefHelp, detailedHelp) \ params.clear(); \ osgIntrospection::MethodInfo* signature = addMethod(new osgIntrospection::TypedMethodInfo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature) the osgIntrospection::MethodInfo* signature is used by the I_Property macro to define the MethodInfo that it use so for I_Property macro : old macro : #define I_PropertyWithReturnType(t, n, r) \ cap=addProperty(new osgIntrospection::PropertyInfo(osgIntrospection::Reflection::getType(typeid(reflected_type)), osgIntrospection::Reflection::getType(typeid(t)), #n, \ I_Method0(t, get##n), \ I_Method1(r, set##n, IN, t, value))) new macro: #define I_SimpleProperty(t, n, get, set) \ get, \ set)) The genwrapper has been modified in this way. The method signature is define by the prototype of the method For example, the "const char* libraryName();" have "__C5_char_P1__libraryName" for signature solution for secondary problem: The genwrapper accept new tokens in the configuration to custumize the property. The new PropertyInserter and the CustomPropertyInsertAttribute class has been defined The PropertyRemover has been added to the StdMapReflector The _briefHelp and _detailedHelp variable has been added in PropertyInfo, MethodInfo and ContructorInfo class modification: I have modify the genwrapper files Configuration.cpp Configuration.h add some tokens to custumize the property Doxyfile.template add the comment in the output xml genwrapper.conf customize some property in osg::Geometry RegistryBuilder.h RegistryBuilder.cpp add the process_help function (to extract help from xml) TypeRegister.cpp TypeRegister.h optimize the property detection TypeDesc.h TypeDesc.cpp modify FunctionDesc and PropertyDesc WrapperGenerator.h WrapperGenerator.cpp modify the output I also modify the fallowing osgIntrospection files: include/osgIntrospection/Attributes add the PropertyInserter and the CustomPropertyInsertAttribute class include/osgIntrospection/ConstructorInfo add the _briefHelp and _detailedHelp variable in the ConstructorInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/MethodInfo add the _briefHelp and _detailedHelp variable in the MethodInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/PropertyInfo add the _briefHelp and _detailedHelp variable in the PropertyInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/ReflectionMacro remove unused I_Property* macro modify all I_Method macro to accept the help string modify all I_Method macro to define a MethodInfo signature include/osgIntrospection/Reflector add the PropertyInserter in StdVectorReflector and StdListReflector add the PropertyRemover in the StdMapReflector include/osgIntrospection/StaticMethodInfo modify all StaticMethodInfo* to accept the help in parameter include/osgIntrospection/TypedMethodInfo modify all TypedMethodInfo* to accept the help in parameter include/osgIntrospection/TypedConstructorInfo modify all TypedConstructorInfo* to accept the help in parameter include/osgIntrospection/Type add the _briefHelp and _detailedHelp variable in the Type class "
2006-10-17 23:17:06 +08:00
D_ConstructorInfoType signature = addConstructor(new osgIntrospection::TypedConstructorInfo14<reflected_type, instance_creator_type, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13>(params, briefHelp, detailedHelp)); sink(signature)
#define I_ConstructorWithDefaults15(A0, P0, N0, D0, A1, P1, N1, D1, A2, P2, N2, D2, A3, P3, N3, D3, A4, P4, N4, D4, A5, P5, N5, D5, A6, P6, N6, D6, A7, P7, N7, D7, A8, P8, N8, D8, A9, P9, N9, D9, A10, P10, N10, D10, A11, P11, N11, D11, A12, P12, N12, D12, A13, P13, N13, D13, A14, P14, N14, D14, signature, briefHelp, detailedHelp) \
params.clear(); \
params.push_back(new osgIntrospection::ParameterInfo(#N0, osgIntrospection::Reflection::getType(extended_typeid<P0>()), osgIntrospection::ParameterInfo::A0, osgIntrospection::Value(D0))); \
params.push_back(new osgIntrospection::ParameterInfo(#N1, osgIntrospection::Reflection::getType(extended_typeid<P1>()), osgIntrospection::ParameterInfo::A1, osgIntrospection::Value(D1))); \
params.push_back(new osgIntrospection::ParameterInfo(#N2, osgIntrospection::Reflection::getType(extended_typeid<P2>()), osgIntrospection::ParameterInfo::A2, osgIntrospection::Value(D2))); \
params.push_back(new osgIntrospection::ParameterInfo(#N3, osgIntrospection::Reflection::getType(extended_typeid<P3>()), osgIntrospection::ParameterInfo::A3, osgIntrospection::Value(D3))); \
params.push_back(new osgIntrospection::ParameterInfo(#N4, osgIntrospection::Reflection::getType(extended_typeid<P4>()), osgIntrospection::ParameterInfo::A4, osgIntrospection::Value(D4))); \
params.push_back(new osgIntrospection::ParameterInfo(#N5, osgIntrospection::Reflection::getType(extended_typeid<P5>()), osgIntrospection::ParameterInfo::A5, osgIntrospection::Value(D5))); \
params.push_back(new osgIntrospection::ParameterInfo(#N6, osgIntrospection::Reflection::getType(extended_typeid<P6>()), osgIntrospection::ParameterInfo::A6, osgIntrospection::Value(D6))); \
params.push_back(new osgIntrospection::ParameterInfo(#N7, osgIntrospection::Reflection::getType(extended_typeid<P7>()), osgIntrospection::ParameterInfo::A7, osgIntrospection::Value(D7))); \
params.push_back(new osgIntrospection::ParameterInfo(#N8, osgIntrospection::Reflection::getType(extended_typeid<P8>()), osgIntrospection::ParameterInfo::A8, osgIntrospection::Value(D8))); \
params.push_back(new osgIntrospection::ParameterInfo(#N9, osgIntrospection::Reflection::getType(extended_typeid<P9>()), osgIntrospection::ParameterInfo::A9, osgIntrospection::Value(D9))); \
params.push_back(new osgIntrospection::ParameterInfo(#N10, osgIntrospection::Reflection::getType(extended_typeid<P10>()), osgIntrospection::ParameterInfo::A10, osgIntrospection::Value(D10))); \
params.push_back(new osgIntrospection::ParameterInfo(#N11, osgIntrospection::Reflection::getType(extended_typeid<P11>()), osgIntrospection::ParameterInfo::A11, osgIntrospection::Value(D11))); \
params.push_back(new osgIntrospection::ParameterInfo(#N12, osgIntrospection::Reflection::getType(extended_typeid<P12>()), osgIntrospection::ParameterInfo::A12, osgIntrospection::Value(D12))); \
params.push_back(new osgIntrospection::ParameterInfo(#N13, osgIntrospection::Reflection::getType(extended_typeid<P13>()), osgIntrospection::ParameterInfo::A13, osgIntrospection::Value(D13))); \
params.push_back(new osgIntrospection::ParameterInfo(#N14, osgIntrospection::Reflection::getType(extended_typeid<P14>()), osgIntrospection::ParameterInfo::A14, osgIntrospection::Value(D14))); \
From David Callu: " the main problem is the wrapper generation: The PropertyInfo class use MethodInfo class to access to the value. When the property are define with the I_Property* macro, the MethodInfo use by the property to have access to the value are instancied in the I_Property* macro, but there are already instantied by the I_Method* macro before secondary problem: - the function used by the property could no be customized in the genwrapper.conf file - an array property can't insert a value - the std::map reflector (and indexedProperty in general) haven't remove method - about the help in wrapper ... why not ... solution : To use the function define by the I_Method, I add a MethodInfo variable in the I_Method0 macro old macro : #define I_Method0(ret, fn) (\ params.clear(),\ addMethod(new osgIntrospection::TypedMethodIn fo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params))) new macro : #define I_Method0(ret, fn, signature, briefHelp, detailedHelp) \ params.clear(); \ osgIntrospection::MethodInfo* signature = addMethod(new osgIntrospection::TypedMethodInfo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature) the osgIntrospection::MethodInfo* signature is used by the I_Property macro to define the MethodInfo that it use so for I_Property macro : old macro : #define I_PropertyWithReturnType(t, n, r) \ cap=addProperty(new osgIntrospection::PropertyInfo(osgIntrospection::Reflection::getType(typeid(reflected_type)), osgIntrospection::Reflection::getType(typeid(t)), #n, \ I_Method0(t, get##n), \ I_Method1(r, set##n, IN, t, value))) new macro: #define I_SimpleProperty(t, n, get, set) \ get, \ set)) The genwrapper has been modified in this way. The method signature is define by the prototype of the method For example, the "const char* libraryName();" have "__C5_char_P1__libraryName" for signature solution for secondary problem: The genwrapper accept new tokens in the configuration to custumize the property. The new PropertyInserter and the CustomPropertyInsertAttribute class has been defined The PropertyRemover has been added to the StdMapReflector The _briefHelp and _detailedHelp variable has been added in PropertyInfo, MethodInfo and ContructorInfo class modification: I have modify the genwrapper files Configuration.cpp Configuration.h add some tokens to custumize the property Doxyfile.template add the comment in the output xml genwrapper.conf customize some property in osg::Geometry RegistryBuilder.h RegistryBuilder.cpp add the process_help function (to extract help from xml) TypeRegister.cpp TypeRegister.h optimize the property detection TypeDesc.h TypeDesc.cpp modify FunctionDesc and PropertyDesc WrapperGenerator.h WrapperGenerator.cpp modify the output I also modify the fallowing osgIntrospection files: include/osgIntrospection/Attributes add the PropertyInserter and the CustomPropertyInsertAttribute class include/osgIntrospection/ConstructorInfo add the _briefHelp and _detailedHelp variable in the ConstructorInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/MethodInfo add the _briefHelp and _detailedHelp variable in the MethodInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/PropertyInfo add the _briefHelp and _detailedHelp variable in the PropertyInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/ReflectionMacro remove unused I_Property* macro modify all I_Method macro to accept the help string modify all I_Method macro to define a MethodInfo signature include/osgIntrospection/Reflector add the PropertyInserter in StdVectorReflector and StdListReflector add the PropertyRemover in the StdMapReflector include/osgIntrospection/StaticMethodInfo modify all StaticMethodInfo* to accept the help in parameter include/osgIntrospection/TypedMethodInfo modify all TypedMethodInfo* to accept the help in parameter include/osgIntrospection/TypedConstructorInfo modify all TypedConstructorInfo* to accept the help in parameter include/osgIntrospection/Type add the _briefHelp and _detailedHelp variable in the Type class "
2006-10-17 23:17:06 +08:00
D_ConstructorInfoType signature = addConstructor(new osgIntrospection::TypedConstructorInfo15<reflected_type, instance_creator_type, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14>(params, briefHelp, detailedHelp)); sink(signature)
#define I_ConstructorWithDefaults16(A0, P0, N0, D0, A1, P1, N1, D1, A2, P2, N2, D2, A3, P3, N3, D3, A4, P4, N4, D4, A5, P5, N5, D5, A6, P6, N6, D6, A7, P7, N7, D7, A8, P8, N8, D8, A9, P9, N9, D9, A10, P10, N10, D10, A11, P11, N11, D11, A12, P12, N12, D12, A13, P13, N13, D13, A14, P14, N14, D14, A15, P15, N15, D15, signature, briefHelp, detailedHelp) \
params.clear(); \
params.push_back(new osgIntrospection::ParameterInfo(#N0, osgIntrospection::Reflection::getType(extended_typeid<P0>()), osgIntrospection::ParameterInfo::A0, osgIntrospection::Value(D0))); \
params.push_back(new osgIntrospection::ParameterInfo(#N1, osgIntrospection::Reflection::getType(extended_typeid<P1>()), osgIntrospection::ParameterInfo::A1, osgIntrospection::Value(D1))); \
params.push_back(new osgIntrospection::ParameterInfo(#N2, osgIntrospection::Reflection::getType(extended_typeid<P2>()), osgIntrospection::ParameterInfo::A2, osgIntrospection::Value(D2))); \
params.push_back(new osgIntrospection::ParameterInfo(#N3, osgIntrospection::Reflection::getType(extended_typeid<P3>()), osgIntrospection::ParameterInfo::A3, osgIntrospection::Value(D3))); \
params.push_back(new osgIntrospection::ParameterInfo(#N4, osgIntrospection::Reflection::getType(extended_typeid<P4>()), osgIntrospection::ParameterInfo::A4, osgIntrospection::Value(D4))); \
params.push_back(new osgIntrospection::ParameterInfo(#N5, osgIntrospection::Reflection::getType(extended_typeid<P5>()), osgIntrospection::ParameterInfo::A5, osgIntrospection::Value(D5))); \
params.push_back(new osgIntrospection::ParameterInfo(#N6, osgIntrospection::Reflection::getType(extended_typeid<P6>()), osgIntrospection::ParameterInfo::A6, osgIntrospection::Value(D6))); \
params.push_back(new osgIntrospection::ParameterInfo(#N7, osgIntrospection::Reflection::getType(extended_typeid<P7>()), osgIntrospection::ParameterInfo::A7, osgIntrospection::Value(D7))); \
params.push_back(new osgIntrospection::ParameterInfo(#N8, osgIntrospection::Reflection::getType(extended_typeid<P8>()), osgIntrospection::ParameterInfo::A8, osgIntrospection::Value(D8))); \
params.push_back(new osgIntrospection::ParameterInfo(#N9, osgIntrospection::Reflection::getType(extended_typeid<P9>()), osgIntrospection::ParameterInfo::A9, osgIntrospection::Value(D9))); \
params.push_back(new osgIntrospection::ParameterInfo(#N10, osgIntrospection::Reflection::getType(extended_typeid<P10>()), osgIntrospection::ParameterInfo::A10, osgIntrospection::Value(D10))); \
params.push_back(new osgIntrospection::ParameterInfo(#N11, osgIntrospection::Reflection::getType(extended_typeid<P11>()), osgIntrospection::ParameterInfo::A11, osgIntrospection::Value(D11))); \
params.push_back(new osgIntrospection::ParameterInfo(#N12, osgIntrospection::Reflection::getType(extended_typeid<P12>()), osgIntrospection::ParameterInfo::A12, osgIntrospection::Value(D12))); \
params.push_back(new osgIntrospection::ParameterInfo(#N13, osgIntrospection::Reflection::getType(extended_typeid<P13>()), osgIntrospection::ParameterInfo::A13, osgIntrospection::Value(D13))); \
params.push_back(new osgIntrospection::ParameterInfo(#N14, osgIntrospection::Reflection::getType(extended_typeid<P14>()), osgIntrospection::ParameterInfo::A14, osgIntrospection::Value(D14))); \
params.push_back(new osgIntrospection::ParameterInfo(#N15, osgIntrospection::Reflection::getType(extended_typeid<P15>()), osgIntrospection::ParameterInfo::A15, osgIntrospection::Value(D15))); \
From David Callu: " the main problem is the wrapper generation: The PropertyInfo class use MethodInfo class to access to the value. When the property are define with the I_Property* macro, the MethodInfo use by the property to have access to the value are instancied in the I_Property* macro, but there are already instantied by the I_Method* macro before secondary problem: - the function used by the property could no be customized in the genwrapper.conf file - an array property can't insert a value - the std::map reflector (and indexedProperty in general) haven't remove method - about the help in wrapper ... why not ... solution : To use the function define by the I_Method, I add a MethodInfo variable in the I_Method0 macro old macro : #define I_Method0(ret, fn) (\ params.clear(),\ addMethod(new osgIntrospection::TypedMethodIn fo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params))) new macro : #define I_Method0(ret, fn, signature, briefHelp, detailedHelp) \ params.clear(); \ osgIntrospection::MethodInfo* signature = addMethod(new osgIntrospection::TypedMethodInfo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature) the osgIntrospection::MethodInfo* signature is used by the I_Property macro to define the MethodInfo that it use so for I_Property macro : old macro : #define I_PropertyWithReturnType(t, n, r) \ cap=addProperty(new osgIntrospection::PropertyInfo(osgIntrospection::Reflection::getType(typeid(reflected_type)), osgIntrospection::Reflection::getType(typeid(t)), #n, \ I_Method0(t, get##n), \ I_Method1(r, set##n, IN, t, value))) new macro: #define I_SimpleProperty(t, n, get, set) \ get, \ set)) The genwrapper has been modified in this way. The method signature is define by the prototype of the method For example, the "const char* libraryName();" have "__C5_char_P1__libraryName" for signature solution for secondary problem: The genwrapper accept new tokens in the configuration to custumize the property. The new PropertyInserter and the CustomPropertyInsertAttribute class has been defined The PropertyRemover has been added to the StdMapReflector The _briefHelp and _detailedHelp variable has been added in PropertyInfo, MethodInfo and ContructorInfo class modification: I have modify the genwrapper files Configuration.cpp Configuration.h add some tokens to custumize the property Doxyfile.template add the comment in the output xml genwrapper.conf customize some property in osg::Geometry RegistryBuilder.h RegistryBuilder.cpp add the process_help function (to extract help from xml) TypeRegister.cpp TypeRegister.h optimize the property detection TypeDesc.h TypeDesc.cpp modify FunctionDesc and PropertyDesc WrapperGenerator.h WrapperGenerator.cpp modify the output I also modify the fallowing osgIntrospection files: include/osgIntrospection/Attributes add the PropertyInserter and the CustomPropertyInsertAttribute class include/osgIntrospection/ConstructorInfo add the _briefHelp and _detailedHelp variable in the ConstructorInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/MethodInfo add the _briefHelp and _detailedHelp variable in the MethodInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/PropertyInfo add the _briefHelp and _detailedHelp variable in the PropertyInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/ReflectionMacro remove unused I_Property* macro modify all I_Method macro to accept the help string modify all I_Method macro to define a MethodInfo signature include/osgIntrospection/Reflector add the PropertyInserter in StdVectorReflector and StdListReflector add the PropertyRemover in the StdMapReflector include/osgIntrospection/StaticMethodInfo modify all StaticMethodInfo* to accept the help in parameter include/osgIntrospection/TypedMethodInfo modify all TypedMethodInfo* to accept the help in parameter include/osgIntrospection/TypedConstructorInfo modify all TypedConstructorInfo* to accept the help in parameter include/osgIntrospection/Type add the _briefHelp and _detailedHelp variable in the Type class "
2006-10-17 23:17:06 +08:00
D_ConstructorInfoType signature = addConstructor(new osgIntrospection::TypedConstructorInfo16<reflected_type, instance_creator_type, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15>(params, briefHelp, detailedHelp)); sink(signature)
// --------------------------------------------------------------------------
// METHODS
// --------------------------------------------------------------------------
#define I_Method I_Method0
#define I_StaticMethod I_StaticMethod0
#define I_MethodWithDefaults I_MethodWithDefaults0
#define I_StaticMethodWithDefaults I_StaticMethodWithDefaults0
From David Callu: " the main problem is the wrapper generation: The PropertyInfo class use MethodInfo class to access to the value. When the property are define with the I_Property* macro, the MethodInfo use by the property to have access to the value are instancied in the I_Property* macro, but there are already instantied by the I_Method* macro before secondary problem: - the function used by the property could no be customized in the genwrapper.conf file - an array property can't insert a value - the std::map reflector (and indexedProperty in general) haven't remove method - about the help in wrapper ... why not ... solution : To use the function define by the I_Method, I add a MethodInfo variable in the I_Method0 macro old macro : #define I_Method0(ret, fn) (\ params.clear(),\ addMethod(new osgIntrospection::TypedMethodIn fo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params))) new macro : #define I_Method0(ret, fn, signature, briefHelp, detailedHelp) \ params.clear(); \ osgIntrospection::MethodInfo* signature = addMethod(new osgIntrospection::TypedMethodInfo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature) the osgIntrospection::MethodInfo* signature is used by the I_Property macro to define the MethodInfo that it use so for I_Property macro : old macro : #define I_PropertyWithReturnType(t, n, r) \ cap=addProperty(new osgIntrospection::PropertyInfo(osgIntrospection::Reflection::getType(typeid(reflected_type)), osgIntrospection::Reflection::getType(typeid(t)), #n, \ I_Method0(t, get##n), \ I_Method1(r, set##n, IN, t, value))) new macro: #define I_SimpleProperty(t, n, get, set) \ get, \ set)) The genwrapper has been modified in this way. The method signature is define by the prototype of the method For example, the "const char* libraryName();" have "__C5_char_P1__libraryName" for signature solution for secondary problem: The genwrapper accept new tokens in the configuration to custumize the property. The new PropertyInserter and the CustomPropertyInsertAttribute class has been defined The PropertyRemover has been added to the StdMapReflector The _briefHelp and _detailedHelp variable has been added in PropertyInfo, MethodInfo and ContructorInfo class modification: I have modify the genwrapper files Configuration.cpp Configuration.h add some tokens to custumize the property Doxyfile.template add the comment in the output xml genwrapper.conf customize some property in osg::Geometry RegistryBuilder.h RegistryBuilder.cpp add the process_help function (to extract help from xml) TypeRegister.cpp TypeRegister.h optimize the property detection TypeDesc.h TypeDesc.cpp modify FunctionDesc and PropertyDesc WrapperGenerator.h WrapperGenerator.cpp modify the output I also modify the fallowing osgIntrospection files: include/osgIntrospection/Attributes add the PropertyInserter and the CustomPropertyInsertAttribute class include/osgIntrospection/ConstructorInfo add the _briefHelp and _detailedHelp variable in the ConstructorInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/MethodInfo add the _briefHelp and _detailedHelp variable in the MethodInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/PropertyInfo add the _briefHelp and _detailedHelp variable in the PropertyInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/ReflectionMacro remove unused I_Property* macro modify all I_Method macro to accept the help string modify all I_Method macro to define a MethodInfo signature include/osgIntrospection/Reflector add the PropertyInserter in StdVectorReflector and StdListReflector add the PropertyRemover in the StdMapReflector include/osgIntrospection/StaticMethodInfo modify all StaticMethodInfo* to accept the help in parameter include/osgIntrospection/TypedMethodInfo modify all TypedMethodInfo* to accept the help in parameter include/osgIntrospection/TypedConstructorInfo modify all TypedConstructorInfo* to accept the help in parameter include/osgIntrospection/Type add the _briefHelp and _detailedHelp variable in the Type class "
2006-10-17 23:17:06 +08:00
#define D_MethodInfoType osgIntrospection::MethodInfo*
#define I_Method0(ret, fn, signature, briefHelp, detailedHelp) \
params.clear(); \
D_MethodInfoType signature = addMethod(new osgIntrospection::TypedMethodInfo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature)
#define I_Method1(ret, fn, A0, P0, N0, signature, briefHelp, detailedHelp) \
params.clear(); \
params.push_back(new osgIntrospection::ParameterInfo(#N0, osgIntrospection::Reflection::getType(extended_typeid<P0>()), osgIntrospection::ParameterInfo::A0)); \
From David Callu: " the main problem is the wrapper generation: The PropertyInfo class use MethodInfo class to access to the value. When the property are define with the I_Property* macro, the MethodInfo use by the property to have access to the value are instancied in the I_Property* macro, but there are already instantied by the I_Method* macro before secondary problem: - the function used by the property could no be customized in the genwrapper.conf file - an array property can't insert a value - the std::map reflector (and indexedProperty in general) haven't remove method - about the help in wrapper ... why not ... solution : To use the function define by the I_Method, I add a MethodInfo variable in the I_Method0 macro old macro : #define I_Method0(ret, fn) (\ params.clear(),\ addMethod(new osgIntrospection::TypedMethodIn fo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params))) new macro : #define I_Method0(ret, fn, signature, briefHelp, detailedHelp) \ params.clear(); \ osgIntrospection::MethodInfo* signature = addMethod(new osgIntrospection::TypedMethodInfo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature) the osgIntrospection::MethodInfo* signature is used by the I_Property macro to define the MethodInfo that it use so for I_Property macro : old macro : #define I_PropertyWithReturnType(t, n, r) \ cap=addProperty(new osgIntrospection::PropertyInfo(osgIntrospection::Reflection::getType(typeid(reflected_type)), osgIntrospection::Reflection::getType(typeid(t)), #n, \ I_Method0(t, get##n), \ I_Method1(r, set##n, IN, t, value))) new macro: #define I_SimpleProperty(t, n, get, set) \ get, \ set)) The genwrapper has been modified in this way. The method signature is define by the prototype of the method For example, the "const char* libraryName();" have "__C5_char_P1__libraryName" for signature solution for secondary problem: The genwrapper accept new tokens in the configuration to custumize the property. The new PropertyInserter and the CustomPropertyInsertAttribute class has been defined The PropertyRemover has been added to the StdMapReflector The _briefHelp and _detailedHelp variable has been added in PropertyInfo, MethodInfo and ContructorInfo class modification: I have modify the genwrapper files Configuration.cpp Configuration.h add some tokens to custumize the property Doxyfile.template add the comment in the output xml genwrapper.conf customize some property in osg::Geometry RegistryBuilder.h RegistryBuilder.cpp add the process_help function (to extract help from xml) TypeRegister.cpp TypeRegister.h optimize the property detection TypeDesc.h TypeDesc.cpp modify FunctionDesc and PropertyDesc WrapperGenerator.h WrapperGenerator.cpp modify the output I also modify the fallowing osgIntrospection files: include/osgIntrospection/Attributes add the PropertyInserter and the CustomPropertyInsertAttribute class include/osgIntrospection/ConstructorInfo add the _briefHelp and _detailedHelp variable in the ConstructorInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/MethodInfo add the _briefHelp and _detailedHelp variable in the MethodInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/PropertyInfo add the _briefHelp and _detailedHelp variable in the PropertyInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/ReflectionMacro remove unused I_Property* macro modify all I_Method macro to accept the help string modify all I_Method macro to define a MethodInfo signature include/osgIntrospection/Reflector add the PropertyInserter in StdVectorReflector and StdListReflector add the PropertyRemover in the StdMapReflector include/osgIntrospection/StaticMethodInfo modify all StaticMethodInfo* to accept the help in parameter include/osgIntrospection/TypedMethodInfo modify all TypedMethodInfo* to accept the help in parameter include/osgIntrospection/TypedConstructorInfo modify all TypedConstructorInfo* to accept the help in parameter include/osgIntrospection/Type add the _briefHelp and _detailedHelp variable in the Type class "
2006-10-17 23:17:06 +08:00
D_MethodInfoType signature = addMethod(new osgIntrospection::TypedMethodInfo1<reflected_type, ret, P0>(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature)
#define I_Method2(ret, fn, A0, P0, N0, A1, P1, N1, signature, briefHelp, detailedHelp) \
params.clear(); \
params.push_back(new osgIntrospection::ParameterInfo(#N0, osgIntrospection::Reflection::getType(extended_typeid<P0>()), osgIntrospection::ParameterInfo::A0)); \
params.push_back(new osgIntrospection::ParameterInfo(#N1, osgIntrospection::Reflection::getType(extended_typeid<P1>()), osgIntrospection::ParameterInfo::A1)); \
From David Callu: " the main problem is the wrapper generation: The PropertyInfo class use MethodInfo class to access to the value. When the property are define with the I_Property* macro, the MethodInfo use by the property to have access to the value are instancied in the I_Property* macro, but there are already instantied by the I_Method* macro before secondary problem: - the function used by the property could no be customized in the genwrapper.conf file - an array property can't insert a value - the std::map reflector (and indexedProperty in general) haven't remove method - about the help in wrapper ... why not ... solution : To use the function define by the I_Method, I add a MethodInfo variable in the I_Method0 macro old macro : #define I_Method0(ret, fn) (\ params.clear(),\ addMethod(new osgIntrospection::TypedMethodIn fo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params))) new macro : #define I_Method0(ret, fn, signature, briefHelp, detailedHelp) \ params.clear(); \ osgIntrospection::MethodInfo* signature = addMethod(new osgIntrospection::TypedMethodInfo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature) the osgIntrospection::MethodInfo* signature is used by the I_Property macro to define the MethodInfo that it use so for I_Property macro : old macro : #define I_PropertyWithReturnType(t, n, r) \ cap=addProperty(new osgIntrospection::PropertyInfo(osgIntrospection::Reflection::getType(typeid(reflected_type)), osgIntrospection::Reflection::getType(typeid(t)), #n, \ I_Method0(t, get##n), \ I_Method1(r, set##n, IN, t, value))) new macro: #define I_SimpleProperty(t, n, get, set) \ get, \ set)) The genwrapper has been modified in this way. The method signature is define by the prototype of the method For example, the "const char* libraryName();" have "__C5_char_P1__libraryName" for signature solution for secondary problem: The genwrapper accept new tokens in the configuration to custumize the property. The new PropertyInserter and the CustomPropertyInsertAttribute class has been defined The PropertyRemover has been added to the StdMapReflector The _briefHelp and _detailedHelp variable has been added in PropertyInfo, MethodInfo and ContructorInfo class modification: I have modify the genwrapper files Configuration.cpp Configuration.h add some tokens to custumize the property Doxyfile.template add the comment in the output xml genwrapper.conf customize some property in osg::Geometry RegistryBuilder.h RegistryBuilder.cpp add the process_help function (to extract help from xml) TypeRegister.cpp TypeRegister.h optimize the property detection TypeDesc.h TypeDesc.cpp modify FunctionDesc and PropertyDesc WrapperGenerator.h WrapperGenerator.cpp modify the output I also modify the fallowing osgIntrospection files: include/osgIntrospection/Attributes add the PropertyInserter and the CustomPropertyInsertAttribute class include/osgIntrospection/ConstructorInfo add the _briefHelp and _detailedHelp variable in the ConstructorInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/MethodInfo add the _briefHelp and _detailedHelp variable in the MethodInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/PropertyInfo add the _briefHelp and _detailedHelp variable in the PropertyInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/ReflectionMacro remove unused I_Property* macro modify all I_Method macro to accept the help string modify all I_Method macro to define a MethodInfo signature include/osgIntrospection/Reflector add the PropertyInserter in StdVectorReflector and StdListReflector add the PropertyRemover in the StdMapReflector include/osgIntrospection/StaticMethodInfo modify all StaticMethodInfo* to accept the help in parameter include/osgIntrospection/TypedMethodInfo modify all TypedMethodInfo* to accept the help in parameter include/osgIntrospection/TypedConstructorInfo modify all TypedConstructorInfo* to accept the help in parameter include/osgIntrospection/Type add the _briefHelp and _detailedHelp variable in the Type class "
2006-10-17 23:17:06 +08:00
D_MethodInfoType signature = addMethod(new osgIntrospection::TypedMethodInfo2<reflected_type, ret, P0, P1>(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature)
#define I_Method3(ret, fn, A0, P0, N0, A1, P1, N1, A2, P2, N2, signature, briefHelp, detailedHelp) \
params.clear(); \
params.push_back(new osgIntrospection::ParameterInfo(#N0, osgIntrospection::Reflection::getType(extended_typeid<P0>()), osgIntrospection::ParameterInfo::A0)); \
params.push_back(new osgIntrospection::ParameterInfo(#N1, osgIntrospection::Reflection::getType(extended_typeid<P1>()), osgIntrospection::ParameterInfo::A1)); \
params.push_back(new osgIntrospection::ParameterInfo(#N2, osgIntrospection::Reflection::getType(extended_typeid<P2>()), osgIntrospection::ParameterInfo::A2)); \
From David Callu: " the main problem is the wrapper generation: The PropertyInfo class use MethodInfo class to access to the value. When the property are define with the I_Property* macro, the MethodInfo use by the property to have access to the value are instancied in the I_Property* macro, but there are already instantied by the I_Method* macro before secondary problem: - the function used by the property could no be customized in the genwrapper.conf file - an array property can't insert a value - the std::map reflector (and indexedProperty in general) haven't remove method - about the help in wrapper ... why not ... solution : To use the function define by the I_Method, I add a MethodInfo variable in the I_Method0 macro old macro : #define I_Method0(ret, fn) (\ params.clear(),\ addMethod(new osgIntrospection::TypedMethodIn fo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params))) new macro : #define I_Method0(ret, fn, signature, briefHelp, detailedHelp) \ params.clear(); \ osgIntrospection::MethodInfo* signature = addMethod(new osgIntrospection::TypedMethodInfo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature) the osgIntrospection::MethodInfo* signature is used by the I_Property macro to define the MethodInfo that it use so for I_Property macro : old macro : #define I_PropertyWithReturnType(t, n, r) \ cap=addProperty(new osgIntrospection::PropertyInfo(osgIntrospection::Reflection::getType(typeid(reflected_type)), osgIntrospection::Reflection::getType(typeid(t)), #n, \ I_Method0(t, get##n), \ I_Method1(r, set##n, IN, t, value))) new macro: #define I_SimpleProperty(t, n, get, set) \ get, \ set)) The genwrapper has been modified in this way. The method signature is define by the prototype of the method For example, the "const char* libraryName();" have "__C5_char_P1__libraryName" for signature solution for secondary problem: The genwrapper accept new tokens in the configuration to custumize the property. The new PropertyInserter and the CustomPropertyInsertAttribute class has been defined The PropertyRemover has been added to the StdMapReflector The _briefHelp and _detailedHelp variable has been added in PropertyInfo, MethodInfo and ContructorInfo class modification: I have modify the genwrapper files Configuration.cpp Configuration.h add some tokens to custumize the property Doxyfile.template add the comment in the output xml genwrapper.conf customize some property in osg::Geometry RegistryBuilder.h RegistryBuilder.cpp add the process_help function (to extract help from xml) TypeRegister.cpp TypeRegister.h optimize the property detection TypeDesc.h TypeDesc.cpp modify FunctionDesc and PropertyDesc WrapperGenerator.h WrapperGenerator.cpp modify the output I also modify the fallowing osgIntrospection files: include/osgIntrospection/Attributes add the PropertyInserter and the CustomPropertyInsertAttribute class include/osgIntrospection/ConstructorInfo add the _briefHelp and _detailedHelp variable in the ConstructorInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/MethodInfo add the _briefHelp and _detailedHelp variable in the MethodInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/PropertyInfo add the _briefHelp and _detailedHelp variable in the PropertyInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/ReflectionMacro remove unused I_Property* macro modify all I_Method macro to accept the help string modify all I_Method macro to define a MethodInfo signature include/osgIntrospection/Reflector add the PropertyInserter in StdVectorReflector and StdListReflector add the PropertyRemover in the StdMapReflector include/osgIntrospection/StaticMethodInfo modify all StaticMethodInfo* to accept the help in parameter include/osgIntrospection/TypedMethodInfo modify all TypedMethodInfo* to accept the help in parameter include/osgIntrospection/TypedConstructorInfo modify all TypedConstructorInfo* to accept the help in parameter include/osgIntrospection/Type add the _briefHelp and _detailedHelp variable in the Type class "
2006-10-17 23:17:06 +08:00
D_MethodInfoType signature = addMethod(new osgIntrospection::TypedMethodInfo3<reflected_type, ret, P0, P1, P2>(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature)
#define I_Method4(ret, fn, A0, P0, N0, A1, P1, N1, A2, P2, N2, A3, P3, N3, signature, briefHelp, detailedHelp) \
params.clear(); \
params.push_back(new osgIntrospection::ParameterInfo(#N0, osgIntrospection::Reflection::getType(extended_typeid<P0>()), osgIntrospection::ParameterInfo::A0)); \
params.push_back(new osgIntrospection::ParameterInfo(#N1, osgIntrospection::Reflection::getType(extended_typeid<P1>()), osgIntrospection::ParameterInfo::A1)); \
params.push_back(new osgIntrospection::ParameterInfo(#N2, osgIntrospection::Reflection::getType(extended_typeid<P2>()), osgIntrospection::ParameterInfo::A2)); \
params.push_back(new osgIntrospection::ParameterInfo(#N3, osgIntrospection::Reflection::getType(extended_typeid<P3>()), osgIntrospection::ParameterInfo::A3)); \
From David Callu: " the main problem is the wrapper generation: The PropertyInfo class use MethodInfo class to access to the value. When the property are define with the I_Property* macro, the MethodInfo use by the property to have access to the value are instancied in the I_Property* macro, but there are already instantied by the I_Method* macro before secondary problem: - the function used by the property could no be customized in the genwrapper.conf file - an array property can't insert a value - the std::map reflector (and indexedProperty in general) haven't remove method - about the help in wrapper ... why not ... solution : To use the function define by the I_Method, I add a MethodInfo variable in the I_Method0 macro old macro : #define I_Method0(ret, fn) (\ params.clear(),\ addMethod(new osgIntrospection::TypedMethodIn fo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params))) new macro : #define I_Method0(ret, fn, signature, briefHelp, detailedHelp) \ params.clear(); \ osgIntrospection::MethodInfo* signature = addMethod(new osgIntrospection::TypedMethodInfo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature) the osgIntrospection::MethodInfo* signature is used by the I_Property macro to define the MethodInfo that it use so for I_Property macro : old macro : #define I_PropertyWithReturnType(t, n, r) \ cap=addProperty(new osgIntrospection::PropertyInfo(osgIntrospection::Reflection::getType(typeid(reflected_type)), osgIntrospection::Reflection::getType(typeid(t)), #n, \ I_Method0(t, get##n), \ I_Method1(r, set##n, IN, t, value))) new macro: #define I_SimpleProperty(t, n, get, set) \ get, \ set)) The genwrapper has been modified in this way. The method signature is define by the prototype of the method For example, the "const char* libraryName();" have "__C5_char_P1__libraryName" for signature solution for secondary problem: The genwrapper accept new tokens in the configuration to custumize the property. The new PropertyInserter and the CustomPropertyInsertAttribute class has been defined The PropertyRemover has been added to the StdMapReflector The _briefHelp and _detailedHelp variable has been added in PropertyInfo, MethodInfo and ContructorInfo class modification: I have modify the genwrapper files Configuration.cpp Configuration.h add some tokens to custumize the property Doxyfile.template add the comment in the output xml genwrapper.conf customize some property in osg::Geometry RegistryBuilder.h RegistryBuilder.cpp add the process_help function (to extract help from xml) TypeRegister.cpp TypeRegister.h optimize the property detection TypeDesc.h TypeDesc.cpp modify FunctionDesc and PropertyDesc WrapperGenerator.h WrapperGenerator.cpp modify the output I also modify the fallowing osgIntrospection files: include/osgIntrospection/Attributes add the PropertyInserter and the CustomPropertyInsertAttribute class include/osgIntrospection/ConstructorInfo add the _briefHelp and _detailedHelp variable in the ConstructorInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/MethodInfo add the _briefHelp and _detailedHelp variable in the MethodInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/PropertyInfo add the _briefHelp and _detailedHelp variable in the PropertyInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/ReflectionMacro remove unused I_Property* macro modify all I_Method macro to accept the help string modify all I_Method macro to define a MethodInfo signature include/osgIntrospection/Reflector add the PropertyInserter in StdVectorReflector and StdListReflector add the PropertyRemover in the StdMapReflector include/osgIntrospection/StaticMethodInfo modify all StaticMethodInfo* to accept the help in parameter include/osgIntrospection/TypedMethodInfo modify all TypedMethodInfo* to accept the help in parameter include/osgIntrospection/TypedConstructorInfo modify all TypedConstructorInfo* to accept the help in parameter include/osgIntrospection/Type add the _briefHelp and _detailedHelp variable in the Type class "
2006-10-17 23:17:06 +08:00
D_MethodInfoType signature = addMethod(new osgIntrospection::TypedMethodInfo4<reflected_type, ret, P0, P1, P2, P3>(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature)
#define I_Method5(ret, fn, A0, P0, N0, A1, P1, N1, A2, P2, N2, A3, P3, N3, A4, P4, N4, signature, briefHelp, detailedHelp) \
params.clear(); \
params.push_back(new osgIntrospection::ParameterInfo(#N0, osgIntrospection::Reflection::getType(extended_typeid<P0>()), osgIntrospection::ParameterInfo::A0)); \
params.push_back(new osgIntrospection::ParameterInfo(#N1, osgIntrospection::Reflection::getType(extended_typeid<P1>()), osgIntrospection::ParameterInfo::A1)); \
params.push_back(new osgIntrospection::ParameterInfo(#N2, osgIntrospection::Reflection::getType(extended_typeid<P2>()), osgIntrospection::ParameterInfo::A2)); \
params.push_back(new osgIntrospection::ParameterInfo(#N3, osgIntrospection::Reflection::getType(extended_typeid<P3>()), osgIntrospection::ParameterInfo::A3)); \
params.push_back(new osgIntrospection::ParameterInfo(#N4, osgIntrospection::Reflection::getType(extended_typeid<P4>()), osgIntrospection::ParameterInfo::A4)); \
From David Callu: " the main problem is the wrapper generation: The PropertyInfo class use MethodInfo class to access to the value. When the property are define with the I_Property* macro, the MethodInfo use by the property to have access to the value are instancied in the I_Property* macro, but there are already instantied by the I_Method* macro before secondary problem: - the function used by the property could no be customized in the genwrapper.conf file - an array property can't insert a value - the std::map reflector (and indexedProperty in general) haven't remove method - about the help in wrapper ... why not ... solution : To use the function define by the I_Method, I add a MethodInfo variable in the I_Method0 macro old macro : #define I_Method0(ret, fn) (\ params.clear(),\ addMethod(new osgIntrospection::TypedMethodIn fo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params))) new macro : #define I_Method0(ret, fn, signature, briefHelp, detailedHelp) \ params.clear(); \ osgIntrospection::MethodInfo* signature = addMethod(new osgIntrospection::TypedMethodInfo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature) the osgIntrospection::MethodInfo* signature is used by the I_Property macro to define the MethodInfo that it use so for I_Property macro : old macro : #define I_PropertyWithReturnType(t, n, r) \ cap=addProperty(new osgIntrospection::PropertyInfo(osgIntrospection::Reflection::getType(typeid(reflected_type)), osgIntrospection::Reflection::getType(typeid(t)), #n, \ I_Method0(t, get##n), \ I_Method1(r, set##n, IN, t, value))) new macro: #define I_SimpleProperty(t, n, get, set) \ get, \ set)) The genwrapper has been modified in this way. The method signature is define by the prototype of the method For example, the "const char* libraryName();" have "__C5_char_P1__libraryName" for signature solution for secondary problem: The genwrapper accept new tokens in the configuration to custumize the property. The new PropertyInserter and the CustomPropertyInsertAttribute class has been defined The PropertyRemover has been added to the StdMapReflector The _briefHelp and _detailedHelp variable has been added in PropertyInfo, MethodInfo and ContructorInfo class modification: I have modify the genwrapper files Configuration.cpp Configuration.h add some tokens to custumize the property Doxyfile.template add the comment in the output xml genwrapper.conf customize some property in osg::Geometry RegistryBuilder.h RegistryBuilder.cpp add the process_help function (to extract help from xml) TypeRegister.cpp TypeRegister.h optimize the property detection TypeDesc.h TypeDesc.cpp modify FunctionDesc and PropertyDesc WrapperGenerator.h WrapperGenerator.cpp modify the output I also modify the fallowing osgIntrospection files: include/osgIntrospection/Attributes add the PropertyInserter and the CustomPropertyInsertAttribute class include/osgIntrospection/ConstructorInfo add the _briefHelp and _detailedHelp variable in the ConstructorInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/MethodInfo add the _briefHelp and _detailedHelp variable in the MethodInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/PropertyInfo add the _briefHelp and _detailedHelp variable in the PropertyInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/ReflectionMacro remove unused I_Property* macro modify all I_Method macro to accept the help string modify all I_Method macro to define a MethodInfo signature include/osgIntrospection/Reflector add the PropertyInserter in StdVectorReflector and StdListReflector add the PropertyRemover in the StdMapReflector include/osgIntrospection/StaticMethodInfo modify all StaticMethodInfo* to accept the help in parameter include/osgIntrospection/TypedMethodInfo modify all TypedMethodInfo* to accept the help in parameter include/osgIntrospection/TypedConstructorInfo modify all TypedConstructorInfo* to accept the help in parameter include/osgIntrospection/Type add the _briefHelp and _detailedHelp variable in the Type class "
2006-10-17 23:17:06 +08:00
D_MethodInfoType signature = addMethod(new osgIntrospection::TypedMethodInfo5<reflected_type, ret, P0, P1, P2, P3, P4>(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature)
#define I_Method6(ret, fn, A0, P0, N0, A1, P1, N1, A2, P2, N2, A3, P3, N3, A4, P4, N4, A5, P5, N5, signature, briefHelp, detailedHelp) \
params.clear(); \
params.push_back(new osgIntrospection::ParameterInfo(#N0, osgIntrospection::Reflection::getType(extended_typeid<P0>()), osgIntrospection::ParameterInfo::A0)); \
params.push_back(new osgIntrospection::ParameterInfo(#N1, osgIntrospection::Reflection::getType(extended_typeid<P1>()), osgIntrospection::ParameterInfo::A1)); \
params.push_back(new osgIntrospection::ParameterInfo(#N2, osgIntrospection::Reflection::getType(extended_typeid<P2>()), osgIntrospection::ParameterInfo::A2)); \
params.push_back(new osgIntrospection::ParameterInfo(#N3, osgIntrospection::Reflection::getType(extended_typeid<P3>()), osgIntrospection::ParameterInfo::A3)); \
params.push_back(new osgIntrospection::ParameterInfo(#N4, osgIntrospection::Reflection::getType(extended_typeid<P4>()), osgIntrospection::ParameterInfo::A4)); \
params.push_back(new osgIntrospection::ParameterInfo(#N5, osgIntrospection::Reflection::getType(extended_typeid<P5>()), osgIntrospection::ParameterInfo::A5)); \
From David Callu: " the main problem is the wrapper generation: The PropertyInfo class use MethodInfo class to access to the value. When the property are define with the I_Property* macro, the MethodInfo use by the property to have access to the value are instancied in the I_Property* macro, but there are already instantied by the I_Method* macro before secondary problem: - the function used by the property could no be customized in the genwrapper.conf file - an array property can't insert a value - the std::map reflector (and indexedProperty in general) haven't remove method - about the help in wrapper ... why not ... solution : To use the function define by the I_Method, I add a MethodInfo variable in the I_Method0 macro old macro : #define I_Method0(ret, fn) (\ params.clear(),\ addMethod(new osgIntrospection::TypedMethodIn fo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params))) new macro : #define I_Method0(ret, fn, signature, briefHelp, detailedHelp) \ params.clear(); \ osgIntrospection::MethodInfo* signature = addMethod(new osgIntrospection::TypedMethodInfo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature) the osgIntrospection::MethodInfo* signature is used by the I_Property macro to define the MethodInfo that it use so for I_Property macro : old macro : #define I_PropertyWithReturnType(t, n, r) \ cap=addProperty(new osgIntrospection::PropertyInfo(osgIntrospection::Reflection::getType(typeid(reflected_type)), osgIntrospection::Reflection::getType(typeid(t)), #n, \ I_Method0(t, get##n), \ I_Method1(r, set##n, IN, t, value))) new macro: #define I_SimpleProperty(t, n, get, set) \ get, \ set)) The genwrapper has been modified in this way. The method signature is define by the prototype of the method For example, the "const char* libraryName();" have "__C5_char_P1__libraryName" for signature solution for secondary problem: The genwrapper accept new tokens in the configuration to custumize the property. The new PropertyInserter and the CustomPropertyInsertAttribute class has been defined The PropertyRemover has been added to the StdMapReflector The _briefHelp and _detailedHelp variable has been added in PropertyInfo, MethodInfo and ContructorInfo class modification: I have modify the genwrapper files Configuration.cpp Configuration.h add some tokens to custumize the property Doxyfile.template add the comment in the output xml genwrapper.conf customize some property in osg::Geometry RegistryBuilder.h RegistryBuilder.cpp add the process_help function (to extract help from xml) TypeRegister.cpp TypeRegister.h optimize the property detection TypeDesc.h TypeDesc.cpp modify FunctionDesc and PropertyDesc WrapperGenerator.h WrapperGenerator.cpp modify the output I also modify the fallowing osgIntrospection files: include/osgIntrospection/Attributes add the PropertyInserter and the CustomPropertyInsertAttribute class include/osgIntrospection/ConstructorInfo add the _briefHelp and _detailedHelp variable in the ConstructorInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/MethodInfo add the _briefHelp and _detailedHelp variable in the MethodInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/PropertyInfo add the _briefHelp and _detailedHelp variable in the PropertyInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/ReflectionMacro remove unused I_Property* macro modify all I_Method macro to accept the help string modify all I_Method macro to define a MethodInfo signature include/osgIntrospection/Reflector add the PropertyInserter in StdVectorReflector and StdListReflector add the PropertyRemover in the StdMapReflector include/osgIntrospection/StaticMethodInfo modify all StaticMethodInfo* to accept the help in parameter include/osgIntrospection/TypedMethodInfo modify all TypedMethodInfo* to accept the help in parameter include/osgIntrospection/TypedConstructorInfo modify all TypedConstructorInfo* to accept the help in parameter include/osgIntrospection/Type add the _briefHelp and _detailedHelp variable in the Type class "
2006-10-17 23:17:06 +08:00
D_MethodInfoType signature = addMethod(new osgIntrospection::TypedMethodInfo6<reflected_type, ret, P0, P1, P2, P3, P4, P5>(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature)
#define I_Method7(ret, fn, A0, P0, N0, A1, P1, N1, A2, P2, N2, A3, P3, N3, A4, P4, N4, A5, P5, N5, A6, P6, N6, signature, briefHelp, detailedHelp) \
params.clear(); \
params.push_back(new osgIntrospection::ParameterInfo(#N0, osgIntrospection::Reflection::getType(extended_typeid<P0>()), osgIntrospection::ParameterInfo::A0)); \
params.push_back(new osgIntrospection::ParameterInfo(#N1, osgIntrospection::Reflection::getType(extended_typeid<P1>()), osgIntrospection::ParameterInfo::A1)); \
params.push_back(new osgIntrospection::ParameterInfo(#N2, osgIntrospection::Reflection::getType(extended_typeid<P2>()), osgIntrospection::ParameterInfo::A2)); \
params.push_back(new osgIntrospection::ParameterInfo(#N3, osgIntrospection::Reflection::getType(extended_typeid<P3>()), osgIntrospection::ParameterInfo::A3)); \
params.push_back(new osgIntrospection::ParameterInfo(#N4, osgIntrospection::Reflection::getType(extended_typeid<P4>()), osgIntrospection::ParameterInfo::A4)); \
params.push_back(new osgIntrospection::ParameterInfo(#N5, osgIntrospection::Reflection::getType(extended_typeid<P5>()), osgIntrospection::ParameterInfo::A5)); \
params.push_back(new osgIntrospection::ParameterInfo(#N6, osgIntrospection::Reflection::getType(extended_typeid<P6>()), osgIntrospection::ParameterInfo::A6)); \
From David Callu: " the main problem is the wrapper generation: The PropertyInfo class use MethodInfo class to access to the value. When the property are define with the I_Property* macro, the MethodInfo use by the property to have access to the value are instancied in the I_Property* macro, but there are already instantied by the I_Method* macro before secondary problem: - the function used by the property could no be customized in the genwrapper.conf file - an array property can't insert a value - the std::map reflector (and indexedProperty in general) haven't remove method - about the help in wrapper ... why not ... solution : To use the function define by the I_Method, I add a MethodInfo variable in the I_Method0 macro old macro : #define I_Method0(ret, fn) (\ params.clear(),\ addMethod(new osgIntrospection::TypedMethodIn fo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params))) new macro : #define I_Method0(ret, fn, signature, briefHelp, detailedHelp) \ params.clear(); \ osgIntrospection::MethodInfo* signature = addMethod(new osgIntrospection::TypedMethodInfo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature) the osgIntrospection::MethodInfo* signature is used by the I_Property macro to define the MethodInfo that it use so for I_Property macro : old macro : #define I_PropertyWithReturnType(t, n, r) \ cap=addProperty(new osgIntrospection::PropertyInfo(osgIntrospection::Reflection::getType(typeid(reflected_type)), osgIntrospection::Reflection::getType(typeid(t)), #n, \ I_Method0(t, get##n), \ I_Method1(r, set##n, IN, t, value))) new macro: #define I_SimpleProperty(t, n, get, set) \ get, \ set)) The genwrapper has been modified in this way. The method signature is define by the prototype of the method For example, the "const char* libraryName();" have "__C5_char_P1__libraryName" for signature solution for secondary problem: The genwrapper accept new tokens in the configuration to custumize the property. The new PropertyInserter and the CustomPropertyInsertAttribute class has been defined The PropertyRemover has been added to the StdMapReflector The _briefHelp and _detailedHelp variable has been added in PropertyInfo, MethodInfo and ContructorInfo class modification: I have modify the genwrapper files Configuration.cpp Configuration.h add some tokens to custumize the property Doxyfile.template add the comment in the output xml genwrapper.conf customize some property in osg::Geometry RegistryBuilder.h RegistryBuilder.cpp add the process_help function (to extract help from xml) TypeRegister.cpp TypeRegister.h optimize the property detection TypeDesc.h TypeDesc.cpp modify FunctionDesc and PropertyDesc WrapperGenerator.h WrapperGenerator.cpp modify the output I also modify the fallowing osgIntrospection files: include/osgIntrospection/Attributes add the PropertyInserter and the CustomPropertyInsertAttribute class include/osgIntrospection/ConstructorInfo add the _briefHelp and _detailedHelp variable in the ConstructorInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/MethodInfo add the _briefHelp and _detailedHelp variable in the MethodInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/PropertyInfo add the _briefHelp and _detailedHelp variable in the PropertyInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/ReflectionMacro remove unused I_Property* macro modify all I_Method macro to accept the help string modify all I_Method macro to define a MethodInfo signature include/osgIntrospection/Reflector add the PropertyInserter in StdVectorReflector and StdListReflector add the PropertyRemover in the StdMapReflector include/osgIntrospection/StaticMethodInfo modify all StaticMethodInfo* to accept the help in parameter include/osgIntrospection/TypedMethodInfo modify all TypedMethodInfo* to accept the help in parameter include/osgIntrospection/TypedConstructorInfo modify all TypedConstructorInfo* to accept the help in parameter include/osgIntrospection/Type add the _briefHelp and _detailedHelp variable in the Type class "
2006-10-17 23:17:06 +08:00
D_MethodInfoType signature = addMethod(new osgIntrospection::TypedMethodInfo7<reflected_type, ret, P0, P1, P2, P3, P4, P5, P6>(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature)
#define I_Method8(ret, fn, A0, P0, N0, A1, P1, N1, A2, P2, N2, A3, P3, N3, A4, P4, N4, A5, P5, N5, A6, P6, N6, A7, P7, N7, signature, briefHelp, detailedHelp) \
params.clear(); \
params.push_back(new osgIntrospection::ParameterInfo(#N0, osgIntrospection::Reflection::getType(extended_typeid<P0>()), osgIntrospection::ParameterInfo::A0)); \
params.push_back(new osgIntrospection::ParameterInfo(#N1, osgIntrospection::Reflection::getType(extended_typeid<P1>()), osgIntrospection::ParameterInfo::A1)); \
params.push_back(new osgIntrospection::ParameterInfo(#N2, osgIntrospection::Reflection::getType(extended_typeid<P2>()), osgIntrospection::ParameterInfo::A2)); \
params.push_back(new osgIntrospection::ParameterInfo(#N3, osgIntrospection::Reflection::getType(extended_typeid<P3>()), osgIntrospection::ParameterInfo::A3)); \
params.push_back(new osgIntrospection::ParameterInfo(#N4, osgIntrospection::Reflection::getType(extended_typeid<P4>()), osgIntrospection::ParameterInfo::A4)); \
params.push_back(new osgIntrospection::ParameterInfo(#N5, osgIntrospection::Reflection::getType(extended_typeid<P5>()), osgIntrospection::ParameterInfo::A5)); \
params.push_back(new osgIntrospection::ParameterInfo(#N6, osgIntrospection::Reflection::getType(extended_typeid<P6>()), osgIntrospection::ParameterInfo::A6)); \
params.push_back(new osgIntrospection::ParameterInfo(#N7, osgIntrospection::Reflection::getType(extended_typeid<P7>()), osgIntrospection::ParameterInfo::A7)); \
From David Callu: " the main problem is the wrapper generation: The PropertyInfo class use MethodInfo class to access to the value. When the property are define with the I_Property* macro, the MethodInfo use by the property to have access to the value are instancied in the I_Property* macro, but there are already instantied by the I_Method* macro before secondary problem: - the function used by the property could no be customized in the genwrapper.conf file - an array property can't insert a value - the std::map reflector (and indexedProperty in general) haven't remove method - about the help in wrapper ... why not ... solution : To use the function define by the I_Method, I add a MethodInfo variable in the I_Method0 macro old macro : #define I_Method0(ret, fn) (\ params.clear(),\ addMethod(new osgIntrospection::TypedMethodIn fo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params))) new macro : #define I_Method0(ret, fn, signature, briefHelp, detailedHelp) \ params.clear(); \ osgIntrospection::MethodInfo* signature = addMethod(new osgIntrospection::TypedMethodInfo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature) the osgIntrospection::MethodInfo* signature is used by the I_Property macro to define the MethodInfo that it use so for I_Property macro : old macro : #define I_PropertyWithReturnType(t, n, r) \ cap=addProperty(new osgIntrospection::PropertyInfo(osgIntrospection::Reflection::getType(typeid(reflected_type)), osgIntrospection::Reflection::getType(typeid(t)), #n, \ I_Method0(t, get##n), \ I_Method1(r, set##n, IN, t, value))) new macro: #define I_SimpleProperty(t, n, get, set) \ get, \ set)) The genwrapper has been modified in this way. The method signature is define by the prototype of the method For example, the "const char* libraryName();" have "__C5_char_P1__libraryName" for signature solution for secondary problem: The genwrapper accept new tokens in the configuration to custumize the property. The new PropertyInserter and the CustomPropertyInsertAttribute class has been defined The PropertyRemover has been added to the StdMapReflector The _briefHelp and _detailedHelp variable has been added in PropertyInfo, MethodInfo and ContructorInfo class modification: I have modify the genwrapper files Configuration.cpp Configuration.h add some tokens to custumize the property Doxyfile.template add the comment in the output xml genwrapper.conf customize some property in osg::Geometry RegistryBuilder.h RegistryBuilder.cpp add the process_help function (to extract help from xml) TypeRegister.cpp TypeRegister.h optimize the property detection TypeDesc.h TypeDesc.cpp modify FunctionDesc and PropertyDesc WrapperGenerator.h WrapperGenerator.cpp modify the output I also modify the fallowing osgIntrospection files: include/osgIntrospection/Attributes add the PropertyInserter and the CustomPropertyInsertAttribute class include/osgIntrospection/ConstructorInfo add the _briefHelp and _detailedHelp variable in the ConstructorInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/MethodInfo add the _briefHelp and _detailedHelp variable in the MethodInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/PropertyInfo add the _briefHelp and _detailedHelp variable in the PropertyInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/ReflectionMacro remove unused I_Property* macro modify all I_Method macro to accept the help string modify all I_Method macro to define a MethodInfo signature include/osgIntrospection/Reflector add the PropertyInserter in StdVectorReflector and StdListReflector add the PropertyRemover in the StdMapReflector include/osgIntrospection/StaticMethodInfo modify all StaticMethodInfo* to accept the help in parameter include/osgIntrospection/TypedMethodInfo modify all TypedMethodInfo* to accept the help in parameter include/osgIntrospection/TypedConstructorInfo modify all TypedConstructorInfo* to accept the help in parameter include/osgIntrospection/Type add the _briefHelp and _detailedHelp variable in the Type class "
2006-10-17 23:17:06 +08:00
D_MethodInfoType signature = addMethod(new osgIntrospection::TypedMethodInfo8<reflected_type, ret, P0, P1, P2, P3, P4, P5, P6, P7>(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature)
#define I_Method9(ret, fn, A0, P0, N0, A1, P1, N1, A2, P2, N2, A3, P3, N3, A4, P4, N4, A5, P5, N5, A6, P6, N6, A7, P7, N7, A8, P8, N8, signature, briefHelp, detailedHelp) \
params.clear(); \
params.push_back(new osgIntrospection::ParameterInfo(#N0, osgIntrospection::Reflection::getType(extended_typeid<P0>()), osgIntrospection::ParameterInfo::A0)); \
params.push_back(new osgIntrospection::ParameterInfo(#N1, osgIntrospection::Reflection::getType(extended_typeid<P1>()), osgIntrospection::ParameterInfo::A1)); \
params.push_back(new osgIntrospection::ParameterInfo(#N2, osgIntrospection::Reflection::getType(extended_typeid<P2>()), osgIntrospection::ParameterInfo::A2)); \
params.push_back(new osgIntrospection::ParameterInfo(#N3, osgIntrospection::Reflection::getType(extended_typeid<P3>()), osgIntrospection::ParameterInfo::A3)); \
params.push_back(new osgIntrospection::ParameterInfo(#N4, osgIntrospection::Reflection::getType(extended_typeid<P4>()), osgIntrospection::ParameterInfo::A4)); \
params.push_back(new osgIntrospection::ParameterInfo(#N5, osgIntrospection::Reflection::getType(extended_typeid<P5>()), osgIntrospection::ParameterInfo::A5)); \
params.push_back(new osgIntrospection::ParameterInfo(#N6, osgIntrospection::Reflection::getType(extended_typeid<P6>()), osgIntrospection::ParameterInfo::A6)); \
params.push_back(new osgIntrospection::ParameterInfo(#N7, osgIntrospection::Reflection::getType(extended_typeid<P7>()), osgIntrospection::ParameterInfo::A7)); \
params.push_back(new osgIntrospection::ParameterInfo(#N8, osgIntrospection::Reflection::getType(extended_typeid<P8>()), osgIntrospection::ParameterInfo::A8)); \
From David Callu: " the main problem is the wrapper generation: The PropertyInfo class use MethodInfo class to access to the value. When the property are define with the I_Property* macro, the MethodInfo use by the property to have access to the value are instancied in the I_Property* macro, but there are already instantied by the I_Method* macro before secondary problem: - the function used by the property could no be customized in the genwrapper.conf file - an array property can't insert a value - the std::map reflector (and indexedProperty in general) haven't remove method - about the help in wrapper ... why not ... solution : To use the function define by the I_Method, I add a MethodInfo variable in the I_Method0 macro old macro : #define I_Method0(ret, fn) (\ params.clear(),\ addMethod(new osgIntrospection::TypedMethodIn fo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params))) new macro : #define I_Method0(ret, fn, signature, briefHelp, detailedHelp) \ params.clear(); \ osgIntrospection::MethodInfo* signature = addMethod(new osgIntrospection::TypedMethodInfo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature) the osgIntrospection::MethodInfo* signature is used by the I_Property macro to define the MethodInfo that it use so for I_Property macro : old macro : #define I_PropertyWithReturnType(t, n, r) \ cap=addProperty(new osgIntrospection::PropertyInfo(osgIntrospection::Reflection::getType(typeid(reflected_type)), osgIntrospection::Reflection::getType(typeid(t)), #n, \ I_Method0(t, get##n), \ I_Method1(r, set##n, IN, t, value))) new macro: #define I_SimpleProperty(t, n, get, set) \ get, \ set)) The genwrapper has been modified in this way. The method signature is define by the prototype of the method For example, the "const char* libraryName();" have "__C5_char_P1__libraryName" for signature solution for secondary problem: The genwrapper accept new tokens in the configuration to custumize the property. The new PropertyInserter and the CustomPropertyInsertAttribute class has been defined The PropertyRemover has been added to the StdMapReflector The _briefHelp and _detailedHelp variable has been added in PropertyInfo, MethodInfo and ContructorInfo class modification: I have modify the genwrapper files Configuration.cpp Configuration.h add some tokens to custumize the property Doxyfile.template add the comment in the output xml genwrapper.conf customize some property in osg::Geometry RegistryBuilder.h RegistryBuilder.cpp add the process_help function (to extract help from xml) TypeRegister.cpp TypeRegister.h optimize the property detection TypeDesc.h TypeDesc.cpp modify FunctionDesc and PropertyDesc WrapperGenerator.h WrapperGenerator.cpp modify the output I also modify the fallowing osgIntrospection files: include/osgIntrospection/Attributes add the PropertyInserter and the CustomPropertyInsertAttribute class include/osgIntrospection/ConstructorInfo add the _briefHelp and _detailedHelp variable in the ConstructorInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/MethodInfo add the _briefHelp and _detailedHelp variable in the MethodInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/PropertyInfo add the _briefHelp and _detailedHelp variable in the PropertyInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/ReflectionMacro remove unused I_Property* macro modify all I_Method macro to accept the help string modify all I_Method macro to define a MethodInfo signature include/osgIntrospection/Reflector add the PropertyInserter in StdVectorReflector and StdListReflector add the PropertyRemover in the StdMapReflector include/osgIntrospection/StaticMethodInfo modify all StaticMethodInfo* to accept the help in parameter include/osgIntrospection/TypedMethodInfo modify all TypedMethodInfo* to accept the help in parameter include/osgIntrospection/TypedConstructorInfo modify all TypedConstructorInfo* to accept the help in parameter include/osgIntrospection/Type add the _briefHelp and _detailedHelp variable in the Type class "
2006-10-17 23:17:06 +08:00
D_MethodInfoType signature = addMethod(new osgIntrospection::TypedMethodInfo9<reflected_type, ret, P0, P1, P2, P3, P4, P5, P6, P7, P8>(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature)
#define I_Method10(ret, fn, A0, P0, N0, A1, P1, N1, A2, P2, N2, A3, P3, N3, A4, P4, N4, A5, P5, N5, A6, P6, N6, A7, P7, N7, A8, P8, N8, A9, P9, N9, signature, briefHelp, detailedHelp) \
params.clear(); \
params.push_back(new osgIntrospection::ParameterInfo(#N0, osgIntrospection::Reflection::getType(extended_typeid<P0>()), osgIntrospection::ParameterInfo::A0)); \
params.push_back(new osgIntrospection::ParameterInfo(#N1, osgIntrospection::Reflection::getType(extended_typeid<P1>()), osgIntrospection::ParameterInfo::A1)); \
params.push_back(new osgIntrospection::ParameterInfo(#N2, osgIntrospection::Reflection::getType(extended_typeid<P2>()), osgIntrospection::ParameterInfo::A2)); \
params.push_back(new osgIntrospection::ParameterInfo(#N3, osgIntrospection::Reflection::getType(extended_typeid<P3>()), osgIntrospection::ParameterInfo::A3)); \
params.push_back(new osgIntrospection::ParameterInfo(#N4, osgIntrospection::Reflection::getType(extended_typeid<P4>()), osgIntrospection::ParameterInfo::A4)); \
params.push_back(new osgIntrospection::ParameterInfo(#N5, osgIntrospection::Reflection::getType(extended_typeid<P5>()), osgIntrospection::ParameterInfo::A5)); \
params.push_back(new osgIntrospection::ParameterInfo(#N6, osgIntrospection::Reflection::getType(extended_typeid<P6>()), osgIntrospection::ParameterInfo::A6)); \
params.push_back(new osgIntrospection::ParameterInfo(#N7, osgIntrospection::Reflection::getType(extended_typeid<P7>()), osgIntrospection::ParameterInfo::A7)); \
params.push_back(new osgIntrospection::ParameterInfo(#N8, osgIntrospection::Reflection::getType(extended_typeid<P8>()), osgIntrospection::ParameterInfo::A8)); \
params.push_back(new osgIntrospection::ParameterInfo(#N9, osgIntrospection::Reflection::getType(extended_typeid<P9>()), osgIntrospection::ParameterInfo::A9)); \
From David Callu: " the main problem is the wrapper generation: The PropertyInfo class use MethodInfo class to access to the value. When the property are define with the I_Property* macro, the MethodInfo use by the property to have access to the value are instancied in the I_Property* macro, but there are already instantied by the I_Method* macro before secondary problem: - the function used by the property could no be customized in the genwrapper.conf file - an array property can't insert a value - the std::map reflector (and indexedProperty in general) haven't remove method - about the help in wrapper ... why not ... solution : To use the function define by the I_Method, I add a MethodInfo variable in the I_Method0 macro old macro : #define I_Method0(ret, fn) (\ params.clear(),\ addMethod(new osgIntrospection::TypedMethodIn fo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params))) new macro : #define I_Method0(ret, fn, signature, briefHelp, detailedHelp) \ params.clear(); \ osgIntrospection::MethodInfo* signature = addMethod(new osgIntrospection::TypedMethodInfo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature) the osgIntrospection::MethodInfo* signature is used by the I_Property macro to define the MethodInfo that it use so for I_Property macro : old macro : #define I_PropertyWithReturnType(t, n, r) \ cap=addProperty(new osgIntrospection::PropertyInfo(osgIntrospection::Reflection::getType(typeid(reflected_type)), osgIntrospection::Reflection::getType(typeid(t)), #n, \ I_Method0(t, get##n), \ I_Method1(r, set##n, IN, t, value))) new macro: #define I_SimpleProperty(t, n, get, set) \ get, \ set)) The genwrapper has been modified in this way. The method signature is define by the prototype of the method For example, the "const char* libraryName();" have "__C5_char_P1__libraryName" for signature solution for secondary problem: The genwrapper accept new tokens in the configuration to custumize the property. The new PropertyInserter and the CustomPropertyInsertAttribute class has been defined The PropertyRemover has been added to the StdMapReflector The _briefHelp and _detailedHelp variable has been added in PropertyInfo, MethodInfo and ContructorInfo class modification: I have modify the genwrapper files Configuration.cpp Configuration.h add some tokens to custumize the property Doxyfile.template add the comment in the output xml genwrapper.conf customize some property in osg::Geometry RegistryBuilder.h RegistryBuilder.cpp add the process_help function (to extract help from xml) TypeRegister.cpp TypeRegister.h optimize the property detection TypeDesc.h TypeDesc.cpp modify FunctionDesc and PropertyDesc WrapperGenerator.h WrapperGenerator.cpp modify the output I also modify the fallowing osgIntrospection files: include/osgIntrospection/Attributes add the PropertyInserter and the CustomPropertyInsertAttribute class include/osgIntrospection/ConstructorInfo add the _briefHelp and _detailedHelp variable in the ConstructorInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/MethodInfo add the _briefHelp and _detailedHelp variable in the MethodInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/PropertyInfo add the _briefHelp and _detailedHelp variable in the PropertyInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/ReflectionMacro remove unused I_Property* macro modify all I_Method macro to accept the help string modify all I_Method macro to define a MethodInfo signature include/osgIntrospection/Reflector add the PropertyInserter in StdVectorReflector and StdListReflector add the PropertyRemover in the StdMapReflector include/osgIntrospection/StaticMethodInfo modify all StaticMethodInfo* to accept the help in parameter include/osgIntrospection/TypedMethodInfo modify all TypedMethodInfo* to accept the help in parameter include/osgIntrospection/TypedConstructorInfo modify all TypedConstructorInfo* to accept the help in parameter include/osgIntrospection/Type add the _briefHelp and _detailedHelp variable in the Type class "
2006-10-17 23:17:06 +08:00
D_MethodInfoType signature = addMethod(new osgIntrospection::TypedMethodInfo10<reflected_type, ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9>(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature)
#define I_Method11(ret, fn, A0, P0, N0, A1, P1, N1, A2, P2, N2, A3, P3, N3, A4, P4, N4, A5, P5, N5, A6, P6, N6, A7, P7, N7, A8, P8, N8, A9, P9, N9, A10, P10, N10, signature, briefHelp, detailedHelp) \
params.clear(); \
params.push_back(new osgIntrospection::ParameterInfo(#N0, osgIntrospection::Reflection::getType(extended_typeid<P0>()), osgIntrospection::ParameterInfo::A0)); \
params.push_back(new osgIntrospection::ParameterInfo(#N1, osgIntrospection::Reflection::getType(extended_typeid<P1>()), osgIntrospection::ParameterInfo::A1)); \
params.push_back(new osgIntrospection::ParameterInfo(#N2, osgIntrospection::Reflection::getType(extended_typeid<P2>()), osgIntrospection::ParameterInfo::A2)); \
params.push_back(new osgIntrospection::ParameterInfo(#N3, osgIntrospection::Reflection::getType(extended_typeid<P3>()), osgIntrospection::ParameterInfo::A3)); \
params.push_back(new osgIntrospection::ParameterInfo(#N4, osgIntrospection::Reflection::getType(extended_typeid<P4>()), osgIntrospection::ParameterInfo::A4)); \
params.push_back(new osgIntrospection::ParameterInfo(#N5, osgIntrospection::Reflection::getType(extended_typeid<P5>()), osgIntrospection::ParameterInfo::A5)); \
params.push_back(new osgIntrospection::ParameterInfo(#N6, osgIntrospection::Reflection::getType(extended_typeid<P6>()), osgIntrospection::ParameterInfo::A6)); \
params.push_back(new osgIntrospection::ParameterInfo(#N7, osgIntrospection::Reflection::getType(extended_typeid<P7>()), osgIntrospection::ParameterInfo::A7)); \
params.push_back(new osgIntrospection::ParameterInfo(#N8, osgIntrospection::Reflection::getType(extended_typeid<P8>()), osgIntrospection::ParameterInfo::A8)); \
params.push_back(new osgIntrospection::ParameterInfo(#N9, osgIntrospection::Reflection::getType(extended_typeid<P9>()), osgIntrospection::ParameterInfo::A9)); \
params.push_back(new osgIntrospection::ParameterInfo(#N10, osgIntrospection::Reflection::getType(extended_typeid<P10>()), osgIntrospection::ParameterInfo::A10)); \
From David Callu: " the main problem is the wrapper generation: The PropertyInfo class use MethodInfo class to access to the value. When the property are define with the I_Property* macro, the MethodInfo use by the property to have access to the value are instancied in the I_Property* macro, but there are already instantied by the I_Method* macro before secondary problem: - the function used by the property could no be customized in the genwrapper.conf file - an array property can't insert a value - the std::map reflector (and indexedProperty in general) haven't remove method - about the help in wrapper ... why not ... solution : To use the function define by the I_Method, I add a MethodInfo variable in the I_Method0 macro old macro : #define I_Method0(ret, fn) (\ params.clear(),\ addMethod(new osgIntrospection::TypedMethodIn fo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params))) new macro : #define I_Method0(ret, fn, signature, briefHelp, detailedHelp) \ params.clear(); \ osgIntrospection::MethodInfo* signature = addMethod(new osgIntrospection::TypedMethodInfo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature) the osgIntrospection::MethodInfo* signature is used by the I_Property macro to define the MethodInfo that it use so for I_Property macro : old macro : #define I_PropertyWithReturnType(t, n, r) \ cap=addProperty(new osgIntrospection::PropertyInfo(osgIntrospection::Reflection::getType(typeid(reflected_type)), osgIntrospection::Reflection::getType(typeid(t)), #n, \ I_Method0(t, get##n), \ I_Method1(r, set##n, IN, t, value))) new macro: #define I_SimpleProperty(t, n, get, set) \ get, \ set)) The genwrapper has been modified in this way. The method signature is define by the prototype of the method For example, the "const char* libraryName();" have "__C5_char_P1__libraryName" for signature solution for secondary problem: The genwrapper accept new tokens in the configuration to custumize the property. The new PropertyInserter and the CustomPropertyInsertAttribute class has been defined The PropertyRemover has been added to the StdMapReflector The _briefHelp and _detailedHelp variable has been added in PropertyInfo, MethodInfo and ContructorInfo class modification: I have modify the genwrapper files Configuration.cpp Configuration.h add some tokens to custumize the property Doxyfile.template add the comment in the output xml genwrapper.conf customize some property in osg::Geometry RegistryBuilder.h RegistryBuilder.cpp add the process_help function (to extract help from xml) TypeRegister.cpp TypeRegister.h optimize the property detection TypeDesc.h TypeDesc.cpp modify FunctionDesc and PropertyDesc WrapperGenerator.h WrapperGenerator.cpp modify the output I also modify the fallowing osgIntrospection files: include/osgIntrospection/Attributes add the PropertyInserter and the CustomPropertyInsertAttribute class include/osgIntrospection/ConstructorInfo add the _briefHelp and _detailedHelp variable in the ConstructorInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/MethodInfo add the _briefHelp and _detailedHelp variable in the MethodInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/PropertyInfo add the _briefHelp and _detailedHelp variable in the PropertyInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/ReflectionMacro remove unused I_Property* macro modify all I_Method macro to accept the help string modify all I_Method macro to define a MethodInfo signature include/osgIntrospection/Reflector add the PropertyInserter in StdVectorReflector and StdListReflector add the PropertyRemover in the StdMapReflector include/osgIntrospection/StaticMethodInfo modify all StaticMethodInfo* to accept the help in parameter include/osgIntrospection/TypedMethodInfo modify all TypedMethodInfo* to accept the help in parameter include/osgIntrospection/TypedConstructorInfo modify all TypedConstructorInfo* to accept the help in parameter include/osgIntrospection/Type add the _briefHelp and _detailedHelp variable in the Type class "
2006-10-17 23:17:06 +08:00
D_MethodInfoType signature = addMethod(new osgIntrospection::TypedMethodInfo11<reflected_type, ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10>(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature)
#define I_Method12(ret, fn, A0, P0, N0, A1, P1, N1, A2, P2, N2, A3, P3, N3, A4, P4, N4, A5, P5, N5, A6, P6, N6, A7, P7, N7, A8, P8, N8, A9, P9, N9, A10, P10, N10, A11, P11, N11, signature, briefHelp, detailedHelp) \
params.clear(); \
params.push_back(new osgIntrospection::ParameterInfo(#N0, osgIntrospection::Reflection::getType(extended_typeid<P0>()), osgIntrospection::ParameterInfo::A0)); \
params.push_back(new osgIntrospection::ParameterInfo(#N1, osgIntrospection::Reflection::getType(extended_typeid<P1>()), osgIntrospection::ParameterInfo::A1)); \
params.push_back(new osgIntrospection::ParameterInfo(#N2, osgIntrospection::Reflection::getType(extended_typeid<P2>()), osgIntrospection::ParameterInfo::A2)); \
params.push_back(new osgIntrospection::ParameterInfo(#N3, osgIntrospection::Reflection::getType(extended_typeid<P3>()), osgIntrospection::ParameterInfo::A3)); \
params.push_back(new osgIntrospection::ParameterInfo(#N4, osgIntrospection::Reflection::getType(extended_typeid<P4>()), osgIntrospection::ParameterInfo::A4)); \
params.push_back(new osgIntrospection::ParameterInfo(#N5, osgIntrospection::Reflection::getType(extended_typeid<P5>()), osgIntrospection::ParameterInfo::A5)); \
params.push_back(new osgIntrospection::ParameterInfo(#N6, osgIntrospection::Reflection::getType(extended_typeid<P6>()), osgIntrospection::ParameterInfo::A6)); \
params.push_back(new osgIntrospection::ParameterInfo(#N7, osgIntrospection::Reflection::getType(extended_typeid<P7>()), osgIntrospection::ParameterInfo::A7)); \
params.push_back(new osgIntrospection::ParameterInfo(#N8, osgIntrospection::Reflection::getType(extended_typeid<P8>()), osgIntrospection::ParameterInfo::A8)); \
params.push_back(new osgIntrospection::ParameterInfo(#N9, osgIntrospection::Reflection::getType(extended_typeid<P9>()), osgIntrospection::ParameterInfo::A9)); \
params.push_back(new osgIntrospection::ParameterInfo(#N10, osgIntrospection::Reflection::getType(extended_typeid<P10>()), osgIntrospection::ParameterInfo::A10)); \
params.push_back(new osgIntrospection::ParameterInfo(#N11, osgIntrospection::Reflection::getType(extended_typeid<P11>()), osgIntrospection::ParameterInfo::A11)); \
From David Callu: " the main problem is the wrapper generation: The PropertyInfo class use MethodInfo class to access to the value. When the property are define with the I_Property* macro, the MethodInfo use by the property to have access to the value are instancied in the I_Property* macro, but there are already instantied by the I_Method* macro before secondary problem: - the function used by the property could no be customized in the genwrapper.conf file - an array property can't insert a value - the std::map reflector (and indexedProperty in general) haven't remove method - about the help in wrapper ... why not ... solution : To use the function define by the I_Method, I add a MethodInfo variable in the I_Method0 macro old macro : #define I_Method0(ret, fn) (\ params.clear(),\ addMethod(new osgIntrospection::TypedMethodIn fo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params))) new macro : #define I_Method0(ret, fn, signature, briefHelp, detailedHelp) \ params.clear(); \ osgIntrospection::MethodInfo* signature = addMethod(new osgIntrospection::TypedMethodInfo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature) the osgIntrospection::MethodInfo* signature is used by the I_Property macro to define the MethodInfo that it use so for I_Property macro : old macro : #define I_PropertyWithReturnType(t, n, r) \ cap=addProperty(new osgIntrospection::PropertyInfo(osgIntrospection::Reflection::getType(typeid(reflected_type)), osgIntrospection::Reflection::getType(typeid(t)), #n, \ I_Method0(t, get##n), \ I_Method1(r, set##n, IN, t, value))) new macro: #define I_SimpleProperty(t, n, get, set) \ get, \ set)) The genwrapper has been modified in this way. The method signature is define by the prototype of the method For example, the "const char* libraryName();" have "__C5_char_P1__libraryName" for signature solution for secondary problem: The genwrapper accept new tokens in the configuration to custumize the property. The new PropertyInserter and the CustomPropertyInsertAttribute class has been defined The PropertyRemover has been added to the StdMapReflector The _briefHelp and _detailedHelp variable has been added in PropertyInfo, MethodInfo and ContructorInfo class modification: I have modify the genwrapper files Configuration.cpp Configuration.h add some tokens to custumize the property Doxyfile.template add the comment in the output xml genwrapper.conf customize some property in osg::Geometry RegistryBuilder.h RegistryBuilder.cpp add the process_help function (to extract help from xml) TypeRegister.cpp TypeRegister.h optimize the property detection TypeDesc.h TypeDesc.cpp modify FunctionDesc and PropertyDesc WrapperGenerator.h WrapperGenerator.cpp modify the output I also modify the fallowing osgIntrospection files: include/osgIntrospection/Attributes add the PropertyInserter and the CustomPropertyInsertAttribute class include/osgIntrospection/ConstructorInfo add the _briefHelp and _detailedHelp variable in the ConstructorInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/MethodInfo add the _briefHelp and _detailedHelp variable in the MethodInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/PropertyInfo add the _briefHelp and _detailedHelp variable in the PropertyInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/ReflectionMacro remove unused I_Property* macro modify all I_Method macro to accept the help string modify all I_Method macro to define a MethodInfo signature include/osgIntrospection/Reflector add the PropertyInserter in StdVectorReflector and StdListReflector add the PropertyRemover in the StdMapReflector include/osgIntrospection/StaticMethodInfo modify all StaticMethodInfo* to accept the help in parameter include/osgIntrospection/TypedMethodInfo modify all TypedMethodInfo* to accept the help in parameter include/osgIntrospection/TypedConstructorInfo modify all TypedConstructorInfo* to accept the help in parameter include/osgIntrospection/Type add the _briefHelp and _detailedHelp variable in the Type class "
2006-10-17 23:17:06 +08:00
D_MethodInfoType signature = addMethod(new osgIntrospection::TypedMethodInfo12<reflected_type, ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11>(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature)
#define I_Method13(ret, fn, A0, P0, N0, A1, P1, N1, A2, P2, N2, A3, P3, N3, A4, P4, N4, A5, P5, N5, A6, P6, N6, A7, P7, N7, A8, P8, N8, A9, P9, N9, A10, P10, N10, A11, P11, N11, A12, P12, N12, signature, briefHelp, detailedHelp) \
params.clear(); \
params.push_back(new osgIntrospection::ParameterInfo(#N0, osgIntrospection::Reflection::getType(extended_typeid<P0>()), osgIntrospection::ParameterInfo::A0)); \
params.push_back(new osgIntrospection::ParameterInfo(#N1, osgIntrospection::Reflection::getType(extended_typeid<P1>()), osgIntrospection::ParameterInfo::A1)); \
params.push_back(new osgIntrospection::ParameterInfo(#N2, osgIntrospection::Reflection::getType(extended_typeid<P2>()), osgIntrospection::ParameterInfo::A2)); \
params.push_back(new osgIntrospection::ParameterInfo(#N3, osgIntrospection::Reflection::getType(extended_typeid<P3>()), osgIntrospection::ParameterInfo::A3)); \
params.push_back(new osgIntrospection::ParameterInfo(#N4, osgIntrospection::Reflection::getType(extended_typeid<P4>()), osgIntrospection::ParameterInfo::A4)); \
params.push_back(new osgIntrospection::ParameterInfo(#N5, osgIntrospection::Reflection::getType(extended_typeid<P5>()), osgIntrospection::ParameterInfo::A5)); \
params.push_back(new osgIntrospection::ParameterInfo(#N6, osgIntrospection::Reflection::getType(extended_typeid<P6>()), osgIntrospection::ParameterInfo::A6)); \
params.push_back(new osgIntrospection::ParameterInfo(#N7, osgIntrospection::Reflection::getType(extended_typeid<P7>()), osgIntrospection::ParameterInfo::A7)); \
params.push_back(new osgIntrospection::ParameterInfo(#N8, osgIntrospection::Reflection::getType(extended_typeid<P8>()), osgIntrospection::ParameterInfo::A8)); \
params.push_back(new osgIntrospection::ParameterInfo(#N9, osgIntrospection::Reflection::getType(extended_typeid<P9>()), osgIntrospection::ParameterInfo::A9)); \
params.push_back(new osgIntrospection::ParameterInfo(#N10, osgIntrospection::Reflection::getType(extended_typeid<P10>()), osgIntrospection::ParameterInfo::A10)); \
params.push_back(new osgIntrospection::ParameterInfo(#N11, osgIntrospection::Reflection::getType(extended_typeid<P11>()), osgIntrospection::ParameterInfo::A11)); \
params.push_back(new osgIntrospection::ParameterInfo(#N12, osgIntrospection::Reflection::getType(extended_typeid<P12>()), osgIntrospection::ParameterInfo::A12)); \
From David Callu: " the main problem is the wrapper generation: The PropertyInfo class use MethodInfo class to access to the value. When the property are define with the I_Property* macro, the MethodInfo use by the property to have access to the value are instancied in the I_Property* macro, but there are already instantied by the I_Method* macro before secondary problem: - the function used by the property could no be customized in the genwrapper.conf file - an array property can't insert a value - the std::map reflector (and indexedProperty in general) haven't remove method - about the help in wrapper ... why not ... solution : To use the function define by the I_Method, I add a MethodInfo variable in the I_Method0 macro old macro : #define I_Method0(ret, fn) (\ params.clear(),\ addMethod(new osgIntrospection::TypedMethodIn fo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params))) new macro : #define I_Method0(ret, fn, signature, briefHelp, detailedHelp) \ params.clear(); \ osgIntrospection::MethodInfo* signature = addMethod(new osgIntrospection::TypedMethodInfo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature) the osgIntrospection::MethodInfo* signature is used by the I_Property macro to define the MethodInfo that it use so for I_Property macro : old macro : #define I_PropertyWithReturnType(t, n, r) \ cap=addProperty(new osgIntrospection::PropertyInfo(osgIntrospection::Reflection::getType(typeid(reflected_type)), osgIntrospection::Reflection::getType(typeid(t)), #n, \ I_Method0(t, get##n), \ I_Method1(r, set##n, IN, t, value))) new macro: #define I_SimpleProperty(t, n, get, set) \ get, \ set)) The genwrapper has been modified in this way. The method signature is define by the prototype of the method For example, the "const char* libraryName();" have "__C5_char_P1__libraryName" for signature solution for secondary problem: The genwrapper accept new tokens in the configuration to custumize the property. The new PropertyInserter and the CustomPropertyInsertAttribute class has been defined The PropertyRemover has been added to the StdMapReflector The _briefHelp and _detailedHelp variable has been added in PropertyInfo, MethodInfo and ContructorInfo class modification: I have modify the genwrapper files Configuration.cpp Configuration.h add some tokens to custumize the property Doxyfile.template add the comment in the output xml genwrapper.conf customize some property in osg::Geometry RegistryBuilder.h RegistryBuilder.cpp add the process_help function (to extract help from xml) TypeRegister.cpp TypeRegister.h optimize the property detection TypeDesc.h TypeDesc.cpp modify FunctionDesc and PropertyDesc WrapperGenerator.h WrapperGenerator.cpp modify the output I also modify the fallowing osgIntrospection files: include/osgIntrospection/Attributes add the PropertyInserter and the CustomPropertyInsertAttribute class include/osgIntrospection/ConstructorInfo add the _briefHelp and _detailedHelp variable in the ConstructorInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/MethodInfo add the _briefHelp and _detailedHelp variable in the MethodInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/PropertyInfo add the _briefHelp and _detailedHelp variable in the PropertyInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/ReflectionMacro remove unused I_Property* macro modify all I_Method macro to accept the help string modify all I_Method macro to define a MethodInfo signature include/osgIntrospection/Reflector add the PropertyInserter in StdVectorReflector and StdListReflector add the PropertyRemover in the StdMapReflector include/osgIntrospection/StaticMethodInfo modify all StaticMethodInfo* to accept the help in parameter include/osgIntrospection/TypedMethodInfo modify all TypedMethodInfo* to accept the help in parameter include/osgIntrospection/TypedConstructorInfo modify all TypedConstructorInfo* to accept the help in parameter include/osgIntrospection/Type add the _briefHelp and _detailedHelp variable in the Type class "
2006-10-17 23:17:06 +08:00
D_MethodInfoType signature = addMethod(new osgIntrospection::TypedMethodInfo13<reflected_type, ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12>(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature)
#define I_Method14(ret, fn, A0, P0, N0, A1, P1, N1, A2, P2, N2, A3, P3, N3, A4, P4, N4, A5, P5, N5, A6, P6, N6, A7, P7, N7, A8, P8, N8, A9, P9, N9, A10, P10, N10, A11, P11, N11, A12, P12, N12, A13, P13, N13, signature, briefHelp, detailedHelp) \
params.clear(); \
params.push_back(new osgIntrospection::ParameterInfo(#N0, osgIntrospection::Reflection::getType(extended_typeid<P0>()), osgIntrospection::ParameterInfo::A0)); \
params.push_back(new osgIntrospection::ParameterInfo(#N1, osgIntrospection::Reflection::getType(extended_typeid<P1>()), osgIntrospection::ParameterInfo::A1)); \
params.push_back(new osgIntrospection::ParameterInfo(#N2, osgIntrospection::Reflection::getType(extended_typeid<P2>()), osgIntrospection::ParameterInfo::A2)); \
params.push_back(new osgIntrospection::ParameterInfo(#N3, osgIntrospection::Reflection::getType(extended_typeid<P3>()), osgIntrospection::ParameterInfo::A3)); \
params.push_back(new osgIntrospection::ParameterInfo(#N4, osgIntrospection::Reflection::getType(extended_typeid<P4>()), osgIntrospection::ParameterInfo::A4)); \
params.push_back(new osgIntrospection::ParameterInfo(#N5, osgIntrospection::Reflection::getType(extended_typeid<P5>()), osgIntrospection::ParameterInfo::A5)); \
params.push_back(new osgIntrospection::ParameterInfo(#N6, osgIntrospection::Reflection::getType(extended_typeid<P6>()), osgIntrospection::ParameterInfo::A6)); \
params.push_back(new osgIntrospection::ParameterInfo(#N7, osgIntrospection::Reflection::getType(extended_typeid<P7>()), osgIntrospection::ParameterInfo::A7)); \
params.push_back(new osgIntrospection::ParameterInfo(#N8, osgIntrospection::Reflection::getType(extended_typeid<P8>()), osgIntrospection::ParameterInfo::A8)); \
params.push_back(new osgIntrospection::ParameterInfo(#N9, osgIntrospection::Reflection::getType(extended_typeid<P9>()), osgIntrospection::ParameterInfo::A9)); \
params.push_back(new osgIntrospection::ParameterInfo(#N10, osgIntrospection::Reflection::getType(extended_typeid<P10>()), osgIntrospection::ParameterInfo::A10)); \
params.push_back(new osgIntrospection::ParameterInfo(#N11, osgIntrospection::Reflection::getType(extended_typeid<P11>()), osgIntrospection::ParameterInfo::A11)); \
params.push_back(new osgIntrospection::ParameterInfo(#N12, osgIntrospection::Reflection::getType(extended_typeid<P12>()), osgIntrospection::ParameterInfo::A12)); \
params.push_back(new osgIntrospection::ParameterInfo(#N13, osgIntrospection::Reflection::getType(extended_typeid<P13>()), osgIntrospection::ParameterInfo::A13)); \
From David Callu: " the main problem is the wrapper generation: The PropertyInfo class use MethodInfo class to access to the value. When the property are define with the I_Property* macro, the MethodInfo use by the property to have access to the value are instancied in the I_Property* macro, but there are already instantied by the I_Method* macro before secondary problem: - the function used by the property could no be customized in the genwrapper.conf file - an array property can't insert a value - the std::map reflector (and indexedProperty in general) haven't remove method - about the help in wrapper ... why not ... solution : To use the function define by the I_Method, I add a MethodInfo variable in the I_Method0 macro old macro : #define I_Method0(ret, fn) (\ params.clear(),\ addMethod(new osgIntrospection::TypedMethodIn fo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params))) new macro : #define I_Method0(ret, fn, signature, briefHelp, detailedHelp) \ params.clear(); \ osgIntrospection::MethodInfo* signature = addMethod(new osgIntrospection::TypedMethodInfo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature) the osgIntrospection::MethodInfo* signature is used by the I_Property macro to define the MethodInfo that it use so for I_Property macro : old macro : #define I_PropertyWithReturnType(t, n, r) \ cap=addProperty(new osgIntrospection::PropertyInfo(osgIntrospection::Reflection::getType(typeid(reflected_type)), osgIntrospection::Reflection::getType(typeid(t)), #n, \ I_Method0(t, get##n), \ I_Method1(r, set##n, IN, t, value))) new macro: #define I_SimpleProperty(t, n, get, set) \ get, \ set)) The genwrapper has been modified in this way. The method signature is define by the prototype of the method For example, the "const char* libraryName();" have "__C5_char_P1__libraryName" for signature solution for secondary problem: The genwrapper accept new tokens in the configuration to custumize the property. The new PropertyInserter and the CustomPropertyInsertAttribute class has been defined The PropertyRemover has been added to the StdMapReflector The _briefHelp and _detailedHelp variable has been added in PropertyInfo, MethodInfo and ContructorInfo class modification: I have modify the genwrapper files Configuration.cpp Configuration.h add some tokens to custumize the property Doxyfile.template add the comment in the output xml genwrapper.conf customize some property in osg::Geometry RegistryBuilder.h RegistryBuilder.cpp add the process_help function (to extract help from xml) TypeRegister.cpp TypeRegister.h optimize the property detection TypeDesc.h TypeDesc.cpp modify FunctionDesc and PropertyDesc WrapperGenerator.h WrapperGenerator.cpp modify the output I also modify the fallowing osgIntrospection files: include/osgIntrospection/Attributes add the PropertyInserter and the CustomPropertyInsertAttribute class include/osgIntrospection/ConstructorInfo add the _briefHelp and _detailedHelp variable in the ConstructorInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/MethodInfo add the _briefHelp and _detailedHelp variable in the MethodInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/PropertyInfo add the _briefHelp and _detailedHelp variable in the PropertyInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/ReflectionMacro remove unused I_Property* macro modify all I_Method macro to accept the help string modify all I_Method macro to define a MethodInfo signature include/osgIntrospection/Reflector add the PropertyInserter in StdVectorReflector and StdListReflector add the PropertyRemover in the StdMapReflector include/osgIntrospection/StaticMethodInfo modify all StaticMethodInfo* to accept the help in parameter include/osgIntrospection/TypedMethodInfo modify all TypedMethodInfo* to accept the help in parameter include/osgIntrospection/TypedConstructorInfo modify all TypedConstructorInfo* to accept the help in parameter include/osgIntrospection/Type add the _briefHelp and _detailedHelp variable in the Type class "
2006-10-17 23:17:06 +08:00
D_MethodInfoType signature = addMethod(new osgIntrospection::TypedMethodInfo14<reflected_type, ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13>(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature)
#define I_Method15(ret, fn, A0, P0, N0, A1, P1, N1, A2, P2, N2, A3, P3, N3, A4, P4, N4, A5, P5, N5, A6, P6, N6, A7, P7, N7, A8, P8, N8, A9, P9, N9, A10, P10, N10, A11, P11, N11, A12, P12, N12, A13, P13, N13, A14, P14, N14, signature, briefHelp, detailedHelp) \
params.clear(); \
params.push_back(new osgIntrospection::ParameterInfo(#N0, osgIntrospection::Reflection::getType(extended_typeid<P0>()), osgIntrospection::ParameterInfo::A0)); \
params.push_back(new osgIntrospection::ParameterInfo(#N1, osgIntrospection::Reflection::getType(extended_typeid<P1>()), osgIntrospection::ParameterInfo::A1)); \
params.push_back(new osgIntrospection::ParameterInfo(#N2, osgIntrospection::Reflection::getType(extended_typeid<P2>()), osgIntrospection::ParameterInfo::A2)); \
params.push_back(new osgIntrospection::ParameterInfo(#N3, osgIntrospection::Reflection::getType(extended_typeid<P3>()), osgIntrospection::ParameterInfo::A3)); \
params.push_back(new osgIntrospection::ParameterInfo(#N4, osgIntrospection::Reflection::getType(extended_typeid<P4>()), osgIntrospection::ParameterInfo::A4)); \
params.push_back(new osgIntrospection::ParameterInfo(#N5, osgIntrospection::Reflection::getType(extended_typeid<P5>()), osgIntrospection::ParameterInfo::A5)); \
params.push_back(new osgIntrospection::ParameterInfo(#N6, osgIntrospection::Reflection::getType(extended_typeid<P6>()), osgIntrospection::ParameterInfo::A6)); \
params.push_back(new osgIntrospection::ParameterInfo(#N7, osgIntrospection::Reflection::getType(extended_typeid<P7>()), osgIntrospection::ParameterInfo::A7)); \
params.push_back(new osgIntrospection::ParameterInfo(#N8, osgIntrospection::Reflection::getType(extended_typeid<P8>()), osgIntrospection::ParameterInfo::A8)); \
params.push_back(new osgIntrospection::ParameterInfo(#N9, osgIntrospection::Reflection::getType(extended_typeid<P9>()), osgIntrospection::ParameterInfo::A9)); \
params.push_back(new osgIntrospection::ParameterInfo(#N10, osgIntrospection::Reflection::getType(extended_typeid<P10>()), osgIntrospection::ParameterInfo::A10)); \
params.push_back(new osgIntrospection::ParameterInfo(#N11, osgIntrospection::Reflection::getType(extended_typeid<P11>()), osgIntrospection::ParameterInfo::A11)); \
params.push_back(new osgIntrospection::ParameterInfo(#N12, osgIntrospection::Reflection::getType(extended_typeid<P12>()), osgIntrospection::ParameterInfo::A12)); \
params.push_back(new osgIntrospection::ParameterInfo(#N13, osgIntrospection::Reflection::getType(extended_typeid<P13>()), osgIntrospection::ParameterInfo::A13)); \
params.push_back(new osgIntrospection::ParameterInfo(#N14, osgIntrospection::Reflection::getType(extended_typeid<P14>()), osgIntrospection::ParameterInfo::A14)); \
From David Callu: " the main problem is the wrapper generation: The PropertyInfo class use MethodInfo class to access to the value. When the property are define with the I_Property* macro, the MethodInfo use by the property to have access to the value are instancied in the I_Property* macro, but there are already instantied by the I_Method* macro before secondary problem: - the function used by the property could no be customized in the genwrapper.conf file - an array property can't insert a value - the std::map reflector (and indexedProperty in general) haven't remove method - about the help in wrapper ... why not ... solution : To use the function define by the I_Method, I add a MethodInfo variable in the I_Method0 macro old macro : #define I_Method0(ret, fn) (\ params.clear(),\ addMethod(new osgIntrospection::TypedMethodIn fo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params))) new macro : #define I_Method0(ret, fn, signature, briefHelp, detailedHelp) \ params.clear(); \ osgIntrospection::MethodInfo* signature = addMethod(new osgIntrospection::TypedMethodInfo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature) the osgIntrospection::MethodInfo* signature is used by the I_Property macro to define the MethodInfo that it use so for I_Property macro : old macro : #define I_PropertyWithReturnType(t, n, r) \ cap=addProperty(new osgIntrospection::PropertyInfo(osgIntrospection::Reflection::getType(typeid(reflected_type)), osgIntrospection::Reflection::getType(typeid(t)), #n, \ I_Method0(t, get##n), \ I_Method1(r, set##n, IN, t, value))) new macro: #define I_SimpleProperty(t, n, get, set) \ get, \ set)) The genwrapper has been modified in this way. The method signature is define by the prototype of the method For example, the "const char* libraryName();" have "__C5_char_P1__libraryName" for signature solution for secondary problem: The genwrapper accept new tokens in the configuration to custumize the property. The new PropertyInserter and the CustomPropertyInsertAttribute class has been defined The PropertyRemover has been added to the StdMapReflector The _briefHelp and _detailedHelp variable has been added in PropertyInfo, MethodInfo and ContructorInfo class modification: I have modify the genwrapper files Configuration.cpp Configuration.h add some tokens to custumize the property Doxyfile.template add the comment in the output xml genwrapper.conf customize some property in osg::Geometry RegistryBuilder.h RegistryBuilder.cpp add the process_help function (to extract help from xml) TypeRegister.cpp TypeRegister.h optimize the property detection TypeDesc.h TypeDesc.cpp modify FunctionDesc and PropertyDesc WrapperGenerator.h WrapperGenerator.cpp modify the output I also modify the fallowing osgIntrospection files: include/osgIntrospection/Attributes add the PropertyInserter and the CustomPropertyInsertAttribute class include/osgIntrospection/ConstructorInfo add the _briefHelp and _detailedHelp variable in the ConstructorInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/MethodInfo add the _briefHelp and _detailedHelp variable in the MethodInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/PropertyInfo add the _briefHelp and _detailedHelp variable in the PropertyInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/ReflectionMacro remove unused I_Property* macro modify all I_Method macro to accept the help string modify all I_Method macro to define a MethodInfo signature include/osgIntrospection/Reflector add the PropertyInserter in StdVectorReflector and StdListReflector add the PropertyRemover in the StdMapReflector include/osgIntrospection/StaticMethodInfo modify all StaticMethodInfo* to accept the help in parameter include/osgIntrospection/TypedMethodInfo modify all TypedMethodInfo* to accept the help in parameter include/osgIntrospection/TypedConstructorInfo modify all TypedConstructorInfo* to accept the help in parameter include/osgIntrospection/Type add the _briefHelp and _detailedHelp variable in the Type class "
2006-10-17 23:17:06 +08:00
D_MethodInfoType signature = addMethod(new osgIntrospection::TypedMethodInfo15<reflected_type, ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14>(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature)
#define I_Method16(ret, fn, A0, P0, N0, A1, P1, N1, A2, P2, N2, A3, P3, N3, A4, P4, N4, A5, P5, N5, A6, P6, N6, A7, P7, N7, A8, P8, N8, A9, P9, N9, A10, P10, N10, A11, P11, N11, A12, P12, N12, A13, P13, N13, A14, P14, N14, A15, P15, N15, signature, briefHelp, detailedHelp) \
params.clear(); \
params.push_back(new osgIntrospection::ParameterInfo(#N0, osgIntrospection::Reflection::getType(extended_typeid<P0>()), osgIntrospection::ParameterInfo::A0)); \
params.push_back(new osgIntrospection::ParameterInfo(#N1, osgIntrospection::Reflection::getType(extended_typeid<P1>()), osgIntrospection::ParameterInfo::A1)); \
params.push_back(new osgIntrospection::ParameterInfo(#N2, osgIntrospection::Reflection::getType(extended_typeid<P2>()), osgIntrospection::ParameterInfo::A2)); \
params.push_back(new osgIntrospection::ParameterInfo(#N3, osgIntrospection::Reflection::getType(extended_typeid<P3>()), osgIntrospection::ParameterInfo::A3)); \
params.push_back(new osgIntrospection::ParameterInfo(#N4, osgIntrospection::Reflection::getType(extended_typeid<P4>()), osgIntrospection::ParameterInfo::A4)); \
params.push_back(new osgIntrospection::ParameterInfo(#N5, osgIntrospection::Reflection::getType(extended_typeid<P5>()), osgIntrospection::ParameterInfo::A5)); \
params.push_back(new osgIntrospection::ParameterInfo(#N6, osgIntrospection::Reflection::getType(extended_typeid<P6>()), osgIntrospection::ParameterInfo::A6)); \
params.push_back(new osgIntrospection::ParameterInfo(#N7, osgIntrospection::Reflection::getType(extended_typeid<P7>()), osgIntrospection::ParameterInfo::A7)); \
params.push_back(new osgIntrospection::ParameterInfo(#N8, osgIntrospection::Reflection::getType(extended_typeid<P8>()), osgIntrospection::ParameterInfo::A8)); \
params.push_back(new osgIntrospection::ParameterInfo(#N9, osgIntrospection::Reflection::getType(extended_typeid<P9>()), osgIntrospection::ParameterInfo::A9)); \
params.push_back(new osgIntrospection::ParameterInfo(#N10, osgIntrospection::Reflection::getType(extended_typeid<P10>()), osgIntrospection::ParameterInfo::A10)); \
params.push_back(new osgIntrospection::ParameterInfo(#N11, osgIntrospection::Reflection::getType(extended_typeid<P11>()), osgIntrospection::ParameterInfo::A11)); \
params.push_back(new osgIntrospection::ParameterInfo(#N12, osgIntrospection::Reflection::getType(extended_typeid<P12>()), osgIntrospection::ParameterInfo::A12)); \
params.push_back(new osgIntrospection::ParameterInfo(#N13, osgIntrospection::Reflection::getType(extended_typeid<P13>()), osgIntrospection::ParameterInfo::A13)); \
params.push_back(new osgIntrospection::ParameterInfo(#N14, osgIntrospection::Reflection::getType(extended_typeid<P14>()), osgIntrospection::ParameterInfo::A14)); \
params.push_back(new osgIntrospection::ParameterInfo(#N15, osgIntrospection::Reflection::getType(extended_typeid<P15>()), osgIntrospection::ParameterInfo::A15)); \
From David Callu: " the main problem is the wrapper generation: The PropertyInfo class use MethodInfo class to access to the value. When the property are define with the I_Property* macro, the MethodInfo use by the property to have access to the value are instancied in the I_Property* macro, but there are already instantied by the I_Method* macro before secondary problem: - the function used by the property could no be customized in the genwrapper.conf file - an array property can't insert a value - the std::map reflector (and indexedProperty in general) haven't remove method - about the help in wrapper ... why not ... solution : To use the function define by the I_Method, I add a MethodInfo variable in the I_Method0 macro old macro : #define I_Method0(ret, fn) (\ params.clear(),\ addMethod(new osgIntrospection::TypedMethodIn fo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params))) new macro : #define I_Method0(ret, fn, signature, briefHelp, detailedHelp) \ params.clear(); \ osgIntrospection::MethodInfo* signature = addMethod(new osgIntrospection::TypedMethodInfo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature) the osgIntrospection::MethodInfo* signature is used by the I_Property macro to define the MethodInfo that it use so for I_Property macro : old macro : #define I_PropertyWithReturnType(t, n, r) \ cap=addProperty(new osgIntrospection::PropertyInfo(osgIntrospection::Reflection::getType(typeid(reflected_type)), osgIntrospection::Reflection::getType(typeid(t)), #n, \ I_Method0(t, get##n), \ I_Method1(r, set##n, IN, t, value))) new macro: #define I_SimpleProperty(t, n, get, set) \ get, \ set)) The genwrapper has been modified in this way. The method signature is define by the prototype of the method For example, the "const char* libraryName();" have "__C5_char_P1__libraryName" for signature solution for secondary problem: The genwrapper accept new tokens in the configuration to custumize the property. The new PropertyInserter and the CustomPropertyInsertAttribute class has been defined The PropertyRemover has been added to the StdMapReflector The _briefHelp and _detailedHelp variable has been added in PropertyInfo, MethodInfo and ContructorInfo class modification: I have modify the genwrapper files Configuration.cpp Configuration.h add some tokens to custumize the property Doxyfile.template add the comment in the output xml genwrapper.conf customize some property in osg::Geometry RegistryBuilder.h RegistryBuilder.cpp add the process_help function (to extract help from xml) TypeRegister.cpp TypeRegister.h optimize the property detection TypeDesc.h TypeDesc.cpp modify FunctionDesc and PropertyDesc WrapperGenerator.h WrapperGenerator.cpp modify the output I also modify the fallowing osgIntrospection files: include/osgIntrospection/Attributes add the PropertyInserter and the CustomPropertyInsertAttribute class include/osgIntrospection/ConstructorInfo add the _briefHelp and _detailedHelp variable in the ConstructorInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/MethodInfo add the _briefHelp and _detailedHelp variable in the MethodInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/PropertyInfo add the _briefHelp and _detailedHelp variable in the PropertyInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/ReflectionMacro remove unused I_Property* macro modify all I_Method macro to accept the help string modify all I_Method macro to define a MethodInfo signature include/osgIntrospection/Reflector add the PropertyInserter in StdVectorReflector and StdListReflector add the PropertyRemover in the StdMapReflector include/osgIntrospection/StaticMethodInfo modify all StaticMethodInfo* to accept the help in parameter include/osgIntrospection/TypedMethodInfo modify all TypedMethodInfo* to accept the help in parameter include/osgIntrospection/TypedConstructorInfo modify all TypedConstructorInfo* to accept the help in parameter include/osgIntrospection/Type add the _briefHelp and _detailedHelp variable in the Type class "
2006-10-17 23:17:06 +08:00
D_MethodInfoType signature = addMethod(new osgIntrospection::TypedMethodInfo16<reflected_type, ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15>(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature)
#define I_MethodWithDefaults0(ret, fn, signature, briefHelp, detailedHelp) \
params.clear(); \
D_MethodInfoType signature = addMethod(new osgIntrospection::TypedMethodInfo0<reflected_type, ret>(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature)
#define I_MethodWithDefaults1(ret, fn, A0, P0, N0, D0, signature, briefHelp, detailedHelp) \
params.clear(); \
params.push_back(new osgIntrospection::ParameterInfo(#N0, osgIntrospection::Reflection::getType(extended_typeid<P0>()), osgIntrospection::ParameterInfo::A0, osgIntrospection::Value(D0))); \
From David Callu: " the main problem is the wrapper generation: The PropertyInfo class use MethodInfo class to access to the value. When the property are define with the I_Property* macro, the MethodInfo use by the property to have access to the value are instancied in the I_Property* macro, but there are already instantied by the I_Method* macro before secondary problem: - the function used by the property could no be customized in the genwrapper.conf file - an array property can't insert a value - the std::map reflector (and indexedProperty in general) haven't remove method - about the help in wrapper ... why not ... solution : To use the function define by the I_Method, I add a MethodInfo variable in the I_Method0 macro old macro : #define I_Method0(ret, fn) (\ params.clear(),\ addMethod(new osgIntrospection::TypedMethodIn fo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params))) new macro : #define I_Method0(ret, fn, signature, briefHelp, detailedHelp) \ params.clear(); \ osgIntrospection::MethodInfo* signature = addMethod(new osgIntrospection::TypedMethodInfo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature) the osgIntrospection::MethodInfo* signature is used by the I_Property macro to define the MethodInfo that it use so for I_Property macro : old macro : #define I_PropertyWithReturnType(t, n, r) \ cap=addProperty(new osgIntrospection::PropertyInfo(osgIntrospection::Reflection::getType(typeid(reflected_type)), osgIntrospection::Reflection::getType(typeid(t)), #n, \ I_Method0(t, get##n), \ I_Method1(r, set##n, IN, t, value))) new macro: #define I_SimpleProperty(t, n, get, set) \ get, \ set)) The genwrapper has been modified in this way. The method signature is define by the prototype of the method For example, the "const char* libraryName();" have "__C5_char_P1__libraryName" for signature solution for secondary problem: The genwrapper accept new tokens in the configuration to custumize the property. The new PropertyInserter and the CustomPropertyInsertAttribute class has been defined The PropertyRemover has been added to the StdMapReflector The _briefHelp and _detailedHelp variable has been added in PropertyInfo, MethodInfo and ContructorInfo class modification: I have modify the genwrapper files Configuration.cpp Configuration.h add some tokens to custumize the property Doxyfile.template add the comment in the output xml genwrapper.conf customize some property in osg::Geometry RegistryBuilder.h RegistryBuilder.cpp add the process_help function (to extract help from xml) TypeRegister.cpp TypeRegister.h optimize the property detection TypeDesc.h TypeDesc.cpp modify FunctionDesc and PropertyDesc WrapperGenerator.h WrapperGenerator.cpp modify the output I also modify the fallowing osgIntrospection files: include/osgIntrospection/Attributes add the PropertyInserter and the CustomPropertyInsertAttribute class include/osgIntrospection/ConstructorInfo add the _briefHelp and _detailedHelp variable in the ConstructorInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/MethodInfo add the _briefHelp and _detailedHelp variable in the MethodInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/PropertyInfo add the _briefHelp and _detailedHelp variable in the PropertyInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/ReflectionMacro remove unused I_Property* macro modify all I_Method macro to accept the help string modify all I_Method macro to define a MethodInfo signature include/osgIntrospection/Reflector add the PropertyInserter in StdVectorReflector and StdListReflector add the PropertyRemover in the StdMapReflector include/osgIntrospection/StaticMethodInfo modify all StaticMethodInfo* to accept the help in parameter include/osgIntrospection/TypedMethodInfo modify all TypedMethodInfo* to accept the help in parameter include/osgIntrospection/TypedConstructorInfo modify all TypedConstructorInfo* to accept the help in parameter include/osgIntrospection/Type add the _briefHelp and _detailedHelp variable in the Type class "
2006-10-17 23:17:06 +08:00
D_MethodInfoType signature = addMethod(new osgIntrospection::TypedMethodInfo1<reflected_type, ret, P0>(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature)
#define I_MethodWithDefaults2(ret, fn, A0, P0, N0, D0, A1, P1, N1, D1, signature, briefHelp, detailedHelp) \
params.clear(); \
params.push_back(new osgIntrospection::ParameterInfo(#N0, osgIntrospection::Reflection::getType(extended_typeid<P0>()), osgIntrospection::ParameterInfo::A0, osgIntrospection::Value(D0))); \
params.push_back(new osgIntrospection::ParameterInfo(#N1, osgIntrospection::Reflection::getType(extended_typeid<P1>()), osgIntrospection::ParameterInfo::A1, osgIntrospection::Value(D1))); \
From David Callu: " the main problem is the wrapper generation: The PropertyInfo class use MethodInfo class to access to the value. When the property are define with the I_Property* macro, the MethodInfo use by the property to have access to the value are instancied in the I_Property* macro, but there are already instantied by the I_Method* macro before secondary problem: - the function used by the property could no be customized in the genwrapper.conf file - an array property can't insert a value - the std::map reflector (and indexedProperty in general) haven't remove method - about the help in wrapper ... why not ... solution : To use the function define by the I_Method, I add a MethodInfo variable in the I_Method0 macro old macro : #define I_Method0(ret, fn) (\ params.clear(),\ addMethod(new osgIntrospection::TypedMethodIn fo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params))) new macro : #define I_Method0(ret, fn, signature, briefHelp, detailedHelp) \ params.clear(); \ osgIntrospection::MethodInfo* signature = addMethod(new osgIntrospection::TypedMethodInfo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature) the osgIntrospection::MethodInfo* signature is used by the I_Property macro to define the MethodInfo that it use so for I_Property macro : old macro : #define I_PropertyWithReturnType(t, n, r) \ cap=addProperty(new osgIntrospection::PropertyInfo(osgIntrospection::Reflection::getType(typeid(reflected_type)), osgIntrospection::Reflection::getType(typeid(t)), #n, \ I_Method0(t, get##n), \ I_Method1(r, set##n, IN, t, value))) new macro: #define I_SimpleProperty(t, n, get, set) \ get, \ set)) The genwrapper has been modified in this way. The method signature is define by the prototype of the method For example, the "const char* libraryName();" have "__C5_char_P1__libraryName" for signature solution for secondary problem: The genwrapper accept new tokens in the configuration to custumize the property. The new PropertyInserter and the CustomPropertyInsertAttribute class has been defined The PropertyRemover has been added to the StdMapReflector The _briefHelp and _detailedHelp variable has been added in PropertyInfo, MethodInfo and ContructorInfo class modification: I have modify the genwrapper files Configuration.cpp Configuration.h add some tokens to custumize the property Doxyfile.template add the comment in the output xml genwrapper.conf customize some property in osg::Geometry RegistryBuilder.h RegistryBuilder.cpp add the process_help function (to extract help from xml) TypeRegister.cpp TypeRegister.h optimize the property detection TypeDesc.h TypeDesc.cpp modify FunctionDesc and PropertyDesc WrapperGenerator.h WrapperGenerator.cpp modify the output I also modify the fallowing osgIntrospection files: include/osgIntrospection/Attributes add the PropertyInserter and the CustomPropertyInsertAttribute class include/osgIntrospection/ConstructorInfo add the _briefHelp and _detailedHelp variable in the ConstructorInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/MethodInfo add the _briefHelp and _detailedHelp variable in the MethodInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/PropertyInfo add the _briefHelp and _detailedHelp variable in the PropertyInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/ReflectionMacro remove unused I_Property* macro modify all I_Method macro to accept the help string modify all I_Method macro to define a MethodInfo signature include/osgIntrospection/Reflector add the PropertyInserter in StdVectorReflector and StdListReflector add the PropertyRemover in the StdMapReflector include/osgIntrospection/StaticMethodInfo modify all StaticMethodInfo* to accept the help in parameter include/osgIntrospection/TypedMethodInfo modify all TypedMethodInfo* to accept the help in parameter include/osgIntrospection/TypedConstructorInfo modify all TypedConstructorInfo* to accept the help in parameter include/osgIntrospection/Type add the _briefHelp and _detailedHelp variable in the Type class "
2006-10-17 23:17:06 +08:00
D_MethodInfoType signature = addMethod(new osgIntrospection::TypedMethodInfo2<reflected_type, ret, P0, P1>(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature)
#define I_MethodWithDefaults3(ret, fn, A0, P0, N0, D0, A1, P1, N1, D1, A2, P2, N2, D2, signature, briefHelp, detailedHelp) \
params.clear(); \
params.push_back(new osgIntrospection::ParameterInfo(#N0, osgIntrospection::Reflection::getType(extended_typeid<P0>()), osgIntrospection::ParameterInfo::A0, osgIntrospection::Value(D0))); \
params.push_back(new osgIntrospection::ParameterInfo(#N1, osgIntrospection::Reflection::getType(extended_typeid<P1>()), osgIntrospection::ParameterInfo::A1, osgIntrospection::Value(D1))); \
params.push_back(new osgIntrospection::ParameterInfo(#N2, osgIntrospection::Reflection::getType(extended_typeid<P2>()), osgIntrospection::ParameterInfo::A2, osgIntrospection::Value(D2))); \
From David Callu: " the main problem is the wrapper generation: The PropertyInfo class use MethodInfo class to access to the value. When the property are define with the I_Property* macro, the MethodInfo use by the property to have access to the value are instancied in the I_Property* macro, but there are already instantied by the I_Method* macro before secondary problem: - the function used by the property could no be customized in the genwrapper.conf file - an array property can't insert a value - the std::map reflector (and indexedProperty in general) haven't remove method - about the help in wrapper ... why not ... solution : To use the function define by the I_Method, I add a MethodInfo variable in the I_Method0 macro old macro : #define I_Method0(ret, fn) (\ params.clear(),\ addMethod(new osgIntrospection::TypedMethodIn fo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params))) new macro : #define I_Method0(ret, fn, signature, briefHelp, detailedHelp) \ params.clear(); \ osgIntrospection::MethodInfo* signature = addMethod(new osgIntrospection::TypedMethodInfo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature) the osgIntrospection::MethodInfo* signature is used by the I_Property macro to define the MethodInfo that it use so for I_Property macro : old macro : #define I_PropertyWithReturnType(t, n, r) \ cap=addProperty(new osgIntrospection::PropertyInfo(osgIntrospection::Reflection::getType(typeid(reflected_type)), osgIntrospection::Reflection::getType(typeid(t)), #n, \ I_Method0(t, get##n), \ I_Method1(r, set##n, IN, t, value))) new macro: #define I_SimpleProperty(t, n, get, set) \ get, \ set)) The genwrapper has been modified in this way. The method signature is define by the prototype of the method For example, the "const char* libraryName();" have "__C5_char_P1__libraryName" for signature solution for secondary problem: The genwrapper accept new tokens in the configuration to custumize the property. The new PropertyInserter and the CustomPropertyInsertAttribute class has been defined The PropertyRemover has been added to the StdMapReflector The _briefHelp and _detailedHelp variable has been added in PropertyInfo, MethodInfo and ContructorInfo class modification: I have modify the genwrapper files Configuration.cpp Configuration.h add some tokens to custumize the property Doxyfile.template add the comment in the output xml genwrapper.conf customize some property in osg::Geometry RegistryBuilder.h RegistryBuilder.cpp add the process_help function (to extract help from xml) TypeRegister.cpp TypeRegister.h optimize the property detection TypeDesc.h TypeDesc.cpp modify FunctionDesc and PropertyDesc WrapperGenerator.h WrapperGenerator.cpp modify the output I also modify the fallowing osgIntrospection files: include/osgIntrospection/Attributes add the PropertyInserter and the CustomPropertyInsertAttribute class include/osgIntrospection/ConstructorInfo add the _briefHelp and _detailedHelp variable in the ConstructorInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/MethodInfo add the _briefHelp and _detailedHelp variable in the MethodInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/PropertyInfo add the _briefHelp and _detailedHelp variable in the PropertyInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/ReflectionMacro remove unused I_Property* macro modify all I_Method macro to accept the help string modify all I_Method macro to define a MethodInfo signature include/osgIntrospection/Reflector add the PropertyInserter in StdVectorReflector and StdListReflector add the PropertyRemover in the StdMapReflector include/osgIntrospection/StaticMethodInfo modify all StaticMethodInfo* to accept the help in parameter include/osgIntrospection/TypedMethodInfo modify all TypedMethodInfo* to accept the help in parameter include/osgIntrospection/TypedConstructorInfo modify all TypedConstructorInfo* to accept the help in parameter include/osgIntrospection/Type add the _briefHelp and _detailedHelp variable in the Type class "
2006-10-17 23:17:06 +08:00
D_MethodInfoType signature = addMethod(new osgIntrospection::TypedMethodInfo3<reflected_type, ret, P0, P1, P2>(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature)
#define I_MethodWithDefaults4(ret, fn, A0, P0, N0, D0, A1, P1, N1, D1, A2, P2, N2, D2, A3, P3, N3, D3, signature, briefHelp, detailedHelp) \
params.clear(); \
params.push_back(new osgIntrospection::ParameterInfo(#N0, osgIntrospection::Reflection::getType(extended_typeid<P0>()), osgIntrospection::ParameterInfo::A0, osgIntrospection::Value(D0))); \
params.push_back(new osgIntrospection::ParameterInfo(#N1, osgIntrospection::Reflection::getType(extended_typeid<P1>()), osgIntrospection::ParameterInfo::A1, osgIntrospection::Value(D1))); \
params.push_back(new osgIntrospection::ParameterInfo(#N2, osgIntrospection::Reflection::getType(extended_typeid<P2>()), osgIntrospection::ParameterInfo::A2, osgIntrospection::Value(D2))); \
params.push_back(new osgIntrospection::ParameterInfo(#N3, osgIntrospection::Reflection::getType(extended_typeid<P3>()), osgIntrospection::ParameterInfo::A3, osgIntrospection::Value(D3))); \
From David Callu: " the main problem is the wrapper generation: The PropertyInfo class use MethodInfo class to access to the value. When the property are define with the I_Property* macro, the MethodInfo use by the property to have access to the value are instancied in the I_Property* macro, but there are already instantied by the I_Method* macro before secondary problem: - the function used by the property could no be customized in the genwrapper.conf file - an array property can't insert a value - the std::map reflector (and indexedProperty in general) haven't remove method - about the help in wrapper ... why not ... solution : To use the function define by the I_Method, I add a MethodInfo variable in the I_Method0 macro old macro : #define I_Method0(ret, fn) (\ params.clear(),\ addMethod(new osgIntrospection::TypedMethodIn fo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params))) new macro : #define I_Method0(ret, fn, signature, briefHelp, detailedHelp) \ params.clear(); \ osgIntrospection::MethodInfo* signature = addMethod(new osgIntrospection::TypedMethodInfo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature) the osgIntrospection::MethodInfo* signature is used by the I_Property macro to define the MethodInfo that it use so for I_Property macro : old macro : #define I_PropertyWithReturnType(t, n, r) \ cap=addProperty(new osgIntrospection::PropertyInfo(osgIntrospection::Reflection::getType(typeid(reflected_type)), osgIntrospection::Reflection::getType(typeid(t)), #n, \ I_Method0(t, get##n), \ I_Method1(r, set##n, IN, t, value))) new macro: #define I_SimpleProperty(t, n, get, set) \ get, \ set)) The genwrapper has been modified in this way. The method signature is define by the prototype of the method For example, the "const char* libraryName();" have "__C5_char_P1__libraryName" for signature solution for secondary problem: The genwrapper accept new tokens in the configuration to custumize the property. The new PropertyInserter and the CustomPropertyInsertAttribute class has been defined The PropertyRemover has been added to the StdMapReflector The _briefHelp and _detailedHelp variable has been added in PropertyInfo, MethodInfo and ContructorInfo class modification: I have modify the genwrapper files Configuration.cpp Configuration.h add some tokens to custumize the property Doxyfile.template add the comment in the output xml genwrapper.conf customize some property in osg::Geometry RegistryBuilder.h RegistryBuilder.cpp add the process_help function (to extract help from xml) TypeRegister.cpp TypeRegister.h optimize the property detection TypeDesc.h TypeDesc.cpp modify FunctionDesc and PropertyDesc WrapperGenerator.h WrapperGenerator.cpp modify the output I also modify the fallowing osgIntrospection files: include/osgIntrospection/Attributes add the PropertyInserter and the CustomPropertyInsertAttribute class include/osgIntrospection/ConstructorInfo add the _briefHelp and _detailedHelp variable in the ConstructorInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/MethodInfo add the _briefHelp and _detailedHelp variable in the MethodInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/PropertyInfo add the _briefHelp and _detailedHelp variable in the PropertyInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/ReflectionMacro remove unused I_Property* macro modify all I_Method macro to accept the help string modify all I_Method macro to define a MethodInfo signature include/osgIntrospection/Reflector add the PropertyInserter in StdVectorReflector and StdListReflector add the PropertyRemover in the StdMapReflector include/osgIntrospection/StaticMethodInfo modify all StaticMethodInfo* to accept the help in parameter include/osgIntrospection/TypedMethodInfo modify all TypedMethodInfo* to accept the help in parameter include/osgIntrospection/TypedConstructorInfo modify all TypedConstructorInfo* to accept the help in parameter include/osgIntrospection/Type add the _briefHelp and _detailedHelp variable in the Type class "
2006-10-17 23:17:06 +08:00
D_MethodInfoType signature = addMethod(new osgIntrospection::TypedMethodInfo4<reflected_type, ret, P0, P1, P2, P3>(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature)
#define I_MethodWithDefaults5(ret, fn, A0, P0, N0, D0, A1, P1, N1, D1, A2, P2, N2, D2, A3, P3, N3, D3, A4, P4, N4, D4, signature, briefHelp, detailedHelp) \
params.clear(); \
params.push_back(new osgIntrospection::ParameterInfo(#N0, osgIntrospection::Reflection::getType(extended_typeid<P0>()), osgIntrospection::ParameterInfo::A0, osgIntrospection::Value(D0))); \
params.push_back(new osgIntrospection::ParameterInfo(#N1, osgIntrospection::Reflection::getType(extended_typeid<P1>()), osgIntrospection::ParameterInfo::A1, osgIntrospection::Value(D1))); \
params.push_back(new osgIntrospection::ParameterInfo(#N2, osgIntrospection::Reflection::getType(extended_typeid<P2>()), osgIntrospection::ParameterInfo::A2, osgIntrospection::Value(D2))); \
params.push_back(new osgIntrospection::ParameterInfo(#N3, osgIntrospection::Reflection::getType(extended_typeid<P3>()), osgIntrospection::ParameterInfo::A3, osgIntrospection::Value(D3))); \
params.push_back(new osgIntrospection::ParameterInfo(#N4, osgIntrospection::Reflection::getType(extended_typeid<P4>()), osgIntrospection::ParameterInfo::A4, osgIntrospection::Value(D4))); \
From David Callu: " the main problem is the wrapper generation: The PropertyInfo class use MethodInfo class to access to the value. When the property are define with the I_Property* macro, the MethodInfo use by the property to have access to the value are instancied in the I_Property* macro, but there are already instantied by the I_Method* macro before secondary problem: - the function used by the property could no be customized in the genwrapper.conf file - an array property can't insert a value - the std::map reflector (and indexedProperty in general) haven't remove method - about the help in wrapper ... why not ... solution : To use the function define by the I_Method, I add a MethodInfo variable in the I_Method0 macro old macro : #define I_Method0(ret, fn) (\ params.clear(),\ addMethod(new osgIntrospection::TypedMethodIn fo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params))) new macro : #define I_Method0(ret, fn, signature, briefHelp, detailedHelp) \ params.clear(); \ osgIntrospection::MethodInfo* signature = addMethod(new osgIntrospection::TypedMethodInfo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature) the osgIntrospection::MethodInfo* signature is used by the I_Property macro to define the MethodInfo that it use so for I_Property macro : old macro : #define I_PropertyWithReturnType(t, n, r) \ cap=addProperty(new osgIntrospection::PropertyInfo(osgIntrospection::Reflection::getType(typeid(reflected_type)), osgIntrospection::Reflection::getType(typeid(t)), #n, \ I_Method0(t, get##n), \ I_Method1(r, set##n, IN, t, value))) new macro: #define I_SimpleProperty(t, n, get, set) \ get, \ set)) The genwrapper has been modified in this way. The method signature is define by the prototype of the method For example, the "const char* libraryName();" have "__C5_char_P1__libraryName" for signature solution for secondary problem: The genwrapper accept new tokens in the configuration to custumize the property. The new PropertyInserter and the CustomPropertyInsertAttribute class has been defined The PropertyRemover has been added to the StdMapReflector The _briefHelp and _detailedHelp variable has been added in PropertyInfo, MethodInfo and ContructorInfo class modification: I have modify the genwrapper files Configuration.cpp Configuration.h add some tokens to custumize the property Doxyfile.template add the comment in the output xml genwrapper.conf customize some property in osg::Geometry RegistryBuilder.h RegistryBuilder.cpp add the process_help function (to extract help from xml) TypeRegister.cpp TypeRegister.h optimize the property detection TypeDesc.h TypeDesc.cpp modify FunctionDesc and PropertyDesc WrapperGenerator.h WrapperGenerator.cpp modify the output I also modify the fallowing osgIntrospection files: include/osgIntrospection/Attributes add the PropertyInserter and the CustomPropertyInsertAttribute class include/osgIntrospection/ConstructorInfo add the _briefHelp and _detailedHelp variable in the ConstructorInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/MethodInfo add the _briefHelp and _detailedHelp variable in the MethodInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/PropertyInfo add the _briefHelp and _detailedHelp variable in the PropertyInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/ReflectionMacro remove unused I_Property* macro modify all I_Method macro to accept the help string modify all I_Method macro to define a MethodInfo signature include/osgIntrospection/Reflector add the PropertyInserter in StdVectorReflector and StdListReflector add the PropertyRemover in the StdMapReflector include/osgIntrospection/StaticMethodInfo modify all StaticMethodInfo* to accept the help in parameter include/osgIntrospection/TypedMethodInfo modify all TypedMethodInfo* to accept the help in parameter include/osgIntrospection/TypedConstructorInfo modify all TypedConstructorInfo* to accept the help in parameter include/osgIntrospection/Type add the _briefHelp and _detailedHelp variable in the Type class "
2006-10-17 23:17:06 +08:00
D_MethodInfoType signature = addMethod(new osgIntrospection::TypedMethodInfo5<reflected_type, ret, P0, P1, P2, P3, P4>(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature)
#define I_MethodWithDefaults6(ret, fn, A0, P0, N0, D0, A1, P1, N1, D1, A2, P2, N2, D2, A3, P3, N3, D3, A4, P4, N4, D4, A5, P5, N5, D5, signature, briefHelp, detailedHelp) \
params.clear(); \
params.push_back(new osgIntrospection::ParameterInfo(#N0, osgIntrospection::Reflection::getType(extended_typeid<P0>()), osgIntrospection::ParameterInfo::A0, osgIntrospection::Value(D0))); \
params.push_back(new osgIntrospection::ParameterInfo(#N1, osgIntrospection::Reflection::getType(extended_typeid<P1>()), osgIntrospection::ParameterInfo::A1, osgIntrospection::Value(D1))); \
params.push_back(new osgIntrospection::ParameterInfo(#N2, osgIntrospection::Reflection::getType(extended_typeid<P2>()), osgIntrospection::ParameterInfo::A2, osgIntrospection::Value(D2))); \
params.push_back(new osgIntrospection::ParameterInfo(#N3, osgIntrospection::Reflection::getType(extended_typeid<P3>()), osgIntrospection::ParameterInfo::A3, osgIntrospection::Value(D3))); \
params.push_back(new osgIntrospection::ParameterInfo(#N4, osgIntrospection::Reflection::getType(extended_typeid<P4>()), osgIntrospection::ParameterInfo::A4, osgIntrospection::Value(D4))); \
params.push_back(new osgIntrospection::ParameterInfo(#N5, osgIntrospection::Reflection::getType(extended_typeid<P5>()), osgIntrospection::ParameterInfo::A5, osgIntrospection::Value(D5))); \
From David Callu: " the main problem is the wrapper generation: The PropertyInfo class use MethodInfo class to access to the value. When the property are define with the I_Property* macro, the MethodInfo use by the property to have access to the value are instancied in the I_Property* macro, but there are already instantied by the I_Method* macro before secondary problem: - the function used by the property could no be customized in the genwrapper.conf file - an array property can't insert a value - the std::map reflector (and indexedProperty in general) haven't remove method - about the help in wrapper ... why not ... solution : To use the function define by the I_Method, I add a MethodInfo variable in the I_Method0 macro old macro : #define I_Method0(ret, fn) (\ params.clear(),\ addMethod(new osgIntrospection::TypedMethodIn fo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params))) new macro : #define I_Method0(ret, fn, signature, briefHelp, detailedHelp) \ params.clear(); \ osgIntrospection::MethodInfo* signature = addMethod(new osgIntrospection::TypedMethodInfo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature) the osgIntrospection::MethodInfo* signature is used by the I_Property macro to define the MethodInfo that it use so for I_Property macro : old macro : #define I_PropertyWithReturnType(t, n, r) \ cap=addProperty(new osgIntrospection::PropertyInfo(osgIntrospection::Reflection::getType(typeid(reflected_type)), osgIntrospection::Reflection::getType(typeid(t)), #n, \ I_Method0(t, get##n), \ I_Method1(r, set##n, IN, t, value))) new macro: #define I_SimpleProperty(t, n, get, set) \ get, \ set)) The genwrapper has been modified in this way. The method signature is define by the prototype of the method For example, the "const char* libraryName();" have "__C5_char_P1__libraryName" for signature solution for secondary problem: The genwrapper accept new tokens in the configuration to custumize the property. The new PropertyInserter and the CustomPropertyInsertAttribute class has been defined The PropertyRemover has been added to the StdMapReflector The _briefHelp and _detailedHelp variable has been added in PropertyInfo, MethodInfo and ContructorInfo class modification: I have modify the genwrapper files Configuration.cpp Configuration.h add some tokens to custumize the property Doxyfile.template add the comment in the output xml genwrapper.conf customize some property in osg::Geometry RegistryBuilder.h RegistryBuilder.cpp add the process_help function (to extract help from xml) TypeRegister.cpp TypeRegister.h optimize the property detection TypeDesc.h TypeDesc.cpp modify FunctionDesc and PropertyDesc WrapperGenerator.h WrapperGenerator.cpp modify the output I also modify the fallowing osgIntrospection files: include/osgIntrospection/Attributes add the PropertyInserter and the CustomPropertyInsertAttribute class include/osgIntrospection/ConstructorInfo add the _briefHelp and _detailedHelp variable in the ConstructorInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/MethodInfo add the _briefHelp and _detailedHelp variable in the MethodInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/PropertyInfo add the _briefHelp and _detailedHelp variable in the PropertyInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/ReflectionMacro remove unused I_Property* macro modify all I_Method macro to accept the help string modify all I_Method macro to define a MethodInfo signature include/osgIntrospection/Reflector add the PropertyInserter in StdVectorReflector and StdListReflector add the PropertyRemover in the StdMapReflector include/osgIntrospection/StaticMethodInfo modify all StaticMethodInfo* to accept the help in parameter include/osgIntrospection/TypedMethodInfo modify all TypedMethodInfo* to accept the help in parameter include/osgIntrospection/TypedConstructorInfo modify all TypedConstructorInfo* to accept the help in parameter include/osgIntrospection/Type add the _briefHelp and _detailedHelp variable in the Type class "
2006-10-17 23:17:06 +08:00
D_MethodInfoType signature = addMethod(new osgIntrospection::TypedMethodInfo6<reflected_type, ret, P0, P1, P2, P3, P4, P5>(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature)
#define I_MethodWithDefaults7(ret, fn, A0, P0, N0, D0, A1, P1, N1, D1, A2, P2, N2, D2, A3, P3, N3, D3, A4, P4, N4, D4, A5, P5, N5, D5, A6, P6, N6, D6, signature, briefHelp, detailedHelp) \
params.clear(); \
params.push_back(new osgIntrospection::ParameterInfo(#N0, osgIntrospection::Reflection::getType(extended_typeid<P0>()), osgIntrospection::ParameterInfo::A0, osgIntrospection::Value(D0))); \
params.push_back(new osgIntrospection::ParameterInfo(#N1, osgIntrospection::Reflection::getType(extended_typeid<P1>()), osgIntrospection::ParameterInfo::A1, osgIntrospection::Value(D1))); \
params.push_back(new osgIntrospection::ParameterInfo(#N2, osgIntrospection::Reflection::getType(extended_typeid<P2>()), osgIntrospection::ParameterInfo::A2, osgIntrospection::Value(D2))); \
params.push_back(new osgIntrospection::ParameterInfo(#N3, osgIntrospection::Reflection::getType(extended_typeid<P3>()), osgIntrospection::ParameterInfo::A3, osgIntrospection::Value(D3))); \
params.push_back(new osgIntrospection::ParameterInfo(#N4, osgIntrospection::Reflection::getType(extended_typeid<P4>()), osgIntrospection::ParameterInfo::A4, osgIntrospection::Value(D4))); \
params.push_back(new osgIntrospection::ParameterInfo(#N5, osgIntrospection::Reflection::getType(extended_typeid<P5>()), osgIntrospection::ParameterInfo::A5, osgIntrospection::Value(D5))); \
params.push_back(new osgIntrospection::ParameterInfo(#N6, osgIntrospection::Reflection::getType(extended_typeid<P6>()), osgIntrospection::ParameterInfo::A6, osgIntrospection::Value(D6))); \
From David Callu: " the main problem is the wrapper generation: The PropertyInfo class use MethodInfo class to access to the value. When the property are define with the I_Property* macro, the MethodInfo use by the property to have access to the value are instancied in the I_Property* macro, but there are already instantied by the I_Method* macro before secondary problem: - the function used by the property could no be customized in the genwrapper.conf file - an array property can't insert a value - the std::map reflector (and indexedProperty in general) haven't remove method - about the help in wrapper ... why not ... solution : To use the function define by the I_Method, I add a MethodInfo variable in the I_Method0 macro old macro : #define I_Method0(ret, fn) (\ params.clear(),\ addMethod(new osgIntrospection::TypedMethodIn fo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params))) new macro : #define I_Method0(ret, fn, signature, briefHelp, detailedHelp) \ params.clear(); \ osgIntrospection::MethodInfo* signature = addMethod(new osgIntrospection::TypedMethodInfo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature) the osgIntrospection::MethodInfo* signature is used by the I_Property macro to define the MethodInfo that it use so for I_Property macro : old macro : #define I_PropertyWithReturnType(t, n, r) \ cap=addProperty(new osgIntrospection::PropertyInfo(osgIntrospection::Reflection::getType(typeid(reflected_type)), osgIntrospection::Reflection::getType(typeid(t)), #n, \ I_Method0(t, get##n), \ I_Method1(r, set##n, IN, t, value))) new macro: #define I_SimpleProperty(t, n, get, set) \ get, \ set)) The genwrapper has been modified in this way. The method signature is define by the prototype of the method For example, the "const char* libraryName();" have "__C5_char_P1__libraryName" for signature solution for secondary problem: The genwrapper accept new tokens in the configuration to custumize the property. The new PropertyInserter and the CustomPropertyInsertAttribute class has been defined The PropertyRemover has been added to the StdMapReflector The _briefHelp and _detailedHelp variable has been added in PropertyInfo, MethodInfo and ContructorInfo class modification: I have modify the genwrapper files Configuration.cpp Configuration.h add some tokens to custumize the property Doxyfile.template add the comment in the output xml genwrapper.conf customize some property in osg::Geometry RegistryBuilder.h RegistryBuilder.cpp add the process_help function (to extract help from xml) TypeRegister.cpp TypeRegister.h optimize the property detection TypeDesc.h TypeDesc.cpp modify FunctionDesc and PropertyDesc WrapperGenerator.h WrapperGenerator.cpp modify the output I also modify the fallowing osgIntrospection files: include/osgIntrospection/Attributes add the PropertyInserter and the CustomPropertyInsertAttribute class include/osgIntrospection/ConstructorInfo add the _briefHelp and _detailedHelp variable in the ConstructorInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/MethodInfo add the _briefHelp and _detailedHelp variable in the MethodInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/PropertyInfo add the _briefHelp and _detailedHelp variable in the PropertyInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/ReflectionMacro remove unused I_Property* macro modify all I_Method macro to accept the help string modify all I_Method macro to define a MethodInfo signature include/osgIntrospection/Reflector add the PropertyInserter in StdVectorReflector and StdListReflector add the PropertyRemover in the StdMapReflector include/osgIntrospection/StaticMethodInfo modify all StaticMethodInfo* to accept the help in parameter include/osgIntrospection/TypedMethodInfo modify all TypedMethodInfo* to accept the help in parameter include/osgIntrospection/TypedConstructorInfo modify all TypedConstructorInfo* to accept the help in parameter include/osgIntrospection/Type add the _briefHelp and _detailedHelp variable in the Type class "
2006-10-17 23:17:06 +08:00
D_MethodInfoType signature = addMethod(new osgIntrospection::TypedMethodInfo7<reflected_type, ret, P0, P1, P2, P3, P4, P5, P6>(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature)
#define I_MethodWithDefaults8(ret, fn, A0, P0, N0, D0, A1, P1, N1, D1, A2, P2, N2, D2, A3, P3, N3, D3, A4, P4, N4, D4, A5, P5, N5, D5, A6, P6, N6, D6, A7, P7, N7, D7, signature, briefHelp, detailedHelp) \
params.clear(); \
params.push_back(new osgIntrospection::ParameterInfo(#N0, osgIntrospection::Reflection::getType(extended_typeid<P0>()), osgIntrospection::ParameterInfo::A0, osgIntrospection::Value(D0))); \
params.push_back(new osgIntrospection::ParameterInfo(#N1, osgIntrospection::Reflection::getType(extended_typeid<P1>()), osgIntrospection::ParameterInfo::A1, osgIntrospection::Value(D1))); \
params.push_back(new osgIntrospection::ParameterInfo(#N2, osgIntrospection::Reflection::getType(extended_typeid<P2>()), osgIntrospection::ParameterInfo::A2, osgIntrospection::Value(D2))); \
params.push_back(new osgIntrospection::ParameterInfo(#N3, osgIntrospection::Reflection::getType(extended_typeid<P3>()), osgIntrospection::ParameterInfo::A3, osgIntrospection::Value(D3))); \
params.push_back(new osgIntrospection::ParameterInfo(#N4, osgIntrospection::Reflection::getType(extended_typeid<P4>()), osgIntrospection::ParameterInfo::A4, osgIntrospection::Value(D4))); \
params.push_back(new osgIntrospection::ParameterInfo(#N5, osgIntrospection::Reflection::getType(extended_typeid<P5>()), osgIntrospection::ParameterInfo::A5, osgIntrospection::Value(D5))); \
params.push_back(new osgIntrospection::ParameterInfo(#N6, osgIntrospection::Reflection::getType(extended_typeid<P6>()), osgIntrospection::ParameterInfo::A6, osgIntrospection::Value(D6))); \
params.push_back(new osgIntrospection::ParameterInfo(#N7, osgIntrospection::Reflection::getType(extended_typeid<P7>()), osgIntrospection::ParameterInfo::A7, osgIntrospection::Value(D7))); \
From David Callu: " the main problem is the wrapper generation: The PropertyInfo class use MethodInfo class to access to the value. When the property are define with the I_Property* macro, the MethodInfo use by the property to have access to the value are instancied in the I_Property* macro, but there are already instantied by the I_Method* macro before secondary problem: - the function used by the property could no be customized in the genwrapper.conf file - an array property can't insert a value - the std::map reflector (and indexedProperty in general) haven't remove method - about the help in wrapper ... why not ... solution : To use the function define by the I_Method, I add a MethodInfo variable in the I_Method0 macro old macro : #define I_Method0(ret, fn) (\ params.clear(),\ addMethod(new osgIntrospection::TypedMethodIn fo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params))) new macro : #define I_Method0(ret, fn, signature, briefHelp, detailedHelp) \ params.clear(); \ osgIntrospection::MethodInfo* signature = addMethod(new osgIntrospection::TypedMethodInfo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature) the osgIntrospection::MethodInfo* signature is used by the I_Property macro to define the MethodInfo that it use so for I_Property macro : old macro : #define I_PropertyWithReturnType(t, n, r) \ cap=addProperty(new osgIntrospection::PropertyInfo(osgIntrospection::Reflection::getType(typeid(reflected_type)), osgIntrospection::Reflection::getType(typeid(t)), #n, \ I_Method0(t, get##n), \ I_Method1(r, set##n, IN, t, value))) new macro: #define I_SimpleProperty(t, n, get, set) \ get, \ set)) The genwrapper has been modified in this way. The method signature is define by the prototype of the method For example, the "const char* libraryName();" have "__C5_char_P1__libraryName" for signature solution for secondary problem: The genwrapper accept new tokens in the configuration to custumize the property. The new PropertyInserter and the CustomPropertyInsertAttribute class has been defined The PropertyRemover has been added to the StdMapReflector The _briefHelp and _detailedHelp variable has been added in PropertyInfo, MethodInfo and ContructorInfo class modification: I have modify the genwrapper files Configuration.cpp Configuration.h add some tokens to custumize the property Doxyfile.template add the comment in the output xml genwrapper.conf customize some property in osg::Geometry RegistryBuilder.h RegistryBuilder.cpp add the process_help function (to extract help from xml) TypeRegister.cpp TypeRegister.h optimize the property detection TypeDesc.h TypeDesc.cpp modify FunctionDesc and PropertyDesc WrapperGenerator.h WrapperGenerator.cpp modify the output I also modify the fallowing osgIntrospection files: include/osgIntrospection/Attributes add the PropertyInserter and the CustomPropertyInsertAttribute class include/osgIntrospection/ConstructorInfo add the _briefHelp and _detailedHelp variable in the ConstructorInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/MethodInfo add the _briefHelp and _detailedHelp variable in the MethodInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/PropertyInfo add the _briefHelp and _detailedHelp variable in the PropertyInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/ReflectionMacro remove unused I_Property* macro modify all I_Method macro to accept the help string modify all I_Method macro to define a MethodInfo signature include/osgIntrospection/Reflector add the PropertyInserter in StdVectorReflector and StdListReflector add the PropertyRemover in the StdMapReflector include/osgIntrospection/StaticMethodInfo modify all StaticMethodInfo* to accept the help in parameter include/osgIntrospection/TypedMethodInfo modify all TypedMethodInfo* to accept the help in parameter include/osgIntrospection/TypedConstructorInfo modify all TypedConstructorInfo* to accept the help in parameter include/osgIntrospection/Type add the _briefHelp and _detailedHelp variable in the Type class "
2006-10-17 23:17:06 +08:00
D_MethodInfoType signature = addMethod(new osgIntrospection::TypedMethodInfo8<reflected_type, ret, P0, P1, P2, P3, P4, P5, P6, P7>(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature)
#define I_MethodWithDefaults9(ret, fn, A0, P0, N0, D0, A1, P1, N1, D1, A2, P2, N2, D2, A3, P3, N3, D3, A4, P4, N4, D4, A5, P5, N5, D5, A6, P6, N6, D6, A7, P7, N7, D7, A8, P8, N8, D8, signature, briefHelp, detailedHelp) \
params.clear(); \
params.push_back(new osgIntrospection::ParameterInfo(#N0, osgIntrospection::Reflection::getType(extended_typeid<P0>()), osgIntrospection::ParameterInfo::A0, osgIntrospection::Value(D0))); \
params.push_back(new osgIntrospection::ParameterInfo(#N1, osgIntrospection::Reflection::getType(extended_typeid<P1>()), osgIntrospection::ParameterInfo::A1, osgIntrospection::Value(D1))); \
params.push_back(new osgIntrospection::ParameterInfo(#N2, osgIntrospection::Reflection::getType(extended_typeid<P2>()), osgIntrospection::ParameterInfo::A2, osgIntrospection::Value(D2))); \
params.push_back(new osgIntrospection::ParameterInfo(#N3, osgIntrospection::Reflection::getType(extended_typeid<P3>()), osgIntrospection::ParameterInfo::A3, osgIntrospection::Value(D3))); \
params.push_back(new osgIntrospection::ParameterInfo(#N4, osgIntrospection::Reflection::getType(extended_typeid<P4>()), osgIntrospection::ParameterInfo::A4, osgIntrospection::Value(D4))); \
params.push_back(new osgIntrospection::ParameterInfo(#N5, osgIntrospection::Reflection::getType(extended_typeid<P5>()), osgIntrospection::ParameterInfo::A5, osgIntrospection::Value(D5))); \
params.push_back(new osgIntrospection::ParameterInfo(#N6, osgIntrospection::Reflection::getType(extended_typeid<P6>()), osgIntrospection::ParameterInfo::A6, osgIntrospection::Value(D6))); \
params.push_back(new osgIntrospection::ParameterInfo(#N7, osgIntrospection::Reflection::getType(extended_typeid<P7>()), osgIntrospection::ParameterInfo::A7, osgIntrospection::Value(D7))); \
params.push_back(new osgIntrospection::ParameterInfo(#N8, osgIntrospection::Reflection::getType(extended_typeid<P8>()), osgIntrospection::ParameterInfo::A8, osgIntrospection::Value(D8))); \
From David Callu: " the main problem is the wrapper generation: The PropertyInfo class use MethodInfo class to access to the value. When the property are define with the I_Property* macro, the MethodInfo use by the property to have access to the value are instancied in the I_Property* macro, but there are already instantied by the I_Method* macro before secondary problem: - the function used by the property could no be customized in the genwrapper.conf file - an array property can't insert a value - the std::map reflector (and indexedProperty in general) haven't remove method - about the help in wrapper ... why not ... solution : To use the function define by the I_Method, I add a MethodInfo variable in the I_Method0 macro old macro : #define I_Method0(ret, fn) (\ params.clear(),\ addMethod(new osgIntrospection::TypedMethodIn fo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params))) new macro : #define I_Method0(ret, fn, signature, briefHelp, detailedHelp) \ params.clear(); \ osgIntrospection::MethodInfo* signature = addMethod(new osgIntrospection::TypedMethodInfo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature) the osgIntrospection::MethodInfo* signature is used by the I_Property macro to define the MethodInfo that it use so for I_Property macro : old macro : #define I_PropertyWithReturnType(t, n, r) \ cap=addProperty(new osgIntrospection::PropertyInfo(osgIntrospection::Reflection::getType(typeid(reflected_type)), osgIntrospection::Reflection::getType(typeid(t)), #n, \ I_Method0(t, get##n), \ I_Method1(r, set##n, IN, t, value))) new macro: #define I_SimpleProperty(t, n, get, set) \ get, \ set)) The genwrapper has been modified in this way. The method signature is define by the prototype of the method For example, the "const char* libraryName();" have "__C5_char_P1__libraryName" for signature solution for secondary problem: The genwrapper accept new tokens in the configuration to custumize the property. The new PropertyInserter and the CustomPropertyInsertAttribute class has been defined The PropertyRemover has been added to the StdMapReflector The _briefHelp and _detailedHelp variable has been added in PropertyInfo, MethodInfo and ContructorInfo class modification: I have modify the genwrapper files Configuration.cpp Configuration.h add some tokens to custumize the property Doxyfile.template add the comment in the output xml genwrapper.conf customize some property in osg::Geometry RegistryBuilder.h RegistryBuilder.cpp add the process_help function (to extract help from xml) TypeRegister.cpp TypeRegister.h optimize the property detection TypeDesc.h TypeDesc.cpp modify FunctionDesc and PropertyDesc WrapperGenerator.h WrapperGenerator.cpp modify the output I also modify the fallowing osgIntrospection files: include/osgIntrospection/Attributes add the PropertyInserter and the CustomPropertyInsertAttribute class include/osgIntrospection/ConstructorInfo add the _briefHelp and _detailedHelp variable in the ConstructorInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/MethodInfo add the _briefHelp and _detailedHelp variable in the MethodInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/PropertyInfo add the _briefHelp and _detailedHelp variable in the PropertyInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/ReflectionMacro remove unused I_Property* macro modify all I_Method macro to accept the help string modify all I_Method macro to define a MethodInfo signature include/osgIntrospection/Reflector add the PropertyInserter in StdVectorReflector and StdListReflector add the PropertyRemover in the StdMapReflector include/osgIntrospection/StaticMethodInfo modify all StaticMethodInfo* to accept the help in parameter include/osgIntrospection/TypedMethodInfo modify all TypedMethodInfo* to accept the help in parameter include/osgIntrospection/TypedConstructorInfo modify all TypedConstructorInfo* to accept the help in parameter include/osgIntrospection/Type add the _briefHelp and _detailedHelp variable in the Type class "
2006-10-17 23:17:06 +08:00
D_MethodInfoType signature = addMethod(new osgIntrospection::TypedMethodInfo9<reflected_type, ret, P0, P1, P2, P3, P4, P5, P6, P7, P8>(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature)
#define I_MethodWithDefaults10(ret, fn, A0, P0, N0, D0, A1, P1, N1, D1, A2, P2, N2, D2, A3, P3, N3, D3, A4, P4, N4, D4, A5, P5, N5, D5, A6, P6, N6, D6, A7, P7, N7, D7, A8, P8, N8, D8, A9, P9, N9, D9, signature, briefHelp, detailedHelp) \
params.clear(); \
params.push_back(new osgIntrospection::ParameterInfo(#N0, osgIntrospection::Reflection::getType(extended_typeid<P0>()), osgIntrospection::ParameterInfo::A0, osgIntrospection::Value(D0))); \
params.push_back(new osgIntrospection::ParameterInfo(#N1, osgIntrospection::Reflection::getType(extended_typeid<P1>()), osgIntrospection::ParameterInfo::A1, osgIntrospection::Value(D1))); \
params.push_back(new osgIntrospection::ParameterInfo(#N2, osgIntrospection::Reflection::getType(extended_typeid<P2>()), osgIntrospection::ParameterInfo::A2, osgIntrospection::Value(D2))); \
params.push_back(new osgIntrospection::ParameterInfo(#N3, osgIntrospection::Reflection::getType(extended_typeid<P3>()), osgIntrospection::ParameterInfo::A3, osgIntrospection::Value(D3))); \
params.push_back(new osgIntrospection::ParameterInfo(#N4, osgIntrospection::Reflection::getType(extended_typeid<P4>()), osgIntrospection::ParameterInfo::A4, osgIntrospection::Value(D4))); \
params.push_back(new osgIntrospection::ParameterInfo(#N5, osgIntrospection::Reflection::getType(extended_typeid<P5>()), osgIntrospection::ParameterInfo::A5, osgIntrospection::Value(D5))); \
params.push_back(new osgIntrospection::ParameterInfo(#N6, osgIntrospection::Reflection::getType(extended_typeid<P6>()), osgIntrospection::ParameterInfo::A6, osgIntrospection::Value(D6))); \
params.push_back(new osgIntrospection::ParameterInfo(#N7, osgIntrospection::Reflection::getType(extended_typeid<P7>()), osgIntrospection::ParameterInfo::A7, osgIntrospection::Value(D7))); \
params.push_back(new osgIntrospection::ParameterInfo(#N8, osgIntrospection::Reflection::getType(extended_typeid<P8>()), osgIntrospection::ParameterInfo::A8, osgIntrospection::Value(D8))); \
params.push_back(new osgIntrospection::ParameterInfo(#N9, osgIntrospection::Reflection::getType(extended_typeid<P9>()), osgIntrospection::ParameterInfo::A9, osgIntrospection::Value(D9))); \
From David Callu: " the main problem is the wrapper generation: The PropertyInfo class use MethodInfo class to access to the value. When the property are define with the I_Property* macro, the MethodInfo use by the property to have access to the value are instancied in the I_Property* macro, but there are already instantied by the I_Method* macro before secondary problem: - the function used by the property could no be customized in the genwrapper.conf file - an array property can't insert a value - the std::map reflector (and indexedProperty in general) haven't remove method - about the help in wrapper ... why not ... solution : To use the function define by the I_Method, I add a MethodInfo variable in the I_Method0 macro old macro : #define I_Method0(ret, fn) (\ params.clear(),\ addMethod(new osgIntrospection::TypedMethodIn fo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params))) new macro : #define I_Method0(ret, fn, signature, briefHelp, detailedHelp) \ params.clear(); \ osgIntrospection::MethodInfo* signature = addMethod(new osgIntrospection::TypedMethodInfo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature) the osgIntrospection::MethodInfo* signature is used by the I_Property macro to define the MethodInfo that it use so for I_Property macro : old macro : #define I_PropertyWithReturnType(t, n, r) \ cap=addProperty(new osgIntrospection::PropertyInfo(osgIntrospection::Reflection::getType(typeid(reflected_type)), osgIntrospection::Reflection::getType(typeid(t)), #n, \ I_Method0(t, get##n), \ I_Method1(r, set##n, IN, t, value))) new macro: #define I_SimpleProperty(t, n, get, set) \ get, \ set)) The genwrapper has been modified in this way. The method signature is define by the prototype of the method For example, the "const char* libraryName();" have "__C5_char_P1__libraryName" for signature solution for secondary problem: The genwrapper accept new tokens in the configuration to custumize the property. The new PropertyInserter and the CustomPropertyInsertAttribute class has been defined The PropertyRemover has been added to the StdMapReflector The _briefHelp and _detailedHelp variable has been added in PropertyInfo, MethodInfo and ContructorInfo class modification: I have modify the genwrapper files Configuration.cpp Configuration.h add some tokens to custumize the property Doxyfile.template add the comment in the output xml genwrapper.conf customize some property in osg::Geometry RegistryBuilder.h RegistryBuilder.cpp add the process_help function (to extract help from xml) TypeRegister.cpp TypeRegister.h optimize the property detection TypeDesc.h TypeDesc.cpp modify FunctionDesc and PropertyDesc WrapperGenerator.h WrapperGenerator.cpp modify the output I also modify the fallowing osgIntrospection files: include/osgIntrospection/Attributes add the PropertyInserter and the CustomPropertyInsertAttribute class include/osgIntrospection/ConstructorInfo add the _briefHelp and _detailedHelp variable in the ConstructorInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/MethodInfo add the _briefHelp and _detailedHelp variable in the MethodInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/PropertyInfo add the _briefHelp and _detailedHelp variable in the PropertyInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/ReflectionMacro remove unused I_Property* macro modify all I_Method macro to accept the help string modify all I_Method macro to define a MethodInfo signature include/osgIntrospection/Reflector add the PropertyInserter in StdVectorReflector and StdListReflector add the PropertyRemover in the StdMapReflector include/osgIntrospection/StaticMethodInfo modify all StaticMethodInfo* to accept the help in parameter include/osgIntrospection/TypedMethodInfo modify all TypedMethodInfo* to accept the help in parameter include/osgIntrospection/TypedConstructorInfo modify all TypedConstructorInfo* to accept the help in parameter include/osgIntrospection/Type add the _briefHelp and _detailedHelp variable in the Type class "
2006-10-17 23:17:06 +08:00
D_MethodInfoType signature = addMethod(new osgIntrospection::TypedMethodInfo10<reflected_type, ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9>(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature)
#define I_MethodWithDefaults11(ret, fn, A0, P0, N0, D0, A1, P1, N1, D1, A2, P2, N2, D2, A3, P3, N3, D3, A4, P4, N4, D4, A5, P5, N5, D5, A6, P6, N6, D6, A7, P7, N7, D7, A8, P8, N8, D8, A9, P9, N9, D9, A10, P10, N10, D10, signature, briefHelp, detailedHelp) \
params.clear(); \
params.push_back(new osgIntrospection::ParameterInfo(#N0, osgIntrospection::Reflection::getType(extended_typeid<P0>()), osgIntrospection::ParameterInfo::A0, osgIntrospection::Value(D0))); \
params.push_back(new osgIntrospection::ParameterInfo(#N1, osgIntrospection::Reflection::getType(extended_typeid<P1>()), osgIntrospection::ParameterInfo::A1, osgIntrospection::Value(D1))); \
params.push_back(new osgIntrospection::ParameterInfo(#N2, osgIntrospection::Reflection::getType(extended_typeid<P2>()), osgIntrospection::ParameterInfo::A2, osgIntrospection::Value(D2))); \
params.push_back(new osgIntrospection::ParameterInfo(#N3, osgIntrospection::Reflection::getType(extended_typeid<P3>()), osgIntrospection::ParameterInfo::A3, osgIntrospection::Value(D3))); \
params.push_back(new osgIntrospection::ParameterInfo(#N4, osgIntrospection::Reflection::getType(extended_typeid<P4>()), osgIntrospection::ParameterInfo::A4, osgIntrospection::Value(D4))); \
params.push_back(new osgIntrospection::ParameterInfo(#N5, osgIntrospection::Reflection::getType(extended_typeid<P5>()), osgIntrospection::ParameterInfo::A5, osgIntrospection::Value(D5))); \
params.push_back(new osgIntrospection::ParameterInfo(#N6, osgIntrospection::Reflection::getType(extended_typeid<P6>()), osgIntrospection::ParameterInfo::A6, osgIntrospection::Value(D6))); \
params.push_back(new osgIntrospection::ParameterInfo(#N7, osgIntrospection::Reflection::getType(extended_typeid<P7>()), osgIntrospection::ParameterInfo::A7, osgIntrospection::Value(D7))); \
params.push_back(new osgIntrospection::ParameterInfo(#N8, osgIntrospection::Reflection::getType(extended_typeid<P8>()), osgIntrospection::ParameterInfo::A8, osgIntrospection::Value(D8))); \
params.push_back(new osgIntrospection::ParameterInfo(#N9, osgIntrospection::Reflection::getType(extended_typeid<P9>()), osgIntrospection::ParameterInfo::A9, osgIntrospection::Value(D9))); \
params.push_back(new osgIntrospection::ParameterInfo(#N10, osgIntrospection::Reflection::getType(extended_typeid<P10>()), osgIntrospection::ParameterInfo::A10, osgIntrospection::Value(D10))); \
From David Callu: " the main problem is the wrapper generation: The PropertyInfo class use MethodInfo class to access to the value. When the property are define with the I_Property* macro, the MethodInfo use by the property to have access to the value are instancied in the I_Property* macro, but there are already instantied by the I_Method* macro before secondary problem: - the function used by the property could no be customized in the genwrapper.conf file - an array property can't insert a value - the std::map reflector (and indexedProperty in general) haven't remove method - about the help in wrapper ... why not ... solution : To use the function define by the I_Method, I add a MethodInfo variable in the I_Method0 macro old macro : #define I_Method0(ret, fn) (\ params.clear(),\ addMethod(new osgIntrospection::TypedMethodIn fo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params))) new macro : #define I_Method0(ret, fn, signature, briefHelp, detailedHelp) \ params.clear(); \ osgIntrospection::MethodInfo* signature = addMethod(new osgIntrospection::TypedMethodInfo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature) the osgIntrospection::MethodInfo* signature is used by the I_Property macro to define the MethodInfo that it use so for I_Property macro : old macro : #define I_PropertyWithReturnType(t, n, r) \ cap=addProperty(new osgIntrospection::PropertyInfo(osgIntrospection::Reflection::getType(typeid(reflected_type)), osgIntrospection::Reflection::getType(typeid(t)), #n, \ I_Method0(t, get##n), \ I_Method1(r, set##n, IN, t, value))) new macro: #define I_SimpleProperty(t, n, get, set) \ get, \ set)) The genwrapper has been modified in this way. The method signature is define by the prototype of the method For example, the "const char* libraryName();" have "__C5_char_P1__libraryName" for signature solution for secondary problem: The genwrapper accept new tokens in the configuration to custumize the property. The new PropertyInserter and the CustomPropertyInsertAttribute class has been defined The PropertyRemover has been added to the StdMapReflector The _briefHelp and _detailedHelp variable has been added in PropertyInfo, MethodInfo and ContructorInfo class modification: I have modify the genwrapper files Configuration.cpp Configuration.h add some tokens to custumize the property Doxyfile.template add the comment in the output xml genwrapper.conf customize some property in osg::Geometry RegistryBuilder.h RegistryBuilder.cpp add the process_help function (to extract help from xml) TypeRegister.cpp TypeRegister.h optimize the property detection TypeDesc.h TypeDesc.cpp modify FunctionDesc and PropertyDesc WrapperGenerator.h WrapperGenerator.cpp modify the output I also modify the fallowing osgIntrospection files: include/osgIntrospection/Attributes add the PropertyInserter and the CustomPropertyInsertAttribute class include/osgIntrospection/ConstructorInfo add the _briefHelp and _detailedHelp variable in the ConstructorInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/MethodInfo add the _briefHelp and _detailedHelp variable in the MethodInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/PropertyInfo add the _briefHelp and _detailedHelp variable in the PropertyInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/ReflectionMacro remove unused I_Property* macro modify all I_Method macro to accept the help string modify all I_Method macro to define a MethodInfo signature include/osgIntrospection/Reflector add the PropertyInserter in StdVectorReflector and StdListReflector add the PropertyRemover in the StdMapReflector include/osgIntrospection/StaticMethodInfo modify all StaticMethodInfo* to accept the help in parameter include/osgIntrospection/TypedMethodInfo modify all TypedMethodInfo* to accept the help in parameter include/osgIntrospection/TypedConstructorInfo modify all TypedConstructorInfo* to accept the help in parameter include/osgIntrospection/Type add the _briefHelp and _detailedHelp variable in the Type class "
2006-10-17 23:17:06 +08:00
D_MethodInfoType signature = addMethod(new osgIntrospection::TypedMethodInfo11<reflected_type, ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10>(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature)
#define I_MethodWithDefaults12(ret, fn, A0, P0, N0, D0, A1, P1, N1, D1, A2, P2, N2, D2, A3, P3, N3, D3, A4, P4, N4, D4, A5, P5, N5, D5, A6, P6, N6, D6, A7, P7, N7, D7, A8, P8, N8, D8, A9, P9, N9, D9, A10, P10, N10, D10, A11, P11, N11, D11, signature, briefHelp, detailedHelp) \
params.clear(); \
params.push_back(new osgIntrospection::ParameterInfo(#N0, osgIntrospection::Reflection::getType(extended_typeid<P0>()), osgIntrospection::ParameterInfo::A0, osgIntrospection::Value(D0))); \
params.push_back(new osgIntrospection::ParameterInfo(#N1, osgIntrospection::Reflection::getType(extended_typeid<P1>()), osgIntrospection::ParameterInfo::A1, osgIntrospection::Value(D1))); \
params.push_back(new osgIntrospection::ParameterInfo(#N2, osgIntrospection::Reflection::getType(extended_typeid<P2>()), osgIntrospection::ParameterInfo::A2, osgIntrospection::Value(D2))); \
params.push_back(new osgIntrospection::ParameterInfo(#N3, osgIntrospection::Reflection::getType(extended_typeid<P3>()), osgIntrospection::ParameterInfo::A3, osgIntrospection::Value(D3))); \
params.push_back(new osgIntrospection::ParameterInfo(#N4, osgIntrospection::Reflection::getType(extended_typeid<P4>()), osgIntrospection::ParameterInfo::A4, osgIntrospection::Value(D4))); \
params.push_back(new osgIntrospection::ParameterInfo(#N5, osgIntrospection::Reflection::getType(extended_typeid<P5>()), osgIntrospection::ParameterInfo::A5, osgIntrospection::Value(D5))); \
params.push_back(new osgIntrospection::ParameterInfo(#N6, osgIntrospection::Reflection::getType(extended_typeid<P6>()), osgIntrospection::ParameterInfo::A6, osgIntrospection::Value(D6))); \
params.push_back(new osgIntrospection::ParameterInfo(#N7, osgIntrospection::Reflection::getType(extended_typeid<P7>()), osgIntrospection::ParameterInfo::A7, osgIntrospection::Value(D7))); \
params.push_back(new osgIntrospection::ParameterInfo(#N8, osgIntrospection::Reflection::getType(extended_typeid<P8>()), osgIntrospection::ParameterInfo::A8, osgIntrospection::Value(D8))); \
params.push_back(new osgIntrospection::ParameterInfo(#N9, osgIntrospection::Reflection::getType(extended_typeid<P9>()), osgIntrospection::ParameterInfo::A9, osgIntrospection::Value(D9))); \
params.push_back(new osgIntrospection::ParameterInfo(#N10, osgIntrospection::Reflection::getType(extended_typeid<P10>()), osgIntrospection::ParameterInfo::A10, osgIntrospection::Value(D10))); \
params.push_back(new osgIntrospection::ParameterInfo(#N11, osgIntrospection::Reflection::getType(extended_typeid<P11>()), osgIntrospection::ParameterInfo::A11, osgIntrospection::Value(D11))); \
From David Callu: " the main problem is the wrapper generation: The PropertyInfo class use MethodInfo class to access to the value. When the property are define with the I_Property* macro, the MethodInfo use by the property to have access to the value are instancied in the I_Property* macro, but there are already instantied by the I_Method* macro before secondary problem: - the function used by the property could no be customized in the genwrapper.conf file - an array property can't insert a value - the std::map reflector (and indexedProperty in general) haven't remove method - about the help in wrapper ... why not ... solution : To use the function define by the I_Method, I add a MethodInfo variable in the I_Method0 macro old macro : #define I_Method0(ret, fn) (\ params.clear(),\ addMethod(new osgIntrospection::TypedMethodIn fo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params))) new macro : #define I_Method0(ret, fn, signature, briefHelp, detailedHelp) \ params.clear(); \ osgIntrospection::MethodInfo* signature = addMethod(new osgIntrospection::TypedMethodInfo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature) the osgIntrospection::MethodInfo* signature is used by the I_Property macro to define the MethodInfo that it use so for I_Property macro : old macro : #define I_PropertyWithReturnType(t, n, r) \ cap=addProperty(new osgIntrospection::PropertyInfo(osgIntrospection::Reflection::getType(typeid(reflected_type)), osgIntrospection::Reflection::getType(typeid(t)), #n, \ I_Method0(t, get##n), \ I_Method1(r, set##n, IN, t, value))) new macro: #define I_SimpleProperty(t, n, get, set) \ get, \ set)) The genwrapper has been modified in this way. The method signature is define by the prototype of the method For example, the "const char* libraryName();" have "__C5_char_P1__libraryName" for signature solution for secondary problem: The genwrapper accept new tokens in the configuration to custumize the property. The new PropertyInserter and the CustomPropertyInsertAttribute class has been defined The PropertyRemover has been added to the StdMapReflector The _briefHelp and _detailedHelp variable has been added in PropertyInfo, MethodInfo and ContructorInfo class modification: I have modify the genwrapper files Configuration.cpp Configuration.h add some tokens to custumize the property Doxyfile.template add the comment in the output xml genwrapper.conf customize some property in osg::Geometry RegistryBuilder.h RegistryBuilder.cpp add the process_help function (to extract help from xml) TypeRegister.cpp TypeRegister.h optimize the property detection TypeDesc.h TypeDesc.cpp modify FunctionDesc and PropertyDesc WrapperGenerator.h WrapperGenerator.cpp modify the output I also modify the fallowing osgIntrospection files: include/osgIntrospection/Attributes add the PropertyInserter and the CustomPropertyInsertAttribute class include/osgIntrospection/ConstructorInfo add the _briefHelp and _detailedHelp variable in the ConstructorInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/MethodInfo add the _briefHelp and _detailedHelp variable in the MethodInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/PropertyInfo add the _briefHelp and _detailedHelp variable in the PropertyInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/ReflectionMacro remove unused I_Property* macro modify all I_Method macro to accept the help string modify all I_Method macro to define a MethodInfo signature include/osgIntrospection/Reflector add the PropertyInserter in StdVectorReflector and StdListReflector add the PropertyRemover in the StdMapReflector include/osgIntrospection/StaticMethodInfo modify all StaticMethodInfo* to accept the help in parameter include/osgIntrospection/TypedMethodInfo modify all TypedMethodInfo* to accept the help in parameter include/osgIntrospection/TypedConstructorInfo modify all TypedConstructorInfo* to accept the help in parameter include/osgIntrospection/Type add the _briefHelp and _detailedHelp variable in the Type class "
2006-10-17 23:17:06 +08:00
D_MethodInfoType signature = addMethod(new osgIntrospection::TypedMethodInfo12<reflected_type, ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11>(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature)
#define I_MethodWithDefaults13(ret, fn, A0, P0, N0, D0, A1, P1, N1, D1, A2, P2, N2, D2, A3, P3, N3, D3, A4, P4, N4, D4, A5, P5, N5, D5, A6, P6, N6, D6, A7, P7, N7, D7, A8, P8, N8, D8, A9, P9, N9, D9, A10, P10, N10, D10, A11, P11, N11, D11, A12, P12, N12, D12, signature, briefHelp, detailedHelp) \
params.clear(); \
params.push_back(new osgIntrospection::ParameterInfo(#N0, osgIntrospection::Reflection::getType(extended_typeid<P0>()), osgIntrospection::ParameterInfo::A0, osgIntrospection::Value(D0))); \
params.push_back(new osgIntrospection::ParameterInfo(#N1, osgIntrospection::Reflection::getType(extended_typeid<P1>()), osgIntrospection::ParameterInfo::A1, osgIntrospection::Value(D1))); \
params.push_back(new osgIntrospection::ParameterInfo(#N2, osgIntrospection::Reflection::getType(extended_typeid<P2>()), osgIntrospection::ParameterInfo::A2, osgIntrospection::Value(D2))); \
params.push_back(new osgIntrospection::ParameterInfo(#N3, osgIntrospection::Reflection::getType(extended_typeid<P3>()), osgIntrospection::ParameterInfo::A3, osgIntrospection::Value(D3))); \
params.push_back(new osgIntrospection::ParameterInfo(#N4, osgIntrospection::Reflection::getType(extended_typeid<P4>()), osgIntrospection::ParameterInfo::A4, osgIntrospection::Value(D4))); \
params.push_back(new osgIntrospection::ParameterInfo(#N5, osgIntrospection::Reflection::getType(extended_typeid<P5>()), osgIntrospection::ParameterInfo::A5, osgIntrospection::Value(D5))); \
params.push_back(new osgIntrospection::ParameterInfo(#N6, osgIntrospection::Reflection::getType(extended_typeid<P6>()), osgIntrospection::ParameterInfo::A6, osgIntrospection::Value(D6))); \
params.push_back(new osgIntrospection::ParameterInfo(#N7, osgIntrospection::Reflection::getType(extended_typeid<P7>()), osgIntrospection::ParameterInfo::A7, osgIntrospection::Value(D7))); \
params.push_back(new osgIntrospection::ParameterInfo(#N8, osgIntrospection::Reflection::getType(extended_typeid<P8>()), osgIntrospection::ParameterInfo::A8, osgIntrospection::Value(D8))); \
params.push_back(new osgIntrospection::ParameterInfo(#N9, osgIntrospection::Reflection::getType(extended_typeid<P9>()), osgIntrospection::ParameterInfo::A9, osgIntrospection::Value(D9))); \
params.push_back(new osgIntrospection::ParameterInfo(#N10, osgIntrospection::Reflection::getType(extended_typeid<P10>()), osgIntrospection::ParameterInfo::A10, osgIntrospection::Value(D10))); \
params.push_back(new osgIntrospection::ParameterInfo(#N11, osgIntrospection::Reflection::getType(extended_typeid<P11>()), osgIntrospection::ParameterInfo::A11, osgIntrospection::Value(D11))); \
params.push_back(new osgIntrospection::ParameterInfo(#N12, osgIntrospection::Reflection::getType(extended_typeid<P12>()), osgIntrospection::ParameterInfo::A12, osgIntrospection::Value(D12))); \
From David Callu: " the main problem is the wrapper generation: The PropertyInfo class use MethodInfo class to access to the value. When the property are define with the I_Property* macro, the MethodInfo use by the property to have access to the value are instancied in the I_Property* macro, but there are already instantied by the I_Method* macro before secondary problem: - the function used by the property could no be customized in the genwrapper.conf file - an array property can't insert a value - the std::map reflector (and indexedProperty in general) haven't remove method - about the help in wrapper ... why not ... solution : To use the function define by the I_Method, I add a MethodInfo variable in the I_Method0 macro old macro : #define I_Method0(ret, fn) (\ params.clear(),\ addMethod(new osgIntrospection::TypedMethodIn fo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params))) new macro : #define I_Method0(ret, fn, signature, briefHelp, detailedHelp) \ params.clear(); \ osgIntrospection::MethodInfo* signature = addMethod(new osgIntrospection::TypedMethodInfo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature) the osgIntrospection::MethodInfo* signature is used by the I_Property macro to define the MethodInfo that it use so for I_Property macro : old macro : #define I_PropertyWithReturnType(t, n, r) \ cap=addProperty(new osgIntrospection::PropertyInfo(osgIntrospection::Reflection::getType(typeid(reflected_type)), osgIntrospection::Reflection::getType(typeid(t)), #n, \ I_Method0(t, get##n), \ I_Method1(r, set##n, IN, t, value))) new macro: #define I_SimpleProperty(t, n, get, set) \ get, \ set)) The genwrapper has been modified in this way. The method signature is define by the prototype of the method For example, the "const char* libraryName();" have "__C5_char_P1__libraryName" for signature solution for secondary problem: The genwrapper accept new tokens in the configuration to custumize the property. The new PropertyInserter and the CustomPropertyInsertAttribute class has been defined The PropertyRemover has been added to the StdMapReflector The _briefHelp and _detailedHelp variable has been added in PropertyInfo, MethodInfo and ContructorInfo class modification: I have modify the genwrapper files Configuration.cpp Configuration.h add some tokens to custumize the property Doxyfile.template add the comment in the output xml genwrapper.conf customize some property in osg::Geometry RegistryBuilder.h RegistryBuilder.cpp add the process_help function (to extract help from xml) TypeRegister.cpp TypeRegister.h optimize the property detection TypeDesc.h TypeDesc.cpp modify FunctionDesc and PropertyDesc WrapperGenerator.h WrapperGenerator.cpp modify the output I also modify the fallowing osgIntrospection files: include/osgIntrospection/Attributes add the PropertyInserter and the CustomPropertyInsertAttribute class include/osgIntrospection/ConstructorInfo add the _briefHelp and _detailedHelp variable in the ConstructorInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/MethodInfo add the _briefHelp and _detailedHelp variable in the MethodInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/PropertyInfo add the _briefHelp and _detailedHelp variable in the PropertyInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/ReflectionMacro remove unused I_Property* macro modify all I_Method macro to accept the help string modify all I_Method macro to define a MethodInfo signature include/osgIntrospection/Reflector add the PropertyInserter in StdVectorReflector and StdListReflector add the PropertyRemover in the StdMapReflector include/osgIntrospection/StaticMethodInfo modify all StaticMethodInfo* to accept the help in parameter include/osgIntrospection/TypedMethodInfo modify all TypedMethodInfo* to accept the help in parameter include/osgIntrospection/TypedConstructorInfo modify all TypedConstructorInfo* to accept the help in parameter include/osgIntrospection/Type add the _briefHelp and _detailedHelp variable in the Type class "
2006-10-17 23:17:06 +08:00
D_MethodInfoType signature = addMethod(new osgIntrospection::TypedMethodInfo13<reflected_type, ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12>(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature)
#define I_MethodWithDefaults14(ret, fn, A0, P0, N0, D0, A1, P1, N1, D1, A2, P2, N2, D2, A3, P3, N3, D3, A4, P4, N4, D4, A5, P5, N5, D5, A6, P6, N6, D6, A7, P7, N7, D7, A8, P8, N8, D8, A9, P9, N9, D9, A10, P10, N10, D10, A11, P11, N11, D11, A12, P12, N12, D12, A13, P13, N13, D13, signature, briefHelp, detailedHelp) \
params.clear(); \
params.push_back(new osgIntrospection::ParameterInfo(#N0, osgIntrospection::Reflection::getType(extended_typeid<P0>()), osgIntrospection::ParameterInfo::A0, osgIntrospection::Value(D0))); \
params.push_back(new osgIntrospection::ParameterInfo(#N1, osgIntrospection::Reflection::getType(extended_typeid<P1>()), osgIntrospection::ParameterInfo::A1, osgIntrospection::Value(D1))); \
params.push_back(new osgIntrospection::ParameterInfo(#N2, osgIntrospection::Reflection::getType(extended_typeid<P2>()), osgIntrospection::ParameterInfo::A2, osgIntrospection::Value(D2))); \
params.push_back(new osgIntrospection::ParameterInfo(#N3, osgIntrospection::Reflection::getType(extended_typeid<P3>()), osgIntrospection::ParameterInfo::A3, osgIntrospection::Value(D3))); \
params.push_back(new osgIntrospection::ParameterInfo(#N4, osgIntrospection::Reflection::getType(extended_typeid<P4>()), osgIntrospection::ParameterInfo::A4, osgIntrospection::Value(D4))); \
params.push_back(new osgIntrospection::ParameterInfo(#N5, osgIntrospection::Reflection::getType(extended_typeid<P5>()), osgIntrospection::ParameterInfo::A5, osgIntrospection::Value(D5))); \
params.push_back(new osgIntrospection::ParameterInfo(#N6, osgIntrospection::Reflection::getType(extended_typeid<P6>()), osgIntrospection::ParameterInfo::A6, osgIntrospection::Value(D6))); \
params.push_back(new osgIntrospection::ParameterInfo(#N7, osgIntrospection::Reflection::getType(extended_typeid<P7>()), osgIntrospection::ParameterInfo::A7, osgIntrospection::Value(D7))); \
params.push_back(new osgIntrospection::ParameterInfo(#N8, osgIntrospection::Reflection::getType(extended_typeid<P8>()), osgIntrospection::ParameterInfo::A8, osgIntrospection::Value(D8))); \
params.push_back(new osgIntrospection::ParameterInfo(#N9, osgIntrospection::Reflection::getType(extended_typeid<P9>()), osgIntrospection::ParameterInfo::A9, osgIntrospection::Value(D9))); \
params.push_back(new osgIntrospection::ParameterInfo(#N10, osgIntrospection::Reflection::getType(extended_typeid<P10>()), osgIntrospection::ParameterInfo::A10, osgIntrospection::Value(D10))); \
params.push_back(new osgIntrospection::ParameterInfo(#N11, osgIntrospection::Reflection::getType(extended_typeid<P11>()), osgIntrospection::ParameterInfo::A11, osgIntrospection::Value(D11))); \
params.push_back(new osgIntrospection::ParameterInfo(#N12, osgIntrospection::Reflection::getType(extended_typeid<P12>()), osgIntrospection::ParameterInfo::A12, osgIntrospection::Value(D12))); \
params.push_back(new osgIntrospection::ParameterInfo(#N13, osgIntrospection::Reflection::getType(extended_typeid<P13>()), osgIntrospection::ParameterInfo::A13, osgIntrospection::Value(D13))); \
From David Callu: " the main problem is the wrapper generation: The PropertyInfo class use MethodInfo class to access to the value. When the property are define with the I_Property* macro, the MethodInfo use by the property to have access to the value are instancied in the I_Property* macro, but there are already instantied by the I_Method* macro before secondary problem: - the function used by the property could no be customized in the genwrapper.conf file - an array property can't insert a value - the std::map reflector (and indexedProperty in general) haven't remove method - about the help in wrapper ... why not ... solution : To use the function define by the I_Method, I add a MethodInfo variable in the I_Method0 macro old macro : #define I_Method0(ret, fn) (\ params.clear(),\ addMethod(new osgIntrospection::TypedMethodIn fo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params))) new macro : #define I_Method0(ret, fn, signature, briefHelp, detailedHelp) \ params.clear(); \ osgIntrospection::MethodInfo* signature = addMethod(new osgIntrospection::TypedMethodInfo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature) the osgIntrospection::MethodInfo* signature is used by the I_Property macro to define the MethodInfo that it use so for I_Property macro : old macro : #define I_PropertyWithReturnType(t, n, r) \ cap=addProperty(new osgIntrospection::PropertyInfo(osgIntrospection::Reflection::getType(typeid(reflected_type)), osgIntrospection::Reflection::getType(typeid(t)), #n, \ I_Method0(t, get##n), \ I_Method1(r, set##n, IN, t, value))) new macro: #define I_SimpleProperty(t, n, get, set) \ get, \ set)) The genwrapper has been modified in this way. The method signature is define by the prototype of the method For example, the "const char* libraryName();" have "__C5_char_P1__libraryName" for signature solution for secondary problem: The genwrapper accept new tokens in the configuration to custumize the property. The new PropertyInserter and the CustomPropertyInsertAttribute class has been defined The PropertyRemover has been added to the StdMapReflector The _briefHelp and _detailedHelp variable has been added in PropertyInfo, MethodInfo and ContructorInfo class modification: I have modify the genwrapper files Configuration.cpp Configuration.h add some tokens to custumize the property Doxyfile.template add the comment in the output xml genwrapper.conf customize some property in osg::Geometry RegistryBuilder.h RegistryBuilder.cpp add the process_help function (to extract help from xml) TypeRegister.cpp TypeRegister.h optimize the property detection TypeDesc.h TypeDesc.cpp modify FunctionDesc and PropertyDesc WrapperGenerator.h WrapperGenerator.cpp modify the output I also modify the fallowing osgIntrospection files: include/osgIntrospection/Attributes add the PropertyInserter and the CustomPropertyInsertAttribute class include/osgIntrospection/ConstructorInfo add the _briefHelp and _detailedHelp variable in the ConstructorInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/MethodInfo add the _briefHelp and _detailedHelp variable in the MethodInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/PropertyInfo add the _briefHelp and _detailedHelp variable in the PropertyInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/ReflectionMacro remove unused I_Property* macro modify all I_Method macro to accept the help string modify all I_Method macro to define a MethodInfo signature include/osgIntrospection/Reflector add the PropertyInserter in StdVectorReflector and StdListReflector add the PropertyRemover in the StdMapReflector include/osgIntrospection/StaticMethodInfo modify all StaticMethodInfo* to accept the help in parameter include/osgIntrospection/TypedMethodInfo modify all TypedMethodInfo* to accept the help in parameter include/osgIntrospection/TypedConstructorInfo modify all TypedConstructorInfo* to accept the help in parameter include/osgIntrospection/Type add the _briefHelp and _detailedHelp variable in the Type class "
2006-10-17 23:17:06 +08:00
D_MethodInfoType signature = addMethod(new osgIntrospection::TypedMethodInfo14<reflected_type, ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13>(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature)
#define I_MethodWithDefaults15(ret, fn, A0, P0, N0, D0, A1, P1, N1, D1, A2, P2, N2, D2, A3, P3, N3, D3, A4, P4, N4, D4, A5, P5, N5, D5, A6, P6, N6, D6, A7, P7, N7, D7, A8, P8, N8, D8, A9, P9, N9, D9, A10, P10, N10, D10, A11, P11, N11, D11, A12, P12, N12, D12, A13, P13, N13, D13, A14, P14, N14, D14, signature, briefHelp, detailedHelp) \
params.clear(); \
params.push_back(new osgIntrospection::ParameterInfo(#N0, osgIntrospection::Reflection::getType(extended_typeid<P0>()), osgIntrospection::ParameterInfo::A0, osgIntrospection::Value(D0))); \
params.push_back(new osgIntrospection::ParameterInfo(#N1, osgIntrospection::Reflection::getType(extended_typeid<P1>()), osgIntrospection::ParameterInfo::A1, osgIntrospection::Value(D1))); \
params.push_back(new osgIntrospection::ParameterInfo(#N2, osgIntrospection::Reflection::getType(extended_typeid<P2>()), osgIntrospection::ParameterInfo::A2, osgIntrospection::Value(D2))); \
params.push_back(new osgIntrospection::ParameterInfo(#N3, osgIntrospection::Reflection::getType(extended_typeid<P3>()), osgIntrospection::ParameterInfo::A3, osgIntrospection::Value(D3))); \
params.push_back(new osgIntrospection::ParameterInfo(#N4, osgIntrospection::Reflection::getType(extended_typeid<P4>()), osgIntrospection::ParameterInfo::A4, osgIntrospection::Value(D4))); \
params.push_back(new osgIntrospection::ParameterInfo(#N5, osgIntrospection::Reflection::getType(extended_typeid<P5>()), osgIntrospection::ParameterInfo::A5, osgIntrospection::Value(D5))); \
params.push_back(new osgIntrospection::ParameterInfo(#N6, osgIntrospection::Reflection::getType(extended_typeid<P6>()), osgIntrospection::ParameterInfo::A6, osgIntrospection::Value(D6))); \
params.push_back(new osgIntrospection::ParameterInfo(#N7, osgIntrospection::Reflection::getType(extended_typeid<P7>()), osgIntrospection::ParameterInfo::A7, osgIntrospection::Value(D7))); \
params.push_back(new osgIntrospection::ParameterInfo(#N8, osgIntrospection::Reflection::getType(extended_typeid<P8>()), osgIntrospection::ParameterInfo::A8, osgIntrospection::Value(D8))); \
params.push_back(new osgIntrospection::ParameterInfo(#N9, osgIntrospection::Reflection::getType(extended_typeid<P9>()), osgIntrospection::ParameterInfo::A9, osgIntrospection::Value(D9))); \
params.push_back(new osgIntrospection::ParameterInfo(#N10, osgIntrospection::Reflection::getType(extended_typeid<P10>()), osgIntrospection::ParameterInfo::A10, osgIntrospection::Value(D10))); \
params.push_back(new osgIntrospection::ParameterInfo(#N11, osgIntrospection::Reflection::getType(extended_typeid<P11>()), osgIntrospection::ParameterInfo::A11, osgIntrospection::Value(D11))); \
params.push_back(new osgIntrospection::ParameterInfo(#N12, osgIntrospection::Reflection::getType(extended_typeid<P12>()), osgIntrospection::ParameterInfo::A12, osgIntrospection::Value(D12))); \
params.push_back(new osgIntrospection::ParameterInfo(#N13, osgIntrospection::Reflection::getType(extended_typeid<P13>()), osgIntrospection::ParameterInfo::A13, osgIntrospection::Value(D13))); \
params.push_back(new osgIntrospection::ParameterInfo(#N14, osgIntrospection::Reflection::getType(extended_typeid<P14>()), osgIntrospection::ParameterInfo::A14, osgIntrospection::Value(D14))); \
From David Callu: " the main problem is the wrapper generation: The PropertyInfo class use MethodInfo class to access to the value. When the property are define with the I_Property* macro, the MethodInfo use by the property to have access to the value are instancied in the I_Property* macro, but there are already instantied by the I_Method* macro before secondary problem: - the function used by the property could no be customized in the genwrapper.conf file - an array property can't insert a value - the std::map reflector (and indexedProperty in general) haven't remove method - about the help in wrapper ... why not ... solution : To use the function define by the I_Method, I add a MethodInfo variable in the I_Method0 macro old macro : #define I_Method0(ret, fn) (\ params.clear(),\ addMethod(new osgIntrospection::TypedMethodIn fo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params))) new macro : #define I_Method0(ret, fn, signature, briefHelp, detailedHelp) \ params.clear(); \ osgIntrospection::MethodInfo* signature = addMethod(new osgIntrospection::TypedMethodInfo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature) the osgIntrospection::MethodInfo* signature is used by the I_Property macro to define the MethodInfo that it use so for I_Property macro : old macro : #define I_PropertyWithReturnType(t, n, r) \ cap=addProperty(new osgIntrospection::PropertyInfo(osgIntrospection::Reflection::getType(typeid(reflected_type)), osgIntrospection::Reflection::getType(typeid(t)), #n, \ I_Method0(t, get##n), \ I_Method1(r, set##n, IN, t, value))) new macro: #define I_SimpleProperty(t, n, get, set) \ get, \ set)) The genwrapper has been modified in this way. The method signature is define by the prototype of the method For example, the "const char* libraryName();" have "__C5_char_P1__libraryName" for signature solution for secondary problem: The genwrapper accept new tokens in the configuration to custumize the property. The new PropertyInserter and the CustomPropertyInsertAttribute class has been defined The PropertyRemover has been added to the StdMapReflector The _briefHelp and _detailedHelp variable has been added in PropertyInfo, MethodInfo and ContructorInfo class modification: I have modify the genwrapper files Configuration.cpp Configuration.h add some tokens to custumize the property Doxyfile.template add the comment in the output xml genwrapper.conf customize some property in osg::Geometry RegistryBuilder.h RegistryBuilder.cpp add the process_help function (to extract help from xml) TypeRegister.cpp TypeRegister.h optimize the property detection TypeDesc.h TypeDesc.cpp modify FunctionDesc and PropertyDesc WrapperGenerator.h WrapperGenerator.cpp modify the output I also modify the fallowing osgIntrospection files: include/osgIntrospection/Attributes add the PropertyInserter and the CustomPropertyInsertAttribute class include/osgIntrospection/ConstructorInfo add the _briefHelp and _detailedHelp variable in the ConstructorInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/MethodInfo add the _briefHelp and _detailedHelp variable in the MethodInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/PropertyInfo add the _briefHelp and _detailedHelp variable in the PropertyInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/ReflectionMacro remove unused I_Property* macro modify all I_Method macro to accept the help string modify all I_Method macro to define a MethodInfo signature include/osgIntrospection/Reflector add the PropertyInserter in StdVectorReflector and StdListReflector add the PropertyRemover in the StdMapReflector include/osgIntrospection/StaticMethodInfo modify all StaticMethodInfo* to accept the help in parameter include/osgIntrospection/TypedMethodInfo modify all TypedMethodInfo* to accept the help in parameter include/osgIntrospection/TypedConstructorInfo modify all TypedConstructorInfo* to accept the help in parameter include/osgIntrospection/Type add the _briefHelp and _detailedHelp variable in the Type class "
2006-10-17 23:17:06 +08:00
D_MethodInfoType signature = addMethod(new osgIntrospection::TypedMethodInfo15<reflected_type, ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14>(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature)
#define I_MethodWithDefaults16(ret, fn, A0, P0, N0, D0, A1, P1, N1, D1, A2, P2, N2, D2, A3, P3, N3, D3, A4, P4, N4, D4, A5, P5, N5, D5, A6, P6, N6, D6, A7, P7, N7, D7, A8, P8, N8, D8, A9, P9, N9, D9, A10, P10, N10, D10, A11, P11, N11, D11, A12, P12, N12, D12, A13, P13, N13, D13, A14, P14, N14, D14, A15, P15, N15, D15, signature, briefHelp, detailedHelp) \
params.clear(); \
params.push_back(new osgIntrospection::ParameterInfo(#N0, osgIntrospection::Reflection::getType(extended_typeid<P0>()), osgIntrospection::ParameterInfo::A0, osgIntrospection::Value(D0))); \
params.push_back(new osgIntrospection::ParameterInfo(#N1, osgIntrospection::Reflection::getType(extended_typeid<P1>()), osgIntrospection::ParameterInfo::A1, osgIntrospection::Value(D1))); \
params.push_back(new osgIntrospection::ParameterInfo(#N2, osgIntrospection::Reflection::getType(extended_typeid<P2>()), osgIntrospection::ParameterInfo::A2, osgIntrospection::Value(D2))); \
params.push_back(new osgIntrospection::ParameterInfo(#N3, osgIntrospection::Reflection::getType(extended_typeid<P3>()), osgIntrospection::ParameterInfo::A3, osgIntrospection::Value(D3))); \
params.push_back(new osgIntrospection::ParameterInfo(#N4, osgIntrospection::Reflection::getType(extended_typeid<P4>()), osgIntrospection::ParameterInfo::A4, osgIntrospection::Value(D4))); \
params.push_back(new osgIntrospection::ParameterInfo(#N5, osgIntrospection::Reflection::getType(extended_typeid<P5>()), osgIntrospection::ParameterInfo::A5, osgIntrospection::Value(D5))); \
params.push_back(new osgIntrospection::ParameterInfo(#N6, osgIntrospection::Reflection::getType(extended_typeid<P6>()), osgIntrospection::ParameterInfo::A6, osgIntrospection::Value(D6))); \
params.push_back(new osgIntrospection::ParameterInfo(#N7, osgIntrospection::Reflection::getType(extended_typeid<P7>()), osgIntrospection::ParameterInfo::A7, osgIntrospection::Value(D7))); \
params.push_back(new osgIntrospection::ParameterInfo(#N8, osgIntrospection::Reflection::getType(extended_typeid<P8>()), osgIntrospection::ParameterInfo::A8, osgIntrospection::Value(D8))); \
params.push_back(new osgIntrospection::ParameterInfo(#N9, osgIntrospection::Reflection::getType(extended_typeid<P9>()), osgIntrospection::ParameterInfo::A9, osgIntrospection::Value(D9))); \
params.push_back(new osgIntrospection::ParameterInfo(#N10, osgIntrospection::Reflection::getType(extended_typeid<P10>()), osgIntrospection::ParameterInfo::A10, osgIntrospection::Value(D10))); \
params.push_back(new osgIntrospection::ParameterInfo(#N11, osgIntrospection::Reflection::getType(extended_typeid<P11>()), osgIntrospection::ParameterInfo::A11, osgIntrospection::Value(D11))); \
params.push_back(new osgIntrospection::ParameterInfo(#N12, osgIntrospection::Reflection::getType(extended_typeid<P12>()), osgIntrospection::ParameterInfo::A12, osgIntrospection::Value(D12))); \
params.push_back(new osgIntrospection::ParameterInfo(#N13, osgIntrospection::Reflection::getType(extended_typeid<P13>()), osgIntrospection::ParameterInfo::A13, osgIntrospection::Value(D13))); \
params.push_back(new osgIntrospection::ParameterInfo(#N14, osgIntrospection::Reflection::getType(extended_typeid<P14>()), osgIntrospection::ParameterInfo::A14, osgIntrospection::Value(D14))); \
params.push_back(new osgIntrospection::ParameterInfo(#N15, osgIntrospection::Reflection::getType(extended_typeid<P15>()), osgIntrospection::ParameterInfo::A15, osgIntrospection::Value(D15))); \
From David Callu: " the main problem is the wrapper generation: The PropertyInfo class use MethodInfo class to access to the value. When the property are define with the I_Property* macro, the MethodInfo use by the property to have access to the value are instancied in the I_Property* macro, but there are already instantied by the I_Method* macro before secondary problem: - the function used by the property could no be customized in the genwrapper.conf file - an array property can't insert a value - the std::map reflector (and indexedProperty in general) haven't remove method - about the help in wrapper ... why not ... solution : To use the function define by the I_Method, I add a MethodInfo variable in the I_Method0 macro old macro : #define I_Method0(ret, fn) (\ params.clear(),\ addMethod(new osgIntrospection::TypedMethodIn fo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params))) new macro : #define I_Method0(ret, fn, signature, briefHelp, detailedHelp) \ params.clear(); \ osgIntrospection::MethodInfo* signature = addMethod(new osgIntrospection::TypedMethodInfo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature) the osgIntrospection::MethodInfo* signature is used by the I_Property macro to define the MethodInfo that it use so for I_Property macro : old macro : #define I_PropertyWithReturnType(t, n, r) \ cap=addProperty(new osgIntrospection::PropertyInfo(osgIntrospection::Reflection::getType(typeid(reflected_type)), osgIntrospection::Reflection::getType(typeid(t)), #n, \ I_Method0(t, get##n), \ I_Method1(r, set##n, IN, t, value))) new macro: #define I_SimpleProperty(t, n, get, set) \ get, \ set)) The genwrapper has been modified in this way. The method signature is define by the prototype of the method For example, the "const char* libraryName();" have "__C5_char_P1__libraryName" for signature solution for secondary problem: The genwrapper accept new tokens in the configuration to custumize the property. The new PropertyInserter and the CustomPropertyInsertAttribute class has been defined The PropertyRemover has been added to the StdMapReflector The _briefHelp and _detailedHelp variable has been added in PropertyInfo, MethodInfo and ContructorInfo class modification: I have modify the genwrapper files Configuration.cpp Configuration.h add some tokens to custumize the property Doxyfile.template add the comment in the output xml genwrapper.conf customize some property in osg::Geometry RegistryBuilder.h RegistryBuilder.cpp add the process_help function (to extract help from xml) TypeRegister.cpp TypeRegister.h optimize the property detection TypeDesc.h TypeDesc.cpp modify FunctionDesc and PropertyDesc WrapperGenerator.h WrapperGenerator.cpp modify the output I also modify the fallowing osgIntrospection files: include/osgIntrospection/Attributes add the PropertyInserter and the CustomPropertyInsertAttribute class include/osgIntrospection/ConstructorInfo add the _briefHelp and _detailedHelp variable in the ConstructorInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/MethodInfo add the _briefHelp and _detailedHelp variable in the MethodInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/PropertyInfo add the _briefHelp and _detailedHelp variable in the PropertyInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/ReflectionMacro remove unused I_Property* macro modify all I_Method macro to accept the help string modify all I_Method macro to define a MethodInfo signature include/osgIntrospection/Reflector add the PropertyInserter in StdVectorReflector and StdListReflector add the PropertyRemover in the StdMapReflector include/osgIntrospection/StaticMethodInfo modify all StaticMethodInfo* to accept the help in parameter include/osgIntrospection/TypedMethodInfo modify all TypedMethodInfo* to accept the help in parameter include/osgIntrospection/TypedConstructorInfo modify all TypedConstructorInfo* to accept the help in parameter include/osgIntrospection/Type add the _briefHelp and _detailedHelp variable in the Type class "
2006-10-17 23:17:06 +08:00
D_MethodInfoType signature = addMethod(new osgIntrospection::TypedMethodInfo16<reflected_type, ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15>(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature)
#define I_StaticMethod0(ret, fn, signature, briefHelp, detailedHelp) \
params.clear(); \
D_MethodInfoType signature = addMethod(new osgIntrospection::StaticMethodInfo0<reflected_type, ret>(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature)
#define I_StaticMethod1(ret, fn, A0, P0, N0, signature, briefHelp, detailedHelp) \
params.clear(); \
params.push_back(new osgIntrospection::ParameterInfo(#N0, osgIntrospection::Reflection::getType(extended_typeid<P0>()), osgIntrospection::ParameterInfo::A0)); \
From David Callu: " the main problem is the wrapper generation: The PropertyInfo class use MethodInfo class to access to the value. When the property are define with the I_Property* macro, the MethodInfo use by the property to have access to the value are instancied in the I_Property* macro, but there are already instantied by the I_Method* macro before secondary problem: - the function used by the property could no be customized in the genwrapper.conf file - an array property can't insert a value - the std::map reflector (and indexedProperty in general) haven't remove method - about the help in wrapper ... why not ... solution : To use the function define by the I_Method, I add a MethodInfo variable in the I_Method0 macro old macro : #define I_Method0(ret, fn) (\ params.clear(),\ addMethod(new osgIntrospection::TypedMethodIn fo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params))) new macro : #define I_Method0(ret, fn, signature, briefHelp, detailedHelp) \ params.clear(); \ osgIntrospection::MethodInfo* signature = addMethod(new osgIntrospection::TypedMethodInfo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature) the osgIntrospection::MethodInfo* signature is used by the I_Property macro to define the MethodInfo that it use so for I_Property macro : old macro : #define I_PropertyWithReturnType(t, n, r) \ cap=addProperty(new osgIntrospection::PropertyInfo(osgIntrospection::Reflection::getType(typeid(reflected_type)), osgIntrospection::Reflection::getType(typeid(t)), #n, \ I_Method0(t, get##n), \ I_Method1(r, set##n, IN, t, value))) new macro: #define I_SimpleProperty(t, n, get, set) \ get, \ set)) The genwrapper has been modified in this way. The method signature is define by the prototype of the method For example, the "const char* libraryName();" have "__C5_char_P1__libraryName" for signature solution for secondary problem: The genwrapper accept new tokens in the configuration to custumize the property. The new PropertyInserter and the CustomPropertyInsertAttribute class has been defined The PropertyRemover has been added to the StdMapReflector The _briefHelp and _detailedHelp variable has been added in PropertyInfo, MethodInfo and ContructorInfo class modification: I have modify the genwrapper files Configuration.cpp Configuration.h add some tokens to custumize the property Doxyfile.template add the comment in the output xml genwrapper.conf customize some property in osg::Geometry RegistryBuilder.h RegistryBuilder.cpp add the process_help function (to extract help from xml) TypeRegister.cpp TypeRegister.h optimize the property detection TypeDesc.h TypeDesc.cpp modify FunctionDesc and PropertyDesc WrapperGenerator.h WrapperGenerator.cpp modify the output I also modify the fallowing osgIntrospection files: include/osgIntrospection/Attributes add the PropertyInserter and the CustomPropertyInsertAttribute class include/osgIntrospection/ConstructorInfo add the _briefHelp and _detailedHelp variable in the ConstructorInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/MethodInfo add the _briefHelp and _detailedHelp variable in the MethodInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/PropertyInfo add the _briefHelp and _detailedHelp variable in the PropertyInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/ReflectionMacro remove unused I_Property* macro modify all I_Method macro to accept the help string modify all I_Method macro to define a MethodInfo signature include/osgIntrospection/Reflector add the PropertyInserter in StdVectorReflector and StdListReflector add the PropertyRemover in the StdMapReflector include/osgIntrospection/StaticMethodInfo modify all StaticMethodInfo* to accept the help in parameter include/osgIntrospection/TypedMethodInfo modify all TypedMethodInfo* to accept the help in parameter include/osgIntrospection/TypedConstructorInfo modify all TypedConstructorInfo* to accept the help in parameter include/osgIntrospection/Type add the _briefHelp and _detailedHelp variable in the Type class "
2006-10-17 23:17:06 +08:00
D_MethodInfoType signature = addMethod(new osgIntrospection::StaticMethodInfo1<reflected_type, ret, P0>(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature)
#define I_StaticMethod2(ret, fn, A0, P0, N0, A1, P1, N1, signature, briefHelp, detailedHelp) \
params.clear(); \
params.push_back(new osgIntrospection::ParameterInfo(#N0, osgIntrospection::Reflection::getType(extended_typeid<P0>()), osgIntrospection::ParameterInfo::A0)); \
params.push_back(new osgIntrospection::ParameterInfo(#N1, osgIntrospection::Reflection::getType(extended_typeid<P1>()), osgIntrospection::ParameterInfo::A1)); \
From David Callu: " the main problem is the wrapper generation: The PropertyInfo class use MethodInfo class to access to the value. When the property are define with the I_Property* macro, the MethodInfo use by the property to have access to the value are instancied in the I_Property* macro, but there are already instantied by the I_Method* macro before secondary problem: - the function used by the property could no be customized in the genwrapper.conf file - an array property can't insert a value - the std::map reflector (and indexedProperty in general) haven't remove method - about the help in wrapper ... why not ... solution : To use the function define by the I_Method, I add a MethodInfo variable in the I_Method0 macro old macro : #define I_Method0(ret, fn) (\ params.clear(),\ addMethod(new osgIntrospection::TypedMethodIn fo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params))) new macro : #define I_Method0(ret, fn, signature, briefHelp, detailedHelp) \ params.clear(); \ osgIntrospection::MethodInfo* signature = addMethod(new osgIntrospection::TypedMethodInfo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature) the osgIntrospection::MethodInfo* signature is used by the I_Property macro to define the MethodInfo that it use so for I_Property macro : old macro : #define I_PropertyWithReturnType(t, n, r) \ cap=addProperty(new osgIntrospection::PropertyInfo(osgIntrospection::Reflection::getType(typeid(reflected_type)), osgIntrospection::Reflection::getType(typeid(t)), #n, \ I_Method0(t, get##n), \ I_Method1(r, set##n, IN, t, value))) new macro: #define I_SimpleProperty(t, n, get, set) \ get, \ set)) The genwrapper has been modified in this way. The method signature is define by the prototype of the method For example, the "const char* libraryName();" have "__C5_char_P1__libraryName" for signature solution for secondary problem: The genwrapper accept new tokens in the configuration to custumize the property. The new PropertyInserter and the CustomPropertyInsertAttribute class has been defined The PropertyRemover has been added to the StdMapReflector The _briefHelp and _detailedHelp variable has been added in PropertyInfo, MethodInfo and ContructorInfo class modification: I have modify the genwrapper files Configuration.cpp Configuration.h add some tokens to custumize the property Doxyfile.template add the comment in the output xml genwrapper.conf customize some property in osg::Geometry RegistryBuilder.h RegistryBuilder.cpp add the process_help function (to extract help from xml) TypeRegister.cpp TypeRegister.h optimize the property detection TypeDesc.h TypeDesc.cpp modify FunctionDesc and PropertyDesc WrapperGenerator.h WrapperGenerator.cpp modify the output I also modify the fallowing osgIntrospection files: include/osgIntrospection/Attributes add the PropertyInserter and the CustomPropertyInsertAttribute class include/osgIntrospection/ConstructorInfo add the _briefHelp and _detailedHelp variable in the ConstructorInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/MethodInfo add the _briefHelp and _detailedHelp variable in the MethodInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/PropertyInfo add the _briefHelp and _detailedHelp variable in the PropertyInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/ReflectionMacro remove unused I_Property* macro modify all I_Method macro to accept the help string modify all I_Method macro to define a MethodInfo signature include/osgIntrospection/Reflector add the PropertyInserter in StdVectorReflector and StdListReflector add the PropertyRemover in the StdMapReflector include/osgIntrospection/StaticMethodInfo modify all StaticMethodInfo* to accept the help in parameter include/osgIntrospection/TypedMethodInfo modify all TypedMethodInfo* to accept the help in parameter include/osgIntrospection/TypedConstructorInfo modify all TypedConstructorInfo* to accept the help in parameter include/osgIntrospection/Type add the _briefHelp and _detailedHelp variable in the Type class "
2006-10-17 23:17:06 +08:00
D_MethodInfoType signature = addMethod(new osgIntrospection::StaticMethodInfo2<reflected_type, ret, P0, P1>(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature)
#define I_StaticMethod3(ret, fn, A0, P0, N0, A1, P1, N1, A2, P2, N2, signature, briefHelp, detailedHelp) \
params.clear(); \
params.push_back(new osgIntrospection::ParameterInfo(#N0, osgIntrospection::Reflection::getType(extended_typeid<P0>()), osgIntrospection::ParameterInfo::A0)); \
params.push_back(new osgIntrospection::ParameterInfo(#N1, osgIntrospection::Reflection::getType(extended_typeid<P1>()), osgIntrospection::ParameterInfo::A1)); \
params.push_back(new osgIntrospection::ParameterInfo(#N2, osgIntrospection::Reflection::getType(extended_typeid<P2>()), osgIntrospection::ParameterInfo::A2)); \
From David Callu: " the main problem is the wrapper generation: The PropertyInfo class use MethodInfo class to access to the value. When the property are define with the I_Property* macro, the MethodInfo use by the property to have access to the value are instancied in the I_Property* macro, but there are already instantied by the I_Method* macro before secondary problem: - the function used by the property could no be customized in the genwrapper.conf file - an array property can't insert a value - the std::map reflector (and indexedProperty in general) haven't remove method - about the help in wrapper ... why not ... solution : To use the function define by the I_Method, I add a MethodInfo variable in the I_Method0 macro old macro : #define I_Method0(ret, fn) (\ params.clear(),\ addMethod(new osgIntrospection::TypedMethodIn fo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params))) new macro : #define I_Method0(ret, fn, signature, briefHelp, detailedHelp) \ params.clear(); \ osgIntrospection::MethodInfo* signature = addMethod(new osgIntrospection::TypedMethodInfo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature) the osgIntrospection::MethodInfo* signature is used by the I_Property macro to define the MethodInfo that it use so for I_Property macro : old macro : #define I_PropertyWithReturnType(t, n, r) \ cap=addProperty(new osgIntrospection::PropertyInfo(osgIntrospection::Reflection::getType(typeid(reflected_type)), osgIntrospection::Reflection::getType(typeid(t)), #n, \ I_Method0(t, get##n), \ I_Method1(r, set##n, IN, t, value))) new macro: #define I_SimpleProperty(t, n, get, set) \ get, \ set)) The genwrapper has been modified in this way. The method signature is define by the prototype of the method For example, the "const char* libraryName();" have "__C5_char_P1__libraryName" for signature solution for secondary problem: The genwrapper accept new tokens in the configuration to custumize the property. The new PropertyInserter and the CustomPropertyInsertAttribute class has been defined The PropertyRemover has been added to the StdMapReflector The _briefHelp and _detailedHelp variable has been added in PropertyInfo, MethodInfo and ContructorInfo class modification: I have modify the genwrapper files Configuration.cpp Configuration.h add some tokens to custumize the property Doxyfile.template add the comment in the output xml genwrapper.conf customize some property in osg::Geometry RegistryBuilder.h RegistryBuilder.cpp add the process_help function (to extract help from xml) TypeRegister.cpp TypeRegister.h optimize the property detection TypeDesc.h TypeDesc.cpp modify FunctionDesc and PropertyDesc WrapperGenerator.h WrapperGenerator.cpp modify the output I also modify the fallowing osgIntrospection files: include/osgIntrospection/Attributes add the PropertyInserter and the CustomPropertyInsertAttribute class include/osgIntrospection/ConstructorInfo add the _briefHelp and _detailedHelp variable in the ConstructorInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/MethodInfo add the _briefHelp and _detailedHelp variable in the MethodInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/PropertyInfo add the _briefHelp and _detailedHelp variable in the PropertyInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/ReflectionMacro remove unused I_Property* macro modify all I_Method macro to accept the help string modify all I_Method macro to define a MethodInfo signature include/osgIntrospection/Reflector add the PropertyInserter in StdVectorReflector and StdListReflector add the PropertyRemover in the StdMapReflector include/osgIntrospection/StaticMethodInfo modify all StaticMethodInfo* to accept the help in parameter include/osgIntrospection/TypedMethodInfo modify all TypedMethodInfo* to accept the help in parameter include/osgIntrospection/TypedConstructorInfo modify all TypedConstructorInfo* to accept the help in parameter include/osgIntrospection/Type add the _briefHelp and _detailedHelp variable in the Type class "
2006-10-17 23:17:06 +08:00
D_MethodInfoType signature = addMethod(new osgIntrospection::StaticMethodInfo3<reflected_type, ret, P0, P1, P2>(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature)
#define I_StaticMethod4(ret, fn, A0, P0, N0, A1, P1, N1, A2, P2, N2, A3, P3, N3, signature, briefHelp, detailedHelp) \
params.clear(); \
params.push_back(new osgIntrospection::ParameterInfo(#N0, osgIntrospection::Reflection::getType(extended_typeid<P0>()), osgIntrospection::ParameterInfo::A0)); \
params.push_back(new osgIntrospection::ParameterInfo(#N1, osgIntrospection::Reflection::getType(extended_typeid<P1>()), osgIntrospection::ParameterInfo::A1)); \
params.push_back(new osgIntrospection::ParameterInfo(#N2, osgIntrospection::Reflection::getType(extended_typeid<P2>()), osgIntrospection::ParameterInfo::A2)); \
params.push_back(new osgIntrospection::ParameterInfo(#N3, osgIntrospection::Reflection::getType(extended_typeid<P3>()), osgIntrospection::ParameterInfo::A3)); \
From David Callu: " the main problem is the wrapper generation: The PropertyInfo class use MethodInfo class to access to the value. When the property are define with the I_Property* macro, the MethodInfo use by the property to have access to the value are instancied in the I_Property* macro, but there are already instantied by the I_Method* macro before secondary problem: - the function used by the property could no be customized in the genwrapper.conf file - an array property can't insert a value - the std::map reflector (and indexedProperty in general) haven't remove method - about the help in wrapper ... why not ... solution : To use the function define by the I_Method, I add a MethodInfo variable in the I_Method0 macro old macro : #define I_Method0(ret, fn) (\ params.clear(),\ addMethod(new osgIntrospection::TypedMethodIn fo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params))) new macro : #define I_Method0(ret, fn, signature, briefHelp, detailedHelp) \ params.clear(); \ osgIntrospection::MethodInfo* signature = addMethod(new osgIntrospection::TypedMethodInfo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature) the osgIntrospection::MethodInfo* signature is used by the I_Property macro to define the MethodInfo that it use so for I_Property macro : old macro : #define I_PropertyWithReturnType(t, n, r) \ cap=addProperty(new osgIntrospection::PropertyInfo(osgIntrospection::Reflection::getType(typeid(reflected_type)), osgIntrospection::Reflection::getType(typeid(t)), #n, \ I_Method0(t, get##n), \ I_Method1(r, set##n, IN, t, value))) new macro: #define I_SimpleProperty(t, n, get, set) \ get, \ set)) The genwrapper has been modified in this way. The method signature is define by the prototype of the method For example, the "const char* libraryName();" have "__C5_char_P1__libraryName" for signature solution for secondary problem: The genwrapper accept new tokens in the configuration to custumize the property. The new PropertyInserter and the CustomPropertyInsertAttribute class has been defined The PropertyRemover has been added to the StdMapReflector The _briefHelp and _detailedHelp variable has been added in PropertyInfo, MethodInfo and ContructorInfo class modification: I have modify the genwrapper files Configuration.cpp Configuration.h add some tokens to custumize the property Doxyfile.template add the comment in the output xml genwrapper.conf customize some property in osg::Geometry RegistryBuilder.h RegistryBuilder.cpp add the process_help function (to extract help from xml) TypeRegister.cpp TypeRegister.h optimize the property detection TypeDesc.h TypeDesc.cpp modify FunctionDesc and PropertyDesc WrapperGenerator.h WrapperGenerator.cpp modify the output I also modify the fallowing osgIntrospection files: include/osgIntrospection/Attributes add the PropertyInserter and the CustomPropertyInsertAttribute class include/osgIntrospection/ConstructorInfo add the _briefHelp and _detailedHelp variable in the ConstructorInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/MethodInfo add the _briefHelp and _detailedHelp variable in the MethodInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/PropertyInfo add the _briefHelp and _detailedHelp variable in the PropertyInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/ReflectionMacro remove unused I_Property* macro modify all I_Method macro to accept the help string modify all I_Method macro to define a MethodInfo signature include/osgIntrospection/Reflector add the PropertyInserter in StdVectorReflector and StdListReflector add the PropertyRemover in the StdMapReflector include/osgIntrospection/StaticMethodInfo modify all StaticMethodInfo* to accept the help in parameter include/osgIntrospection/TypedMethodInfo modify all TypedMethodInfo* to accept the help in parameter include/osgIntrospection/TypedConstructorInfo modify all TypedConstructorInfo* to accept the help in parameter include/osgIntrospection/Type add the _briefHelp and _detailedHelp variable in the Type class "
2006-10-17 23:17:06 +08:00
D_MethodInfoType signature = addMethod(new osgIntrospection::StaticMethodInfo4<reflected_type, ret, P0, P1, P2, P3>(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature)
#define I_StaticMethod5(ret, fn, A0, P0, N0, A1, P1, N1, A2, P2, N2, A3, P3, N3, A4, P4, N4, signature, briefHelp, detailedHelp) \
params.clear(); \
params.push_back(new osgIntrospection::ParameterInfo(#N0, osgIntrospection::Reflection::getType(extended_typeid<P0>()), osgIntrospection::ParameterInfo::A0)); \
params.push_back(new osgIntrospection::ParameterInfo(#N1, osgIntrospection::Reflection::getType(extended_typeid<P1>()), osgIntrospection::ParameterInfo::A1)); \
params.push_back(new osgIntrospection::ParameterInfo(#N2, osgIntrospection::Reflection::getType(extended_typeid<P2>()), osgIntrospection::ParameterInfo::A2)); \
params.push_back(new osgIntrospection::ParameterInfo(#N3, osgIntrospection::Reflection::getType(extended_typeid<P3>()), osgIntrospection::ParameterInfo::A3)); \
params.push_back(new osgIntrospection::ParameterInfo(#N4, osgIntrospection::Reflection::getType(extended_typeid<P4>()), osgIntrospection::ParameterInfo::A4)); \
From David Callu: " the main problem is the wrapper generation: The PropertyInfo class use MethodInfo class to access to the value. When the property are define with the I_Property* macro, the MethodInfo use by the property to have access to the value are instancied in the I_Property* macro, but there are already instantied by the I_Method* macro before secondary problem: - the function used by the property could no be customized in the genwrapper.conf file - an array property can't insert a value - the std::map reflector (and indexedProperty in general) haven't remove method - about the help in wrapper ... why not ... solution : To use the function define by the I_Method, I add a MethodInfo variable in the I_Method0 macro old macro : #define I_Method0(ret, fn) (\ params.clear(),\ addMethod(new osgIntrospection::TypedMethodIn fo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params))) new macro : #define I_Method0(ret, fn, signature, briefHelp, detailedHelp) \ params.clear(); \ osgIntrospection::MethodInfo* signature = addMethod(new osgIntrospection::TypedMethodInfo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature) the osgIntrospection::MethodInfo* signature is used by the I_Property macro to define the MethodInfo that it use so for I_Property macro : old macro : #define I_PropertyWithReturnType(t, n, r) \ cap=addProperty(new osgIntrospection::PropertyInfo(osgIntrospection::Reflection::getType(typeid(reflected_type)), osgIntrospection::Reflection::getType(typeid(t)), #n, \ I_Method0(t, get##n), \ I_Method1(r, set##n, IN, t, value))) new macro: #define I_SimpleProperty(t, n, get, set) \ get, \ set)) The genwrapper has been modified in this way. The method signature is define by the prototype of the method For example, the "const char* libraryName();" have "__C5_char_P1__libraryName" for signature solution for secondary problem: The genwrapper accept new tokens in the configuration to custumize the property. The new PropertyInserter and the CustomPropertyInsertAttribute class has been defined The PropertyRemover has been added to the StdMapReflector The _briefHelp and _detailedHelp variable has been added in PropertyInfo, MethodInfo and ContructorInfo class modification: I have modify the genwrapper files Configuration.cpp Configuration.h add some tokens to custumize the property Doxyfile.template add the comment in the output xml genwrapper.conf customize some property in osg::Geometry RegistryBuilder.h RegistryBuilder.cpp add the process_help function (to extract help from xml) TypeRegister.cpp TypeRegister.h optimize the property detection TypeDesc.h TypeDesc.cpp modify FunctionDesc and PropertyDesc WrapperGenerator.h WrapperGenerator.cpp modify the output I also modify the fallowing osgIntrospection files: include/osgIntrospection/Attributes add the PropertyInserter and the CustomPropertyInsertAttribute class include/osgIntrospection/ConstructorInfo add the _briefHelp and _detailedHelp variable in the ConstructorInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/MethodInfo add the _briefHelp and _detailedHelp variable in the MethodInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/PropertyInfo add the _briefHelp and _detailedHelp variable in the PropertyInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/ReflectionMacro remove unused I_Property* macro modify all I_Method macro to accept the help string modify all I_Method macro to define a MethodInfo signature include/osgIntrospection/Reflector add the PropertyInserter in StdVectorReflector and StdListReflector add the PropertyRemover in the StdMapReflector include/osgIntrospection/StaticMethodInfo modify all StaticMethodInfo* to accept the help in parameter include/osgIntrospection/TypedMethodInfo modify all TypedMethodInfo* to accept the help in parameter include/osgIntrospection/TypedConstructorInfo modify all TypedConstructorInfo* to accept the help in parameter include/osgIntrospection/Type add the _briefHelp and _detailedHelp variable in the Type class "
2006-10-17 23:17:06 +08:00
D_MethodInfoType signature = addMethod(new osgIntrospection::StaticMethodInfo5<reflected_type, ret, P0, P1, P2, P3, P4>(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature)
#define I_StaticMethod6(ret, fn, A0, P0, N0, A1, P1, N1, A2, P2, N2, A3, P3, N3, A4, P4, N4, A5, P5, N5, signature, briefHelp, detailedHelp) \
params.clear(); \
params.push_back(new osgIntrospection::ParameterInfo(#N0, osgIntrospection::Reflection::getType(extended_typeid<P0>()), osgIntrospection::ParameterInfo::A0)); \
params.push_back(new osgIntrospection::ParameterInfo(#N1, osgIntrospection::Reflection::getType(extended_typeid<P1>()), osgIntrospection::ParameterInfo::A1)); \
params.push_back(new osgIntrospection::ParameterInfo(#N2, osgIntrospection::Reflection::getType(extended_typeid<P2>()), osgIntrospection::ParameterInfo::A2)); \
params.push_back(new osgIntrospection::ParameterInfo(#N3, osgIntrospection::Reflection::getType(extended_typeid<P3>()), osgIntrospection::ParameterInfo::A3)); \
params.push_back(new osgIntrospection::ParameterInfo(#N4, osgIntrospection::Reflection::getType(extended_typeid<P4>()), osgIntrospection::ParameterInfo::A4)); \
params.push_back(new osgIntrospection::ParameterInfo(#N5, osgIntrospection::Reflection::getType(extended_typeid<P5>()), osgIntrospection::ParameterInfo::A5)); \
From David Callu: " the main problem is the wrapper generation: The PropertyInfo class use MethodInfo class to access to the value. When the property are define with the I_Property* macro, the MethodInfo use by the property to have access to the value are instancied in the I_Property* macro, but there are already instantied by the I_Method* macro before secondary problem: - the function used by the property could no be customized in the genwrapper.conf file - an array property can't insert a value - the std::map reflector (and indexedProperty in general) haven't remove method - about the help in wrapper ... why not ... solution : To use the function define by the I_Method, I add a MethodInfo variable in the I_Method0 macro old macro : #define I_Method0(ret, fn) (\ params.clear(),\ addMethod(new osgIntrospection::TypedMethodIn fo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params))) new macro : #define I_Method0(ret, fn, signature, briefHelp, detailedHelp) \ params.clear(); \ osgIntrospection::MethodInfo* signature = addMethod(new osgIntrospection::TypedMethodInfo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature) the osgIntrospection::MethodInfo* signature is used by the I_Property macro to define the MethodInfo that it use so for I_Property macro : old macro : #define I_PropertyWithReturnType(t, n, r) \ cap=addProperty(new osgIntrospection::PropertyInfo(osgIntrospection::Reflection::getType(typeid(reflected_type)), osgIntrospection::Reflection::getType(typeid(t)), #n, \ I_Method0(t, get##n), \ I_Method1(r, set##n, IN, t, value))) new macro: #define I_SimpleProperty(t, n, get, set) \ get, \ set)) The genwrapper has been modified in this way. The method signature is define by the prototype of the method For example, the "const char* libraryName();" have "__C5_char_P1__libraryName" for signature solution for secondary problem: The genwrapper accept new tokens in the configuration to custumize the property. The new PropertyInserter and the CustomPropertyInsertAttribute class has been defined The PropertyRemover has been added to the StdMapReflector The _briefHelp and _detailedHelp variable has been added in PropertyInfo, MethodInfo and ContructorInfo class modification: I have modify the genwrapper files Configuration.cpp Configuration.h add some tokens to custumize the property Doxyfile.template add the comment in the output xml genwrapper.conf customize some property in osg::Geometry RegistryBuilder.h RegistryBuilder.cpp add the process_help function (to extract help from xml) TypeRegister.cpp TypeRegister.h optimize the property detection TypeDesc.h TypeDesc.cpp modify FunctionDesc and PropertyDesc WrapperGenerator.h WrapperGenerator.cpp modify the output I also modify the fallowing osgIntrospection files: include/osgIntrospection/Attributes add the PropertyInserter and the CustomPropertyInsertAttribute class include/osgIntrospection/ConstructorInfo add the _briefHelp and _detailedHelp variable in the ConstructorInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/MethodInfo add the _briefHelp and _detailedHelp variable in the MethodInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/PropertyInfo add the _briefHelp and _detailedHelp variable in the PropertyInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/ReflectionMacro remove unused I_Property* macro modify all I_Method macro to accept the help string modify all I_Method macro to define a MethodInfo signature include/osgIntrospection/Reflector add the PropertyInserter in StdVectorReflector and StdListReflector add the PropertyRemover in the StdMapReflector include/osgIntrospection/StaticMethodInfo modify all StaticMethodInfo* to accept the help in parameter include/osgIntrospection/TypedMethodInfo modify all TypedMethodInfo* to accept the help in parameter include/osgIntrospection/TypedConstructorInfo modify all TypedConstructorInfo* to accept the help in parameter include/osgIntrospection/Type add the _briefHelp and _detailedHelp variable in the Type class "
2006-10-17 23:17:06 +08:00
D_MethodInfoType signature = addMethod(new osgIntrospection::StaticMethodInfo6<reflected_type, ret, P0, P1, P2, P3, P4, P5>(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature)
#define I_StaticMethod7(ret, fn, A0, P0, N0, A1, P1, N1, A2, P2, N2, A3, P3, N3, A4, P4, N4, A5, P5, N5, A6, P6, N6, signature, briefHelp, detailedHelp) \
params.clear(); \
params.push_back(new osgIntrospection::ParameterInfo(#N0, osgIntrospection::Reflection::getType(extended_typeid<P0>()), osgIntrospection::ParameterInfo::A0)); \
params.push_back(new osgIntrospection::ParameterInfo(#N1, osgIntrospection::Reflection::getType(extended_typeid<P1>()), osgIntrospection::ParameterInfo::A1)); \
params.push_back(new osgIntrospection::ParameterInfo(#N2, osgIntrospection::Reflection::getType(extended_typeid<P2>()), osgIntrospection::ParameterInfo::A2)); \
params.push_back(new osgIntrospection::ParameterInfo(#N3, osgIntrospection::Reflection::getType(extended_typeid<P3>()), osgIntrospection::ParameterInfo::A3)); \
params.push_back(new osgIntrospection::ParameterInfo(#N4, osgIntrospection::Reflection::getType(extended_typeid<P4>()), osgIntrospection::ParameterInfo::A4)); \
params.push_back(new osgIntrospection::ParameterInfo(#N5, osgIntrospection::Reflection::getType(extended_typeid<P5>()), osgIntrospection::ParameterInfo::A5)); \
params.push_back(new osgIntrospection::ParameterInfo(#N6, osgIntrospection::Reflection::getType(extended_typeid<P6>()), osgIntrospection::ParameterInfo::A6)); \
From David Callu: " the main problem is the wrapper generation: The PropertyInfo class use MethodInfo class to access to the value. When the property are define with the I_Property* macro, the MethodInfo use by the property to have access to the value are instancied in the I_Property* macro, but there are already instantied by the I_Method* macro before secondary problem: - the function used by the property could no be customized in the genwrapper.conf file - an array property can't insert a value - the std::map reflector (and indexedProperty in general) haven't remove method - about the help in wrapper ... why not ... solution : To use the function define by the I_Method, I add a MethodInfo variable in the I_Method0 macro old macro : #define I_Method0(ret, fn) (\ params.clear(),\ addMethod(new osgIntrospection::TypedMethodIn fo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params))) new macro : #define I_Method0(ret, fn, signature, briefHelp, detailedHelp) \ params.clear(); \ osgIntrospection::MethodInfo* signature = addMethod(new osgIntrospection::TypedMethodInfo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature) the osgIntrospection::MethodInfo* signature is used by the I_Property macro to define the MethodInfo that it use so for I_Property macro : old macro : #define I_PropertyWithReturnType(t, n, r) \ cap=addProperty(new osgIntrospection::PropertyInfo(osgIntrospection::Reflection::getType(typeid(reflected_type)), osgIntrospection::Reflection::getType(typeid(t)), #n, \ I_Method0(t, get##n), \ I_Method1(r, set##n, IN, t, value))) new macro: #define I_SimpleProperty(t, n, get, set) \ get, \ set)) The genwrapper has been modified in this way. The method signature is define by the prototype of the method For example, the "const char* libraryName();" have "__C5_char_P1__libraryName" for signature solution for secondary problem: The genwrapper accept new tokens in the configuration to custumize the property. The new PropertyInserter and the CustomPropertyInsertAttribute class has been defined The PropertyRemover has been added to the StdMapReflector The _briefHelp and _detailedHelp variable has been added in PropertyInfo, MethodInfo and ContructorInfo class modification: I have modify the genwrapper files Configuration.cpp Configuration.h add some tokens to custumize the property Doxyfile.template add the comment in the output xml genwrapper.conf customize some property in osg::Geometry RegistryBuilder.h RegistryBuilder.cpp add the process_help function (to extract help from xml) TypeRegister.cpp TypeRegister.h optimize the property detection TypeDesc.h TypeDesc.cpp modify FunctionDesc and PropertyDesc WrapperGenerator.h WrapperGenerator.cpp modify the output I also modify the fallowing osgIntrospection files: include/osgIntrospection/Attributes add the PropertyInserter and the CustomPropertyInsertAttribute class include/osgIntrospection/ConstructorInfo add the _briefHelp and _detailedHelp variable in the ConstructorInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/MethodInfo add the _briefHelp and _detailedHelp variable in the MethodInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/PropertyInfo add the _briefHelp and _detailedHelp variable in the PropertyInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/ReflectionMacro remove unused I_Property* macro modify all I_Method macro to accept the help string modify all I_Method macro to define a MethodInfo signature include/osgIntrospection/Reflector add the PropertyInserter in StdVectorReflector and StdListReflector add the PropertyRemover in the StdMapReflector include/osgIntrospection/StaticMethodInfo modify all StaticMethodInfo* to accept the help in parameter include/osgIntrospection/TypedMethodInfo modify all TypedMethodInfo* to accept the help in parameter include/osgIntrospection/TypedConstructorInfo modify all TypedConstructorInfo* to accept the help in parameter include/osgIntrospection/Type add the _briefHelp and _detailedHelp variable in the Type class "
2006-10-17 23:17:06 +08:00
D_MethodInfoType signature = addMethod(new osgIntrospection::StaticMethodInfo7<reflected_type, ret, P0, P1, P2, P3, P4, P5, P6>(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature)
#define I_StaticMethod8(ret, fn, A0, P0, N0, A1, P1, N1, A2, P2, N2, A3, P3, N3, A4, P4, N4, A5, P5, N5, A6, P6, N6, A7, P7, N7, signature, briefHelp, detailedHelp) \
params.clear(); \
params.push_back(new osgIntrospection::ParameterInfo(#N0, osgIntrospection::Reflection::getType(extended_typeid<P0>()), osgIntrospection::ParameterInfo::A0)); \
params.push_back(new osgIntrospection::ParameterInfo(#N1, osgIntrospection::Reflection::getType(extended_typeid<P1>()), osgIntrospection::ParameterInfo::A1)); \
params.push_back(new osgIntrospection::ParameterInfo(#N2, osgIntrospection::Reflection::getType(extended_typeid<P2>()), osgIntrospection::ParameterInfo::A2)); \
params.push_back(new osgIntrospection::ParameterInfo(#N3, osgIntrospection::Reflection::getType(extended_typeid<P3>()), osgIntrospection::ParameterInfo::A3)); \
params.push_back(new osgIntrospection::ParameterInfo(#N4, osgIntrospection::Reflection::getType(extended_typeid<P4>()), osgIntrospection::ParameterInfo::A4)); \
params.push_back(new osgIntrospection::ParameterInfo(#N5, osgIntrospection::Reflection::getType(extended_typeid<P5>()), osgIntrospection::ParameterInfo::A5)); \
params.push_back(new osgIntrospection::ParameterInfo(#N6, osgIntrospection::Reflection::getType(extended_typeid<P6>()), osgIntrospection::ParameterInfo::A6)); \
params.push_back(new osgIntrospection::ParameterInfo(#N7, osgIntrospection::Reflection::getType(extended_typeid<P7>()), osgIntrospection::ParameterInfo::A7)); \
From David Callu: " the main problem is the wrapper generation: The PropertyInfo class use MethodInfo class to access to the value. When the property are define with the I_Property* macro, the MethodInfo use by the property to have access to the value are instancied in the I_Property* macro, but there are already instantied by the I_Method* macro before secondary problem: - the function used by the property could no be customized in the genwrapper.conf file - an array property can't insert a value - the std::map reflector (and indexedProperty in general) haven't remove method - about the help in wrapper ... why not ... solution : To use the function define by the I_Method, I add a MethodInfo variable in the I_Method0 macro old macro : #define I_Method0(ret, fn) (\ params.clear(),\ addMethod(new osgIntrospection::TypedMethodIn fo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params))) new macro : #define I_Method0(ret, fn, signature, briefHelp, detailedHelp) \ params.clear(); \ osgIntrospection::MethodInfo* signature = addMethod(new osgIntrospection::TypedMethodInfo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature) the osgIntrospection::MethodInfo* signature is used by the I_Property macro to define the MethodInfo that it use so for I_Property macro : old macro : #define I_PropertyWithReturnType(t, n, r) \ cap=addProperty(new osgIntrospection::PropertyInfo(osgIntrospection::Reflection::getType(typeid(reflected_type)), osgIntrospection::Reflection::getType(typeid(t)), #n, \ I_Method0(t, get##n), \ I_Method1(r, set##n, IN, t, value))) new macro: #define I_SimpleProperty(t, n, get, set) \ get, \ set)) The genwrapper has been modified in this way. The method signature is define by the prototype of the method For example, the "const char* libraryName();" have "__C5_char_P1__libraryName" for signature solution for secondary problem: The genwrapper accept new tokens in the configuration to custumize the property. The new PropertyInserter and the CustomPropertyInsertAttribute class has been defined The PropertyRemover has been added to the StdMapReflector The _briefHelp and _detailedHelp variable has been added in PropertyInfo, MethodInfo and ContructorInfo class modification: I have modify the genwrapper files Configuration.cpp Configuration.h add some tokens to custumize the property Doxyfile.template add the comment in the output xml genwrapper.conf customize some property in osg::Geometry RegistryBuilder.h RegistryBuilder.cpp add the process_help function (to extract help from xml) TypeRegister.cpp TypeRegister.h optimize the property detection TypeDesc.h TypeDesc.cpp modify FunctionDesc and PropertyDesc WrapperGenerator.h WrapperGenerator.cpp modify the output I also modify the fallowing osgIntrospection files: include/osgIntrospection/Attributes add the PropertyInserter and the CustomPropertyInsertAttribute class include/osgIntrospection/ConstructorInfo add the _briefHelp and _detailedHelp variable in the ConstructorInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/MethodInfo add the _briefHelp and _detailedHelp variable in the MethodInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/PropertyInfo add the _briefHelp and _detailedHelp variable in the PropertyInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/ReflectionMacro remove unused I_Property* macro modify all I_Method macro to accept the help string modify all I_Method macro to define a MethodInfo signature include/osgIntrospection/Reflector add the PropertyInserter in StdVectorReflector and StdListReflector add the PropertyRemover in the StdMapReflector include/osgIntrospection/StaticMethodInfo modify all StaticMethodInfo* to accept the help in parameter include/osgIntrospection/TypedMethodInfo modify all TypedMethodInfo* to accept the help in parameter include/osgIntrospection/TypedConstructorInfo modify all TypedConstructorInfo* to accept the help in parameter include/osgIntrospection/Type add the _briefHelp and _detailedHelp variable in the Type class "
2006-10-17 23:17:06 +08:00
D_MethodInfoType signature = addMethod(new osgIntrospection::StaticMethodInfo8<reflected_type, ret, P0, P1, P2, P3, P4, P5, P6, P7>(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature)
#define I_StaticMethod9(ret, fn, A0, P0, N0, A1, P1, N1, A2, P2, N2, A3, P3, N3, A4, P4, N4, A5, P5, N5, A6, P6, N6, A7, P7, N7, A8, P8, N8, signature, briefHelp, detailedHelp) \
params.clear(); \
params.push_back(new osgIntrospection::ParameterInfo(#N0, osgIntrospection::Reflection::getType(extended_typeid<P0>()), osgIntrospection::ParameterInfo::A0)); \
params.push_back(new osgIntrospection::ParameterInfo(#N1, osgIntrospection::Reflection::getType(extended_typeid<P1>()), osgIntrospection::ParameterInfo::A1)); \
params.push_back(new osgIntrospection::ParameterInfo(#N2, osgIntrospection::Reflection::getType(extended_typeid<P2>()), osgIntrospection::ParameterInfo::A2)); \
params.push_back(new osgIntrospection::ParameterInfo(#N3, osgIntrospection::Reflection::getType(extended_typeid<P3>()), osgIntrospection::ParameterInfo::A3)); \
params.push_back(new osgIntrospection::ParameterInfo(#N4, osgIntrospection::Reflection::getType(extended_typeid<P4>()), osgIntrospection::ParameterInfo::A4)); \
params.push_back(new osgIntrospection::ParameterInfo(#N5, osgIntrospection::Reflection::getType(extended_typeid<P5>()), osgIntrospection::ParameterInfo::A5)); \
params.push_back(new osgIntrospection::ParameterInfo(#N6, osgIntrospection::Reflection::getType(extended_typeid<P6>()), osgIntrospection::ParameterInfo::A6)); \
params.push_back(new osgIntrospection::ParameterInfo(#N7, osgIntrospection::Reflection::getType(extended_typeid<P7>()), osgIntrospection::ParameterInfo::A7)); \
params.push_back(new osgIntrospection::ParameterInfo(#N8, osgIntrospection::Reflection::getType(extended_typeid<P8>()), osgIntrospection::ParameterInfo::A8)); \
From David Callu: " the main problem is the wrapper generation: The PropertyInfo class use MethodInfo class to access to the value. When the property are define with the I_Property* macro, the MethodInfo use by the property to have access to the value are instancied in the I_Property* macro, but there are already instantied by the I_Method* macro before secondary problem: - the function used by the property could no be customized in the genwrapper.conf file - an array property can't insert a value - the std::map reflector (and indexedProperty in general) haven't remove method - about the help in wrapper ... why not ... solution : To use the function define by the I_Method, I add a MethodInfo variable in the I_Method0 macro old macro : #define I_Method0(ret, fn) (\ params.clear(),\ addMethod(new osgIntrospection::TypedMethodIn fo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params))) new macro : #define I_Method0(ret, fn, signature, briefHelp, detailedHelp) \ params.clear(); \ osgIntrospection::MethodInfo* signature = addMethod(new osgIntrospection::TypedMethodInfo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature) the osgIntrospection::MethodInfo* signature is used by the I_Property macro to define the MethodInfo that it use so for I_Property macro : old macro : #define I_PropertyWithReturnType(t, n, r) \ cap=addProperty(new osgIntrospection::PropertyInfo(osgIntrospection::Reflection::getType(typeid(reflected_type)), osgIntrospection::Reflection::getType(typeid(t)), #n, \ I_Method0(t, get##n), \ I_Method1(r, set##n, IN, t, value))) new macro: #define I_SimpleProperty(t, n, get, set) \ get, \ set)) The genwrapper has been modified in this way. The method signature is define by the prototype of the method For example, the "const char* libraryName();" have "__C5_char_P1__libraryName" for signature solution for secondary problem: The genwrapper accept new tokens in the configuration to custumize the property. The new PropertyInserter and the CustomPropertyInsertAttribute class has been defined The PropertyRemover has been added to the StdMapReflector The _briefHelp and _detailedHelp variable has been added in PropertyInfo, MethodInfo and ContructorInfo class modification: I have modify the genwrapper files Configuration.cpp Configuration.h add some tokens to custumize the property Doxyfile.template add the comment in the output xml genwrapper.conf customize some property in osg::Geometry RegistryBuilder.h RegistryBuilder.cpp add the process_help function (to extract help from xml) TypeRegister.cpp TypeRegister.h optimize the property detection TypeDesc.h TypeDesc.cpp modify FunctionDesc and PropertyDesc WrapperGenerator.h WrapperGenerator.cpp modify the output I also modify the fallowing osgIntrospection files: include/osgIntrospection/Attributes add the PropertyInserter and the CustomPropertyInsertAttribute class include/osgIntrospection/ConstructorInfo add the _briefHelp and _detailedHelp variable in the ConstructorInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/MethodInfo add the _briefHelp and _detailedHelp variable in the MethodInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/PropertyInfo add the _briefHelp and _detailedHelp variable in the PropertyInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/ReflectionMacro remove unused I_Property* macro modify all I_Method macro to accept the help string modify all I_Method macro to define a MethodInfo signature include/osgIntrospection/Reflector add the PropertyInserter in StdVectorReflector and StdListReflector add the PropertyRemover in the StdMapReflector include/osgIntrospection/StaticMethodInfo modify all StaticMethodInfo* to accept the help in parameter include/osgIntrospection/TypedMethodInfo modify all TypedMethodInfo* to accept the help in parameter include/osgIntrospection/TypedConstructorInfo modify all TypedConstructorInfo* to accept the help in parameter include/osgIntrospection/Type add the _briefHelp and _detailedHelp variable in the Type class "
2006-10-17 23:17:06 +08:00
D_MethodInfoType signature = addMethod(new osgIntrospection::StaticMethodInfo9<reflected_type, ret, P0, P1, P2, P3, P4, P5, P6, P7, P8>(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature)
#define I_StaticMethod10(ret, fn, A0, P0, N0, A1, P1, N1, A2, P2, N2, A3, P3, N3, A4, P4, N4, A5, P5, N5, A6, P6, N6, A7, P7, N7, A8, P8, N8, A9, P9, N9, signature, briefHelp, detailedHelp) \
params.clear(); \
params.push_back(new osgIntrospection::ParameterInfo(#N0, osgIntrospection::Reflection::getType(extended_typeid<P0>()), osgIntrospection::ParameterInfo::A0)); \
params.push_back(new osgIntrospection::ParameterInfo(#N1, osgIntrospection::Reflection::getType(extended_typeid<P1>()), osgIntrospection::ParameterInfo::A1)); \
params.push_back(new osgIntrospection::ParameterInfo(#N2, osgIntrospection::Reflection::getType(extended_typeid<P2>()), osgIntrospection::ParameterInfo::A2)); \
params.push_back(new osgIntrospection::ParameterInfo(#N3, osgIntrospection::Reflection::getType(extended_typeid<P3>()), osgIntrospection::ParameterInfo::A3)); \
params.push_back(new osgIntrospection::ParameterInfo(#N4, osgIntrospection::Reflection::getType(extended_typeid<P4>()), osgIntrospection::ParameterInfo::A4)); \
params.push_back(new osgIntrospection::ParameterInfo(#N5, osgIntrospection::Reflection::getType(extended_typeid<P5>()), osgIntrospection::ParameterInfo::A5)); \
params.push_back(new osgIntrospection::ParameterInfo(#N6, osgIntrospection::Reflection::getType(extended_typeid<P6>()), osgIntrospection::ParameterInfo::A6)); \
params.push_back(new osgIntrospection::ParameterInfo(#N7, osgIntrospection::Reflection::getType(extended_typeid<P7>()), osgIntrospection::ParameterInfo::A7)); \
params.push_back(new osgIntrospection::ParameterInfo(#N8, osgIntrospection::Reflection::getType(extended_typeid<P8>()), osgIntrospection::ParameterInfo::A8)); \
params.push_back(new osgIntrospection::ParameterInfo(#N9, osgIntrospection::Reflection::getType(extended_typeid<P9>()), osgIntrospection::ParameterInfo::A9)); \
From David Callu: " the main problem is the wrapper generation: The PropertyInfo class use MethodInfo class to access to the value. When the property are define with the I_Property* macro, the MethodInfo use by the property to have access to the value are instancied in the I_Property* macro, but there are already instantied by the I_Method* macro before secondary problem: - the function used by the property could no be customized in the genwrapper.conf file - an array property can't insert a value - the std::map reflector (and indexedProperty in general) haven't remove method - about the help in wrapper ... why not ... solution : To use the function define by the I_Method, I add a MethodInfo variable in the I_Method0 macro old macro : #define I_Method0(ret, fn) (\ params.clear(),\ addMethod(new osgIntrospection::TypedMethodIn fo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params))) new macro : #define I_Method0(ret, fn, signature, briefHelp, detailedHelp) \ params.clear(); \ osgIntrospection::MethodInfo* signature = addMethod(new osgIntrospection::TypedMethodInfo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature) the osgIntrospection::MethodInfo* signature is used by the I_Property macro to define the MethodInfo that it use so for I_Property macro : old macro : #define I_PropertyWithReturnType(t, n, r) \ cap=addProperty(new osgIntrospection::PropertyInfo(osgIntrospection::Reflection::getType(typeid(reflected_type)), osgIntrospection::Reflection::getType(typeid(t)), #n, \ I_Method0(t, get##n), \ I_Method1(r, set##n, IN, t, value))) new macro: #define I_SimpleProperty(t, n, get, set) \ get, \ set)) The genwrapper has been modified in this way. The method signature is define by the prototype of the method For example, the "const char* libraryName();" have "__C5_char_P1__libraryName" for signature solution for secondary problem: The genwrapper accept new tokens in the configuration to custumize the property. The new PropertyInserter and the CustomPropertyInsertAttribute class has been defined The PropertyRemover has been added to the StdMapReflector The _briefHelp and _detailedHelp variable has been added in PropertyInfo, MethodInfo and ContructorInfo class modification: I have modify the genwrapper files Configuration.cpp Configuration.h add some tokens to custumize the property Doxyfile.template add the comment in the output xml genwrapper.conf customize some property in osg::Geometry RegistryBuilder.h RegistryBuilder.cpp add the process_help function (to extract help from xml) TypeRegister.cpp TypeRegister.h optimize the property detection TypeDesc.h TypeDesc.cpp modify FunctionDesc and PropertyDesc WrapperGenerator.h WrapperGenerator.cpp modify the output I also modify the fallowing osgIntrospection files: include/osgIntrospection/Attributes add the PropertyInserter and the CustomPropertyInsertAttribute class include/osgIntrospection/ConstructorInfo add the _briefHelp and _detailedHelp variable in the ConstructorInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/MethodInfo add the _briefHelp and _detailedHelp variable in the MethodInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/PropertyInfo add the _briefHelp and _detailedHelp variable in the PropertyInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/ReflectionMacro remove unused I_Property* macro modify all I_Method macro to accept the help string modify all I_Method macro to define a MethodInfo signature include/osgIntrospection/Reflector add the PropertyInserter in StdVectorReflector and StdListReflector add the PropertyRemover in the StdMapReflector include/osgIntrospection/StaticMethodInfo modify all StaticMethodInfo* to accept the help in parameter include/osgIntrospection/TypedMethodInfo modify all TypedMethodInfo* to accept the help in parameter include/osgIntrospection/TypedConstructorInfo modify all TypedConstructorInfo* to accept the help in parameter include/osgIntrospection/Type add the _briefHelp and _detailedHelp variable in the Type class "
2006-10-17 23:17:06 +08:00
D_MethodInfoType signature = addMethod(new osgIntrospection::StaticMethodInfo10<reflected_type, ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9>(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature)
#define I_StaticMethod11(ret, fn, A0, P0, N0, A1, P1, N1, A2, P2, N2, A3, P3, N3, A4, P4, N4, A5, P5, N5, A6, P6, N6, A7, P7, N7, A8, P8, N8, A9, P9, N9, A10, P10, N10, signature, briefHelp, detailedHelp) \
params.clear(); \
params.push_back(new osgIntrospection::ParameterInfo(#N0, osgIntrospection::Reflection::getType(extended_typeid<P0>()), osgIntrospection::ParameterInfo::A0)); \
params.push_back(new osgIntrospection::ParameterInfo(#N1, osgIntrospection::Reflection::getType(extended_typeid<P1>()), osgIntrospection::ParameterInfo::A1)); \
params.push_back(new osgIntrospection::ParameterInfo(#N2, osgIntrospection::Reflection::getType(extended_typeid<P2>()), osgIntrospection::ParameterInfo::A2)); \
params.push_back(new osgIntrospection::ParameterInfo(#N3, osgIntrospection::Reflection::getType(extended_typeid<P3>()), osgIntrospection::ParameterInfo::A3)); \
params.push_back(new osgIntrospection::ParameterInfo(#N4, osgIntrospection::Reflection::getType(extended_typeid<P4>()), osgIntrospection::ParameterInfo::A4)); \
params.push_back(new osgIntrospection::ParameterInfo(#N5, osgIntrospection::Reflection::getType(extended_typeid<P5>()), osgIntrospection::ParameterInfo::A5)); \
params.push_back(new osgIntrospection::ParameterInfo(#N6, osgIntrospection::Reflection::getType(extended_typeid<P6>()), osgIntrospection::ParameterInfo::A6)); \
params.push_back(new osgIntrospection::ParameterInfo(#N7, osgIntrospection::Reflection::getType(extended_typeid<P7>()), osgIntrospection::ParameterInfo::A7)); \
params.push_back(new osgIntrospection::ParameterInfo(#N8, osgIntrospection::Reflection::getType(extended_typeid<P8>()), osgIntrospection::ParameterInfo::A8)); \
params.push_back(new osgIntrospection::ParameterInfo(#N9, osgIntrospection::Reflection::getType(extended_typeid<P9>()), osgIntrospection::ParameterInfo::A9)); \
params.push_back(new osgIntrospection::ParameterInfo(#N10, osgIntrospection::Reflection::getType(extended_typeid<P10>()), osgIntrospection::ParameterInfo::A10)); \
From David Callu: " the main problem is the wrapper generation: The PropertyInfo class use MethodInfo class to access to the value. When the property are define with the I_Property* macro, the MethodInfo use by the property to have access to the value are instancied in the I_Property* macro, but there are already instantied by the I_Method* macro before secondary problem: - the function used by the property could no be customized in the genwrapper.conf file - an array property can't insert a value - the std::map reflector (and indexedProperty in general) haven't remove method - about the help in wrapper ... why not ... solution : To use the function define by the I_Method, I add a MethodInfo variable in the I_Method0 macro old macro : #define I_Method0(ret, fn) (\ params.clear(),\ addMethod(new osgIntrospection::TypedMethodIn fo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params))) new macro : #define I_Method0(ret, fn, signature, briefHelp, detailedHelp) \ params.clear(); \ osgIntrospection::MethodInfo* signature = addMethod(new osgIntrospection::TypedMethodInfo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature) the osgIntrospection::MethodInfo* signature is used by the I_Property macro to define the MethodInfo that it use so for I_Property macro : old macro : #define I_PropertyWithReturnType(t, n, r) \ cap=addProperty(new osgIntrospection::PropertyInfo(osgIntrospection::Reflection::getType(typeid(reflected_type)), osgIntrospection::Reflection::getType(typeid(t)), #n, \ I_Method0(t, get##n), \ I_Method1(r, set##n, IN, t, value))) new macro: #define I_SimpleProperty(t, n, get, set) \ get, \ set)) The genwrapper has been modified in this way. The method signature is define by the prototype of the method For example, the "const char* libraryName();" have "__C5_char_P1__libraryName" for signature solution for secondary problem: The genwrapper accept new tokens in the configuration to custumize the property. The new PropertyInserter and the CustomPropertyInsertAttribute class has been defined The PropertyRemover has been added to the StdMapReflector The _briefHelp and _detailedHelp variable has been added in PropertyInfo, MethodInfo and ContructorInfo class modification: I have modify the genwrapper files Configuration.cpp Configuration.h add some tokens to custumize the property Doxyfile.template add the comment in the output xml genwrapper.conf customize some property in osg::Geometry RegistryBuilder.h RegistryBuilder.cpp add the process_help function (to extract help from xml) TypeRegister.cpp TypeRegister.h optimize the property detection TypeDesc.h TypeDesc.cpp modify FunctionDesc and PropertyDesc WrapperGenerator.h WrapperGenerator.cpp modify the output I also modify the fallowing osgIntrospection files: include/osgIntrospection/Attributes add the PropertyInserter and the CustomPropertyInsertAttribute class include/osgIntrospection/ConstructorInfo add the _briefHelp and _detailedHelp variable in the ConstructorInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/MethodInfo add the _briefHelp and _detailedHelp variable in the MethodInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/PropertyInfo add the _briefHelp and _detailedHelp variable in the PropertyInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/ReflectionMacro remove unused I_Property* macro modify all I_Method macro to accept the help string modify all I_Method macro to define a MethodInfo signature include/osgIntrospection/Reflector add the PropertyInserter in StdVectorReflector and StdListReflector add the PropertyRemover in the StdMapReflector include/osgIntrospection/StaticMethodInfo modify all StaticMethodInfo* to accept the help in parameter include/osgIntrospection/TypedMethodInfo modify all TypedMethodInfo* to accept the help in parameter include/osgIntrospection/TypedConstructorInfo modify all TypedConstructorInfo* to accept the help in parameter include/osgIntrospection/Type add the _briefHelp and _detailedHelp variable in the Type class "
2006-10-17 23:17:06 +08:00
D_MethodInfoType signature = addMethod(new osgIntrospection::StaticMethodInfo11<reflected_type, ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10>(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature)
#define I_StaticMethod12(ret, fn, A0, P0, N0, A1, P1, N1, A2, P2, N2, A3, P3, N3, A4, P4, N4, A5, P5, N5, A6, P6, N6, A7, P7, N7, A8, P8, N8, A9, P9, N9, A10, P10, N10, A11, P11, N11, signature, briefHelp, detailedHelp) \
params.clear(); \
params.push_back(new osgIntrospection::ParameterInfo(#N0, osgIntrospection::Reflection::getType(extended_typeid<P0>()), osgIntrospection::ParameterInfo::A0)); \
params.push_back(new osgIntrospection::ParameterInfo(#N1, osgIntrospection::Reflection::getType(extended_typeid<P1>()), osgIntrospection::ParameterInfo::A1)); \
params.push_back(new osgIntrospection::ParameterInfo(#N2, osgIntrospection::Reflection::getType(extended_typeid<P2>()), osgIntrospection::ParameterInfo::A2)); \
params.push_back(new osgIntrospection::ParameterInfo(#N3, osgIntrospection::Reflection::getType(extended_typeid<P3>()), osgIntrospection::ParameterInfo::A3)); \
params.push_back(new osgIntrospection::ParameterInfo(#N4, osgIntrospection::Reflection::getType(extended_typeid<P4>()), osgIntrospection::ParameterInfo::A4)); \
params.push_back(new osgIntrospection::ParameterInfo(#N5, osgIntrospection::Reflection::getType(extended_typeid<P5>()), osgIntrospection::ParameterInfo::A5)); \
params.push_back(new osgIntrospection::ParameterInfo(#N6, osgIntrospection::Reflection::getType(extended_typeid<P6>()), osgIntrospection::ParameterInfo::A6)); \
params.push_back(new osgIntrospection::ParameterInfo(#N7, osgIntrospection::Reflection::getType(extended_typeid<P7>()), osgIntrospection::ParameterInfo::A7)); \
params.push_back(new osgIntrospection::ParameterInfo(#N8, osgIntrospection::Reflection::getType(extended_typeid<P8>()), osgIntrospection::ParameterInfo::A8)); \
params.push_back(new osgIntrospection::ParameterInfo(#N9, osgIntrospection::Reflection::getType(extended_typeid<P9>()), osgIntrospection::ParameterInfo::A9)); \
params.push_back(new osgIntrospection::ParameterInfo(#N10, osgIntrospection::Reflection::getType(extended_typeid<P10>()), osgIntrospection::ParameterInfo::A10)); \
params.push_back(new osgIntrospection::ParameterInfo(#N11, osgIntrospection::Reflection::getType(extended_typeid<P11>()), osgIntrospection::ParameterInfo::A11)); \
From David Callu: " the main problem is the wrapper generation: The PropertyInfo class use MethodInfo class to access to the value. When the property are define with the I_Property* macro, the MethodInfo use by the property to have access to the value are instancied in the I_Property* macro, but there are already instantied by the I_Method* macro before secondary problem: - the function used by the property could no be customized in the genwrapper.conf file - an array property can't insert a value - the std::map reflector (and indexedProperty in general) haven't remove method - about the help in wrapper ... why not ... solution : To use the function define by the I_Method, I add a MethodInfo variable in the I_Method0 macro old macro : #define I_Method0(ret, fn) (\ params.clear(),\ addMethod(new osgIntrospection::TypedMethodIn fo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params))) new macro : #define I_Method0(ret, fn, signature, briefHelp, detailedHelp) \ params.clear(); \ osgIntrospection::MethodInfo* signature = addMethod(new osgIntrospection::TypedMethodInfo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature) the osgIntrospection::MethodInfo* signature is used by the I_Property macro to define the MethodInfo that it use so for I_Property macro : old macro : #define I_PropertyWithReturnType(t, n, r) \ cap=addProperty(new osgIntrospection::PropertyInfo(osgIntrospection::Reflection::getType(typeid(reflected_type)), osgIntrospection::Reflection::getType(typeid(t)), #n, \ I_Method0(t, get##n), \ I_Method1(r, set##n, IN, t, value))) new macro: #define I_SimpleProperty(t, n, get, set) \ get, \ set)) The genwrapper has been modified in this way. The method signature is define by the prototype of the method For example, the "const char* libraryName();" have "__C5_char_P1__libraryName" for signature solution for secondary problem: The genwrapper accept new tokens in the configuration to custumize the property. The new PropertyInserter and the CustomPropertyInsertAttribute class has been defined The PropertyRemover has been added to the StdMapReflector The _briefHelp and _detailedHelp variable has been added in PropertyInfo, MethodInfo and ContructorInfo class modification: I have modify the genwrapper files Configuration.cpp Configuration.h add some tokens to custumize the property Doxyfile.template add the comment in the output xml genwrapper.conf customize some property in osg::Geometry RegistryBuilder.h RegistryBuilder.cpp add the process_help function (to extract help from xml) TypeRegister.cpp TypeRegister.h optimize the property detection TypeDesc.h TypeDesc.cpp modify FunctionDesc and PropertyDesc WrapperGenerator.h WrapperGenerator.cpp modify the output I also modify the fallowing osgIntrospection files: include/osgIntrospection/Attributes add the PropertyInserter and the CustomPropertyInsertAttribute class include/osgIntrospection/ConstructorInfo add the _briefHelp and _detailedHelp variable in the ConstructorInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/MethodInfo add the _briefHelp and _detailedHelp variable in the MethodInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/PropertyInfo add the _briefHelp and _detailedHelp variable in the PropertyInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/ReflectionMacro remove unused I_Property* macro modify all I_Method macro to accept the help string modify all I_Method macro to define a MethodInfo signature include/osgIntrospection/Reflector add the PropertyInserter in StdVectorReflector and StdListReflector add the PropertyRemover in the StdMapReflector include/osgIntrospection/StaticMethodInfo modify all StaticMethodInfo* to accept the help in parameter include/osgIntrospection/TypedMethodInfo modify all TypedMethodInfo* to accept the help in parameter include/osgIntrospection/TypedConstructorInfo modify all TypedConstructorInfo* to accept the help in parameter include/osgIntrospection/Type add the _briefHelp and _detailedHelp variable in the Type class "
2006-10-17 23:17:06 +08:00
D_MethodInfoType signature = addMethod(new osgIntrospection::StaticMethodInfo12<reflected_type, ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11>(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature)
#define I_StaticMethod13(ret, fn, A0, P0, N0, A1, P1, N1, A2, P2, N2, A3, P3, N3, A4, P4, N4, A5, P5, N5, A6, P6, N6, A7, P7, N7, A8, P8, N8, A9, P9, N9, A10, P10, N10, A11, P11, N11, A12, P12, N12, signature, briefHelp, detailedHelp) \
params.clear(); \
params.push_back(new osgIntrospection::ParameterInfo(#N0, osgIntrospection::Reflection::getType(extended_typeid<P0>()), osgIntrospection::ParameterInfo::A0)); \
params.push_back(new osgIntrospection::ParameterInfo(#N1, osgIntrospection::Reflection::getType(extended_typeid<P1>()), osgIntrospection::ParameterInfo::A1)); \
params.push_back(new osgIntrospection::ParameterInfo(#N2, osgIntrospection::Reflection::getType(extended_typeid<P2>()), osgIntrospection::ParameterInfo::A2)); \
params.push_back(new osgIntrospection::ParameterInfo(#N3, osgIntrospection::Reflection::getType(extended_typeid<P3>()), osgIntrospection::ParameterInfo::A3)); \
params.push_back(new osgIntrospection::ParameterInfo(#N4, osgIntrospection::Reflection::getType(extended_typeid<P4>()), osgIntrospection::ParameterInfo::A4)); \
params.push_back(new osgIntrospection::ParameterInfo(#N5, osgIntrospection::Reflection::getType(extended_typeid<P5>()), osgIntrospection::ParameterInfo::A5)); \
params.push_back(new osgIntrospection::ParameterInfo(#N6, osgIntrospection::Reflection::getType(extended_typeid<P6>()), osgIntrospection::ParameterInfo::A6)); \
params.push_back(new osgIntrospection::ParameterInfo(#N7, osgIntrospection::Reflection::getType(extended_typeid<P7>()), osgIntrospection::ParameterInfo::A7)); \
params.push_back(new osgIntrospection::ParameterInfo(#N8, osgIntrospection::Reflection::getType(extended_typeid<P8>()), osgIntrospection::ParameterInfo::A8)); \
params.push_back(new osgIntrospection::ParameterInfo(#N9, osgIntrospection::Reflection::getType(extended_typeid<P9>()), osgIntrospection::ParameterInfo::A9)); \
params.push_back(new osgIntrospection::ParameterInfo(#N10, osgIntrospection::Reflection::getType(extended_typeid<P10>()), osgIntrospection::ParameterInfo::A10)); \
params.push_back(new osgIntrospection::ParameterInfo(#N11, osgIntrospection::Reflection::getType(extended_typeid<P11>()), osgIntrospection::ParameterInfo::A11)); \
params.push_back(new osgIntrospection::ParameterInfo(#N12, osgIntrospection::Reflection::getType(extended_typeid<P12>()), osgIntrospection::ParameterInfo::A12)); \
From David Callu: " the main problem is the wrapper generation: The PropertyInfo class use MethodInfo class to access to the value. When the property are define with the I_Property* macro, the MethodInfo use by the property to have access to the value are instancied in the I_Property* macro, but there are already instantied by the I_Method* macro before secondary problem: - the function used by the property could no be customized in the genwrapper.conf file - an array property can't insert a value - the std::map reflector (and indexedProperty in general) haven't remove method - about the help in wrapper ... why not ... solution : To use the function define by the I_Method, I add a MethodInfo variable in the I_Method0 macro old macro : #define I_Method0(ret, fn) (\ params.clear(),\ addMethod(new osgIntrospection::TypedMethodIn fo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params))) new macro : #define I_Method0(ret, fn, signature, briefHelp, detailedHelp) \ params.clear(); \ osgIntrospection::MethodInfo* signature = addMethod(new osgIntrospection::TypedMethodInfo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature) the osgIntrospection::MethodInfo* signature is used by the I_Property macro to define the MethodInfo that it use so for I_Property macro : old macro : #define I_PropertyWithReturnType(t, n, r) \ cap=addProperty(new osgIntrospection::PropertyInfo(osgIntrospection::Reflection::getType(typeid(reflected_type)), osgIntrospection::Reflection::getType(typeid(t)), #n, \ I_Method0(t, get##n), \ I_Method1(r, set##n, IN, t, value))) new macro: #define I_SimpleProperty(t, n, get, set) \ get, \ set)) The genwrapper has been modified in this way. The method signature is define by the prototype of the method For example, the "const char* libraryName();" have "__C5_char_P1__libraryName" for signature solution for secondary problem: The genwrapper accept new tokens in the configuration to custumize the property. The new PropertyInserter and the CustomPropertyInsertAttribute class has been defined The PropertyRemover has been added to the StdMapReflector The _briefHelp and _detailedHelp variable has been added in PropertyInfo, MethodInfo and ContructorInfo class modification: I have modify the genwrapper files Configuration.cpp Configuration.h add some tokens to custumize the property Doxyfile.template add the comment in the output xml genwrapper.conf customize some property in osg::Geometry RegistryBuilder.h RegistryBuilder.cpp add the process_help function (to extract help from xml) TypeRegister.cpp TypeRegister.h optimize the property detection TypeDesc.h TypeDesc.cpp modify FunctionDesc and PropertyDesc WrapperGenerator.h WrapperGenerator.cpp modify the output I also modify the fallowing osgIntrospection files: include/osgIntrospection/Attributes add the PropertyInserter and the CustomPropertyInsertAttribute class include/osgIntrospection/ConstructorInfo add the _briefHelp and _detailedHelp variable in the ConstructorInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/MethodInfo add the _briefHelp and _detailedHelp variable in the MethodInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/PropertyInfo add the _briefHelp and _detailedHelp variable in the PropertyInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/ReflectionMacro remove unused I_Property* macro modify all I_Method macro to accept the help string modify all I_Method macro to define a MethodInfo signature include/osgIntrospection/Reflector add the PropertyInserter in StdVectorReflector and StdListReflector add the PropertyRemover in the StdMapReflector include/osgIntrospection/StaticMethodInfo modify all StaticMethodInfo* to accept the help in parameter include/osgIntrospection/TypedMethodInfo modify all TypedMethodInfo* to accept the help in parameter include/osgIntrospection/TypedConstructorInfo modify all TypedConstructorInfo* to accept the help in parameter include/osgIntrospection/Type add the _briefHelp and _detailedHelp variable in the Type class "
2006-10-17 23:17:06 +08:00
D_MethodInfoType signature = addMethod(new osgIntrospection::StaticMethodInfo13<reflected_type, ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12>(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature)
#define I_StaticMethod14(ret, fn, A0, P0, N0, A1, P1, N1, A2, P2, N2, A3, P3, N3, A4, P4, N4, A5, P5, N5, A6, P6, N6, A7, P7, N7, A8, P8, N8, A9, P9, N9, A10, P10, N10, A11, P11, N11, A12, P12, N12, A13, P13, N13, signature, briefHelp, detailedHelp) \
params.clear(); \
params.push_back(new osgIntrospection::ParameterInfo(#N0, osgIntrospection::Reflection::getType(extended_typeid<P0>()), osgIntrospection::ParameterInfo::A0)); \
params.push_back(new osgIntrospection::ParameterInfo(#N1, osgIntrospection::Reflection::getType(extended_typeid<P1>()), osgIntrospection::ParameterInfo::A1)); \
params.push_back(new osgIntrospection::ParameterInfo(#N2, osgIntrospection::Reflection::getType(extended_typeid<P2>()), osgIntrospection::ParameterInfo::A2)); \
params.push_back(new osgIntrospection::ParameterInfo(#N3, osgIntrospection::Reflection::getType(extended_typeid<P3>()), osgIntrospection::ParameterInfo::A3)); \
params.push_back(new osgIntrospection::ParameterInfo(#N4, osgIntrospection::Reflection::getType(extended_typeid<P4>()), osgIntrospection::ParameterInfo::A4)); \
params.push_back(new osgIntrospection::ParameterInfo(#N5, osgIntrospection::Reflection::getType(extended_typeid<P5>()), osgIntrospection::ParameterInfo::A5)); \
params.push_back(new osgIntrospection::ParameterInfo(#N6, osgIntrospection::Reflection::getType(extended_typeid<P6>()), osgIntrospection::ParameterInfo::A6)); \
params.push_back(new osgIntrospection::ParameterInfo(#N7, osgIntrospection::Reflection::getType(extended_typeid<P7>()), osgIntrospection::ParameterInfo::A7)); \
params.push_back(new osgIntrospection::ParameterInfo(#N8, osgIntrospection::Reflection::getType(extended_typeid<P8>()), osgIntrospection::ParameterInfo::A8)); \
params.push_back(new osgIntrospection::ParameterInfo(#N9, osgIntrospection::Reflection::getType(extended_typeid<P9>()), osgIntrospection::ParameterInfo::A9)); \
params.push_back(new osgIntrospection::ParameterInfo(#N10, osgIntrospection::Reflection::getType(extended_typeid<P10>()), osgIntrospection::ParameterInfo::A10)); \
params.push_back(new osgIntrospection::ParameterInfo(#N11, osgIntrospection::Reflection::getType(extended_typeid<P11>()), osgIntrospection::ParameterInfo::A11)); \
params.push_back(new osgIntrospection::ParameterInfo(#N12, osgIntrospection::Reflection::getType(extended_typeid<P12>()), osgIntrospection::ParameterInfo::A12)); \
params.push_back(new osgIntrospection::ParameterInfo(#N13, osgIntrospection::Reflection::getType(extended_typeid<P13>()), osgIntrospection::ParameterInfo::A13)); \
From David Callu: " the main problem is the wrapper generation: The PropertyInfo class use MethodInfo class to access to the value. When the property are define with the I_Property* macro, the MethodInfo use by the property to have access to the value are instancied in the I_Property* macro, but there are already instantied by the I_Method* macro before secondary problem: - the function used by the property could no be customized in the genwrapper.conf file - an array property can't insert a value - the std::map reflector (and indexedProperty in general) haven't remove method - about the help in wrapper ... why not ... solution : To use the function define by the I_Method, I add a MethodInfo variable in the I_Method0 macro old macro : #define I_Method0(ret, fn) (\ params.clear(),\ addMethod(new osgIntrospection::TypedMethodIn fo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params))) new macro : #define I_Method0(ret, fn, signature, briefHelp, detailedHelp) \ params.clear(); \ osgIntrospection::MethodInfo* signature = addMethod(new osgIntrospection::TypedMethodInfo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature) the osgIntrospection::MethodInfo* signature is used by the I_Property macro to define the MethodInfo that it use so for I_Property macro : old macro : #define I_PropertyWithReturnType(t, n, r) \ cap=addProperty(new osgIntrospection::PropertyInfo(osgIntrospection::Reflection::getType(typeid(reflected_type)), osgIntrospection::Reflection::getType(typeid(t)), #n, \ I_Method0(t, get##n), \ I_Method1(r, set##n, IN, t, value))) new macro: #define I_SimpleProperty(t, n, get, set) \ get, \ set)) The genwrapper has been modified in this way. The method signature is define by the prototype of the method For example, the "const char* libraryName();" have "__C5_char_P1__libraryName" for signature solution for secondary problem: The genwrapper accept new tokens in the configuration to custumize the property. The new PropertyInserter and the CustomPropertyInsertAttribute class has been defined The PropertyRemover has been added to the StdMapReflector The _briefHelp and _detailedHelp variable has been added in PropertyInfo, MethodInfo and ContructorInfo class modification: I have modify the genwrapper files Configuration.cpp Configuration.h add some tokens to custumize the property Doxyfile.template add the comment in the output xml genwrapper.conf customize some property in osg::Geometry RegistryBuilder.h RegistryBuilder.cpp add the process_help function (to extract help from xml) TypeRegister.cpp TypeRegister.h optimize the property detection TypeDesc.h TypeDesc.cpp modify FunctionDesc and PropertyDesc WrapperGenerator.h WrapperGenerator.cpp modify the output I also modify the fallowing osgIntrospection files: include/osgIntrospection/Attributes add the PropertyInserter and the CustomPropertyInsertAttribute class include/osgIntrospection/ConstructorInfo add the _briefHelp and _detailedHelp variable in the ConstructorInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/MethodInfo add the _briefHelp and _detailedHelp variable in the MethodInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/PropertyInfo add the _briefHelp and _detailedHelp variable in the PropertyInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/ReflectionMacro remove unused I_Property* macro modify all I_Method macro to accept the help string modify all I_Method macro to define a MethodInfo signature include/osgIntrospection/Reflector add the PropertyInserter in StdVectorReflector and StdListReflector add the PropertyRemover in the StdMapReflector include/osgIntrospection/StaticMethodInfo modify all StaticMethodInfo* to accept the help in parameter include/osgIntrospection/TypedMethodInfo modify all TypedMethodInfo* to accept the help in parameter include/osgIntrospection/TypedConstructorInfo modify all TypedConstructorInfo* to accept the help in parameter include/osgIntrospection/Type add the _briefHelp and _detailedHelp variable in the Type class "
2006-10-17 23:17:06 +08:00
D_MethodInfoType signature = addMethod(new osgIntrospection::StaticMethodInfo14<reflected_type, ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13>(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature)
#define I_StaticMethod15(ret, fn, A0, P0, N0, A1, P1, N1, A2, P2, N2, A3, P3, N3, A4, P4, N4, A5, P5, N5, A6, P6, N6, A7, P7, N7, A8, P8, N8, A9, P9, N9, A10, P10, N10, A11, P11, N11, A12, P12, N12, A13, P13, N13, A14, P14, N14, signature, briefHelp, detailedHelp) \
params.clear(); \
params.push_back(new osgIntrospection::ParameterInfo(#N0, osgIntrospection::Reflection::getType(extended_typeid<P0>()), osgIntrospection::ParameterInfo::A0)); \
params.push_back(new osgIntrospection::ParameterInfo(#N1, osgIntrospection::Reflection::getType(extended_typeid<P1>()), osgIntrospection::ParameterInfo::A1)); \
params.push_back(new osgIntrospection::ParameterInfo(#N2, osgIntrospection::Reflection::getType(extended_typeid<P2>()), osgIntrospection::ParameterInfo::A2)); \
params.push_back(new osgIntrospection::ParameterInfo(#N3, osgIntrospection::Reflection::getType(extended_typeid<P3>()), osgIntrospection::ParameterInfo::A3)); \
params.push_back(new osgIntrospection::ParameterInfo(#N4, osgIntrospection::Reflection::getType(extended_typeid<P4>()), osgIntrospection::ParameterInfo::A4)); \
params.push_back(new osgIntrospection::ParameterInfo(#N5, osgIntrospection::Reflection::getType(extended_typeid<P5>()), osgIntrospection::ParameterInfo::A5)); \
params.push_back(new osgIntrospection::ParameterInfo(#N6, osgIntrospection::Reflection::getType(extended_typeid<P6>()), osgIntrospection::ParameterInfo::A6)); \
params.push_back(new osgIntrospection::ParameterInfo(#N7, osgIntrospection::Reflection::getType(extended_typeid<P7>()), osgIntrospection::ParameterInfo::A7)); \
params.push_back(new osgIntrospection::ParameterInfo(#N8, osgIntrospection::Reflection::getType(extended_typeid<P8>()), osgIntrospection::ParameterInfo::A8)); \
params.push_back(new osgIntrospection::ParameterInfo(#N9, osgIntrospection::Reflection::getType(extended_typeid<P9>()), osgIntrospection::ParameterInfo::A9)); \
params.push_back(new osgIntrospection::ParameterInfo(#N10, osgIntrospection::Reflection::getType(extended_typeid<P10>()), osgIntrospection::ParameterInfo::A10)); \
params.push_back(new osgIntrospection::ParameterInfo(#N11, osgIntrospection::Reflection::getType(extended_typeid<P11>()), osgIntrospection::ParameterInfo::A11)); \
params.push_back(new osgIntrospection::ParameterInfo(#N12, osgIntrospection::Reflection::getType(extended_typeid<P12>()), osgIntrospection::ParameterInfo::A12)); \
params.push_back(new osgIntrospection::ParameterInfo(#N13, osgIntrospection::Reflection::getType(extended_typeid<P13>()), osgIntrospection::ParameterInfo::A13)); \
params.push_back(new osgIntrospection::ParameterInfo(#N14, osgIntrospection::Reflection::getType(extended_typeid<P14>()), osgIntrospection::ParameterInfo::A14)); \
From David Callu: " the main problem is the wrapper generation: The PropertyInfo class use MethodInfo class to access to the value. When the property are define with the I_Property* macro, the MethodInfo use by the property to have access to the value are instancied in the I_Property* macro, but there are already instantied by the I_Method* macro before secondary problem: - the function used by the property could no be customized in the genwrapper.conf file - an array property can't insert a value - the std::map reflector (and indexedProperty in general) haven't remove method - about the help in wrapper ... why not ... solution : To use the function define by the I_Method, I add a MethodInfo variable in the I_Method0 macro old macro : #define I_Method0(ret, fn) (\ params.clear(),\ addMethod(new osgIntrospection::TypedMethodIn fo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params))) new macro : #define I_Method0(ret, fn, signature, briefHelp, detailedHelp) \ params.clear(); \ osgIntrospection::MethodInfo* signature = addMethod(new osgIntrospection::TypedMethodInfo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature) the osgIntrospection::MethodInfo* signature is used by the I_Property macro to define the MethodInfo that it use so for I_Property macro : old macro : #define I_PropertyWithReturnType(t, n, r) \ cap=addProperty(new osgIntrospection::PropertyInfo(osgIntrospection::Reflection::getType(typeid(reflected_type)), osgIntrospection::Reflection::getType(typeid(t)), #n, \ I_Method0(t, get##n), \ I_Method1(r, set##n, IN, t, value))) new macro: #define I_SimpleProperty(t, n, get, set) \ get, \ set)) The genwrapper has been modified in this way. The method signature is define by the prototype of the method For example, the "const char* libraryName();" have "__C5_char_P1__libraryName" for signature solution for secondary problem: The genwrapper accept new tokens in the configuration to custumize the property. The new PropertyInserter and the CustomPropertyInsertAttribute class has been defined The PropertyRemover has been added to the StdMapReflector The _briefHelp and _detailedHelp variable has been added in PropertyInfo, MethodInfo and ContructorInfo class modification: I have modify the genwrapper files Configuration.cpp Configuration.h add some tokens to custumize the property Doxyfile.template add the comment in the output xml genwrapper.conf customize some property in osg::Geometry RegistryBuilder.h RegistryBuilder.cpp add the process_help function (to extract help from xml) TypeRegister.cpp TypeRegister.h optimize the property detection TypeDesc.h TypeDesc.cpp modify FunctionDesc and PropertyDesc WrapperGenerator.h WrapperGenerator.cpp modify the output I also modify the fallowing osgIntrospection files: include/osgIntrospection/Attributes add the PropertyInserter and the CustomPropertyInsertAttribute class include/osgIntrospection/ConstructorInfo add the _briefHelp and _detailedHelp variable in the ConstructorInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/MethodInfo add the _briefHelp and _detailedHelp variable in the MethodInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/PropertyInfo add the _briefHelp and _detailedHelp variable in the PropertyInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/ReflectionMacro remove unused I_Property* macro modify all I_Method macro to accept the help string modify all I_Method macro to define a MethodInfo signature include/osgIntrospection/Reflector add the PropertyInserter in StdVectorReflector and StdListReflector add the PropertyRemover in the StdMapReflector include/osgIntrospection/StaticMethodInfo modify all StaticMethodInfo* to accept the help in parameter include/osgIntrospection/TypedMethodInfo modify all TypedMethodInfo* to accept the help in parameter include/osgIntrospection/TypedConstructorInfo modify all TypedConstructorInfo* to accept the help in parameter include/osgIntrospection/Type add the _briefHelp and _detailedHelp variable in the Type class "
2006-10-17 23:17:06 +08:00
D_MethodInfoType signature = addMethod(new osgIntrospection::StaticMethodInfo15<reflected_type, ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14>(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature)
#define I_StaticMethod16(ret, fn, A0, P0, N0, A1, P1, N1, A2, P2, N2, A3, P3, N3, A4, P4, N4, A5, P5, N5, A6, P6, N6, A7, P7, N7, A8, P8, N8, A9, P9, N9, A10, P10, N10, A11, P11, N11, A12, P12, N12, A13, P13, N13, A14, P14, N14, A15, P15, N15, signature, briefHelp, detailedHelp) \
params.clear(); \
params.push_back(new osgIntrospection::ParameterInfo(#N0, osgIntrospection::Reflection::getType(extended_typeid<P0>()), osgIntrospection::ParameterInfo::A0)); \
params.push_back(new osgIntrospection::ParameterInfo(#N1, osgIntrospection::Reflection::getType(extended_typeid<P1>()), osgIntrospection::ParameterInfo::A1)); \
params.push_back(new osgIntrospection::ParameterInfo(#N2, osgIntrospection::Reflection::getType(extended_typeid<P2>()), osgIntrospection::ParameterInfo::A2)); \
params.push_back(new osgIntrospection::ParameterInfo(#N3, osgIntrospection::Reflection::getType(extended_typeid<P3>()), osgIntrospection::ParameterInfo::A3)); \
params.push_back(new osgIntrospection::ParameterInfo(#N4, osgIntrospection::Reflection::getType(extended_typeid<P4>()), osgIntrospection::ParameterInfo::A4)); \
params.push_back(new osgIntrospection::ParameterInfo(#N5, osgIntrospection::Reflection::getType(extended_typeid<P5>()), osgIntrospection::ParameterInfo::A5)); \
params.push_back(new osgIntrospection::ParameterInfo(#N6, osgIntrospection::Reflection::getType(extended_typeid<P6>()), osgIntrospection::ParameterInfo::A6)); \
params.push_back(new osgIntrospection::ParameterInfo(#N7, osgIntrospection::Reflection::getType(extended_typeid<P7>()), osgIntrospection::ParameterInfo::A7)); \
params.push_back(new osgIntrospection::ParameterInfo(#N8, osgIntrospection::Reflection::getType(extended_typeid<P8>()), osgIntrospection::ParameterInfo::A8)); \
params.push_back(new osgIntrospection::ParameterInfo(#N9, osgIntrospection::Reflection::getType(extended_typeid<P9>()), osgIntrospection::ParameterInfo::A9)); \
params.push_back(new osgIntrospection::ParameterInfo(#N10, osgIntrospection::Reflection::getType(extended_typeid<P10>()), osgIntrospection::ParameterInfo::A10)); \
params.push_back(new osgIntrospection::ParameterInfo(#N11, osgIntrospection::Reflection::getType(extended_typeid<P11>()), osgIntrospection::ParameterInfo::A11)); \
params.push_back(new osgIntrospection::ParameterInfo(#N12, osgIntrospection::Reflection::getType(extended_typeid<P12>()), osgIntrospection::ParameterInfo::A12)); \
params.push_back(new osgIntrospection::ParameterInfo(#N13, osgIntrospection::Reflection::getType(extended_typeid<P13>()), osgIntrospection::ParameterInfo::A13)); \
params.push_back(new osgIntrospection::ParameterInfo(#N14, osgIntrospection::Reflection::getType(extended_typeid<P14>()), osgIntrospection::ParameterInfo::A14)); \
params.push_back(new osgIntrospection::ParameterInfo(#N15, osgIntrospection::Reflection::getType(extended_typeid<P15>()), osgIntrospection::ParameterInfo::A15)); \
From David Callu: " the main problem is the wrapper generation: The PropertyInfo class use MethodInfo class to access to the value. When the property are define with the I_Property* macro, the MethodInfo use by the property to have access to the value are instancied in the I_Property* macro, but there are already instantied by the I_Method* macro before secondary problem: - the function used by the property could no be customized in the genwrapper.conf file - an array property can't insert a value - the std::map reflector (and indexedProperty in general) haven't remove method - about the help in wrapper ... why not ... solution : To use the function define by the I_Method, I add a MethodInfo variable in the I_Method0 macro old macro : #define I_Method0(ret, fn) (\ params.clear(),\ addMethod(new osgIntrospection::TypedMethodIn fo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params))) new macro : #define I_Method0(ret, fn, signature, briefHelp, detailedHelp) \ params.clear(); \ osgIntrospection::MethodInfo* signature = addMethod(new osgIntrospection::TypedMethodInfo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature) the osgIntrospection::MethodInfo* signature is used by the I_Property macro to define the MethodInfo that it use so for I_Property macro : old macro : #define I_PropertyWithReturnType(t, n, r) \ cap=addProperty(new osgIntrospection::PropertyInfo(osgIntrospection::Reflection::getType(typeid(reflected_type)), osgIntrospection::Reflection::getType(typeid(t)), #n, \ I_Method0(t, get##n), \ I_Method1(r, set##n, IN, t, value))) new macro: #define I_SimpleProperty(t, n, get, set) \ get, \ set)) The genwrapper has been modified in this way. The method signature is define by the prototype of the method For example, the "const char* libraryName();" have "__C5_char_P1__libraryName" for signature solution for secondary problem: The genwrapper accept new tokens in the configuration to custumize the property. The new PropertyInserter and the CustomPropertyInsertAttribute class has been defined The PropertyRemover has been added to the StdMapReflector The _briefHelp and _detailedHelp variable has been added in PropertyInfo, MethodInfo and ContructorInfo class modification: I have modify the genwrapper files Configuration.cpp Configuration.h add some tokens to custumize the property Doxyfile.template add the comment in the output xml genwrapper.conf customize some property in osg::Geometry RegistryBuilder.h RegistryBuilder.cpp add the process_help function (to extract help from xml) TypeRegister.cpp TypeRegister.h optimize the property detection TypeDesc.h TypeDesc.cpp modify FunctionDesc and PropertyDesc WrapperGenerator.h WrapperGenerator.cpp modify the output I also modify the fallowing osgIntrospection files: include/osgIntrospection/Attributes add the PropertyInserter and the CustomPropertyInsertAttribute class include/osgIntrospection/ConstructorInfo add the _briefHelp and _detailedHelp variable in the ConstructorInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/MethodInfo add the _briefHelp and _detailedHelp variable in the MethodInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/PropertyInfo add the _briefHelp and _detailedHelp variable in the PropertyInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/ReflectionMacro remove unused I_Property* macro modify all I_Method macro to accept the help string modify all I_Method macro to define a MethodInfo signature include/osgIntrospection/Reflector add the PropertyInserter in StdVectorReflector and StdListReflector add the PropertyRemover in the StdMapReflector include/osgIntrospection/StaticMethodInfo modify all StaticMethodInfo* to accept the help in parameter include/osgIntrospection/TypedMethodInfo modify all TypedMethodInfo* to accept the help in parameter include/osgIntrospection/TypedConstructorInfo modify all TypedConstructorInfo* to accept the help in parameter include/osgIntrospection/Type add the _briefHelp and _detailedHelp variable in the Type class "
2006-10-17 23:17:06 +08:00
D_MethodInfoType signature = addMethod(new osgIntrospection::StaticMethodInfo16<reflected_type, ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15>(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature)
#define I_StaticMethodWithDefaults0(ret, fn, signature, briefHelp, detailedHelp) \
params.clear(); \
D_MethodInfoType signature = addMethod(new osgIntrospection::StaticMethodInfo0<reflected_type, ret>(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature)
#define I_StaticMethodWithDefaults1(ret, fn, A0, P0, N0, D0, signature, briefHelp, detailedHelp) \
params.clear(); \
params.push_back(new osgIntrospection::ParameterInfo(#N0, osgIntrospection::Reflection::getType(extended_typeid<P0>()), osgIntrospection::ParameterInfo::A0, osgIntrospection::Value(D0))); \
From David Callu: " the main problem is the wrapper generation: The PropertyInfo class use MethodInfo class to access to the value. When the property are define with the I_Property* macro, the MethodInfo use by the property to have access to the value are instancied in the I_Property* macro, but there are already instantied by the I_Method* macro before secondary problem: - the function used by the property could no be customized in the genwrapper.conf file - an array property can't insert a value - the std::map reflector (and indexedProperty in general) haven't remove method - about the help in wrapper ... why not ... solution : To use the function define by the I_Method, I add a MethodInfo variable in the I_Method0 macro old macro : #define I_Method0(ret, fn) (\ params.clear(),\ addMethod(new osgIntrospection::TypedMethodIn fo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params))) new macro : #define I_Method0(ret, fn, signature, briefHelp, detailedHelp) \ params.clear(); \ osgIntrospection::MethodInfo* signature = addMethod(new osgIntrospection::TypedMethodInfo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature) the osgIntrospection::MethodInfo* signature is used by the I_Property macro to define the MethodInfo that it use so for I_Property macro : old macro : #define I_PropertyWithReturnType(t, n, r) \ cap=addProperty(new osgIntrospection::PropertyInfo(osgIntrospection::Reflection::getType(typeid(reflected_type)), osgIntrospection::Reflection::getType(typeid(t)), #n, \ I_Method0(t, get##n), \ I_Method1(r, set##n, IN, t, value))) new macro: #define I_SimpleProperty(t, n, get, set) \ get, \ set)) The genwrapper has been modified in this way. The method signature is define by the prototype of the method For example, the "const char* libraryName();" have "__C5_char_P1__libraryName" for signature solution for secondary problem: The genwrapper accept new tokens in the configuration to custumize the property. The new PropertyInserter and the CustomPropertyInsertAttribute class has been defined The PropertyRemover has been added to the StdMapReflector The _briefHelp and _detailedHelp variable has been added in PropertyInfo, MethodInfo and ContructorInfo class modification: I have modify the genwrapper files Configuration.cpp Configuration.h add some tokens to custumize the property Doxyfile.template add the comment in the output xml genwrapper.conf customize some property in osg::Geometry RegistryBuilder.h RegistryBuilder.cpp add the process_help function (to extract help from xml) TypeRegister.cpp TypeRegister.h optimize the property detection TypeDesc.h TypeDesc.cpp modify FunctionDesc and PropertyDesc WrapperGenerator.h WrapperGenerator.cpp modify the output I also modify the fallowing osgIntrospection files: include/osgIntrospection/Attributes add the PropertyInserter and the CustomPropertyInsertAttribute class include/osgIntrospection/ConstructorInfo add the _briefHelp and _detailedHelp variable in the ConstructorInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/MethodInfo add the _briefHelp and _detailedHelp variable in the MethodInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/PropertyInfo add the _briefHelp and _detailedHelp variable in the PropertyInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/ReflectionMacro remove unused I_Property* macro modify all I_Method macro to accept the help string modify all I_Method macro to define a MethodInfo signature include/osgIntrospection/Reflector add the PropertyInserter in StdVectorReflector and StdListReflector add the PropertyRemover in the StdMapReflector include/osgIntrospection/StaticMethodInfo modify all StaticMethodInfo* to accept the help in parameter include/osgIntrospection/TypedMethodInfo modify all TypedMethodInfo* to accept the help in parameter include/osgIntrospection/TypedConstructorInfo modify all TypedConstructorInfo* to accept the help in parameter include/osgIntrospection/Type add the _briefHelp and _detailedHelp variable in the Type class "
2006-10-17 23:17:06 +08:00
D_MethodInfoType signature = addMethod(new osgIntrospection::StaticMethodInfo1<reflected_type, ret, P0>(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature)
#define I_StaticMethodWithDefaults2(ret, fn, A0, P0, N0, D0, A1, P1, N1, D1, signature, briefHelp, detailedHelp) \
params.clear(); \
params.push_back(new osgIntrospection::ParameterInfo(#N0, osgIntrospection::Reflection::getType(extended_typeid<P0>()), osgIntrospection::ParameterInfo::A0, osgIntrospection::Value(D0))); \
params.push_back(new osgIntrospection::ParameterInfo(#N1, osgIntrospection::Reflection::getType(extended_typeid<P1>()), osgIntrospection::ParameterInfo::A1, osgIntrospection::Value(D1))); \
From David Callu: " the main problem is the wrapper generation: The PropertyInfo class use MethodInfo class to access to the value. When the property are define with the I_Property* macro, the MethodInfo use by the property to have access to the value are instancied in the I_Property* macro, but there are already instantied by the I_Method* macro before secondary problem: - the function used by the property could no be customized in the genwrapper.conf file - an array property can't insert a value - the std::map reflector (and indexedProperty in general) haven't remove method - about the help in wrapper ... why not ... solution : To use the function define by the I_Method, I add a MethodInfo variable in the I_Method0 macro old macro : #define I_Method0(ret, fn) (\ params.clear(),\ addMethod(new osgIntrospection::TypedMethodIn fo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params))) new macro : #define I_Method0(ret, fn, signature, briefHelp, detailedHelp) \ params.clear(); \ osgIntrospection::MethodInfo* signature = addMethod(new osgIntrospection::TypedMethodInfo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature) the osgIntrospection::MethodInfo* signature is used by the I_Property macro to define the MethodInfo that it use so for I_Property macro : old macro : #define I_PropertyWithReturnType(t, n, r) \ cap=addProperty(new osgIntrospection::PropertyInfo(osgIntrospection::Reflection::getType(typeid(reflected_type)), osgIntrospection::Reflection::getType(typeid(t)), #n, \ I_Method0(t, get##n), \ I_Method1(r, set##n, IN, t, value))) new macro: #define I_SimpleProperty(t, n, get, set) \ get, \ set)) The genwrapper has been modified in this way. The method signature is define by the prototype of the method For example, the "const char* libraryName();" have "__C5_char_P1__libraryName" for signature solution for secondary problem: The genwrapper accept new tokens in the configuration to custumize the property. The new PropertyInserter and the CustomPropertyInsertAttribute class has been defined The PropertyRemover has been added to the StdMapReflector The _briefHelp and _detailedHelp variable has been added in PropertyInfo, MethodInfo and ContructorInfo class modification: I have modify the genwrapper files Configuration.cpp Configuration.h add some tokens to custumize the property Doxyfile.template add the comment in the output xml genwrapper.conf customize some property in osg::Geometry RegistryBuilder.h RegistryBuilder.cpp add the process_help function (to extract help from xml) TypeRegister.cpp TypeRegister.h optimize the property detection TypeDesc.h TypeDesc.cpp modify FunctionDesc and PropertyDesc WrapperGenerator.h WrapperGenerator.cpp modify the output I also modify the fallowing osgIntrospection files: include/osgIntrospection/Attributes add the PropertyInserter and the CustomPropertyInsertAttribute class include/osgIntrospection/ConstructorInfo add the _briefHelp and _detailedHelp variable in the ConstructorInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/MethodInfo add the _briefHelp and _detailedHelp variable in the MethodInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/PropertyInfo add the _briefHelp and _detailedHelp variable in the PropertyInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/ReflectionMacro remove unused I_Property* macro modify all I_Method macro to accept the help string modify all I_Method macro to define a MethodInfo signature include/osgIntrospection/Reflector add the PropertyInserter in StdVectorReflector and StdListReflector add the PropertyRemover in the StdMapReflector include/osgIntrospection/StaticMethodInfo modify all StaticMethodInfo* to accept the help in parameter include/osgIntrospection/TypedMethodInfo modify all TypedMethodInfo* to accept the help in parameter include/osgIntrospection/TypedConstructorInfo modify all TypedConstructorInfo* to accept the help in parameter include/osgIntrospection/Type add the _briefHelp and _detailedHelp variable in the Type class "
2006-10-17 23:17:06 +08:00
D_MethodInfoType signature = addMethod(new osgIntrospection::StaticMethodInfo2<reflected_type, ret, P0, P1>(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature)
#define I_StaticMethodWithDefaults3(ret, fn, A0, P0, N0, D0, A1, P1, N1, D1, A2, P2, N2, D2, signature, briefHelp, detailedHelp) \
params.clear(); \
params.push_back(new osgIntrospection::ParameterInfo(#N0, osgIntrospection::Reflection::getType(extended_typeid<P0>()), osgIntrospection::ParameterInfo::A0, osgIntrospection::Value(D0))); \
params.push_back(new osgIntrospection::ParameterInfo(#N1, osgIntrospection::Reflection::getType(extended_typeid<P1>()), osgIntrospection::ParameterInfo::A1, osgIntrospection::Value(D1))); \
params.push_back(new osgIntrospection::ParameterInfo(#N2, osgIntrospection::Reflection::getType(extended_typeid<P2>()), osgIntrospection::ParameterInfo::A2, osgIntrospection::Value(D2))); \
From David Callu: " the main problem is the wrapper generation: The PropertyInfo class use MethodInfo class to access to the value. When the property are define with the I_Property* macro, the MethodInfo use by the property to have access to the value are instancied in the I_Property* macro, but there are already instantied by the I_Method* macro before secondary problem: - the function used by the property could no be customized in the genwrapper.conf file - an array property can't insert a value - the std::map reflector (and indexedProperty in general) haven't remove method - about the help in wrapper ... why not ... solution : To use the function define by the I_Method, I add a MethodInfo variable in the I_Method0 macro old macro : #define I_Method0(ret, fn) (\ params.clear(),\ addMethod(new osgIntrospection::TypedMethodIn fo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params))) new macro : #define I_Method0(ret, fn, signature, briefHelp, detailedHelp) \ params.clear(); \ osgIntrospection::MethodInfo* signature = addMethod(new osgIntrospection::TypedMethodInfo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature) the osgIntrospection::MethodInfo* signature is used by the I_Property macro to define the MethodInfo that it use so for I_Property macro : old macro : #define I_PropertyWithReturnType(t, n, r) \ cap=addProperty(new osgIntrospection::PropertyInfo(osgIntrospection::Reflection::getType(typeid(reflected_type)), osgIntrospection::Reflection::getType(typeid(t)), #n, \ I_Method0(t, get##n), \ I_Method1(r, set##n, IN, t, value))) new macro: #define I_SimpleProperty(t, n, get, set) \ get, \ set)) The genwrapper has been modified in this way. The method signature is define by the prototype of the method For example, the "const char* libraryName();" have "__C5_char_P1__libraryName" for signature solution for secondary problem: The genwrapper accept new tokens in the configuration to custumize the property. The new PropertyInserter and the CustomPropertyInsertAttribute class has been defined The PropertyRemover has been added to the StdMapReflector The _briefHelp and _detailedHelp variable has been added in PropertyInfo, MethodInfo and ContructorInfo class modification: I have modify the genwrapper files Configuration.cpp Configuration.h add some tokens to custumize the property Doxyfile.template add the comment in the output xml genwrapper.conf customize some property in osg::Geometry RegistryBuilder.h RegistryBuilder.cpp add the process_help function (to extract help from xml) TypeRegister.cpp TypeRegister.h optimize the property detection TypeDesc.h TypeDesc.cpp modify FunctionDesc and PropertyDesc WrapperGenerator.h WrapperGenerator.cpp modify the output I also modify the fallowing osgIntrospection files: include/osgIntrospection/Attributes add the PropertyInserter and the CustomPropertyInsertAttribute class include/osgIntrospection/ConstructorInfo add the _briefHelp and _detailedHelp variable in the ConstructorInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/MethodInfo add the _briefHelp and _detailedHelp variable in the MethodInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/PropertyInfo add the _briefHelp and _detailedHelp variable in the PropertyInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/ReflectionMacro remove unused I_Property* macro modify all I_Method macro to accept the help string modify all I_Method macro to define a MethodInfo signature include/osgIntrospection/Reflector add the PropertyInserter in StdVectorReflector and StdListReflector add the PropertyRemover in the StdMapReflector include/osgIntrospection/StaticMethodInfo modify all StaticMethodInfo* to accept the help in parameter include/osgIntrospection/TypedMethodInfo modify all TypedMethodInfo* to accept the help in parameter include/osgIntrospection/TypedConstructorInfo modify all TypedConstructorInfo* to accept the help in parameter include/osgIntrospection/Type add the _briefHelp and _detailedHelp variable in the Type class "
2006-10-17 23:17:06 +08:00
D_MethodInfoType signature = addMethod(new osgIntrospection::StaticMethodInfo3<reflected_type, ret, P0, P1, P2>(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature)
#define I_StaticMethodWithDefaults4(ret, fn, A0, P0, N0, D0, A1, P1, N1, D1, A2, P2, N2, D2, A3, P3, N3, D3, signature, briefHelp, detailedHelp) \
params.clear(); \
params.push_back(new osgIntrospection::ParameterInfo(#N0, osgIntrospection::Reflection::getType(extended_typeid<P0>()), osgIntrospection::ParameterInfo::A0, osgIntrospection::Value(D0))); \
params.push_back(new osgIntrospection::ParameterInfo(#N1, osgIntrospection::Reflection::getType(extended_typeid<P1>()), osgIntrospection::ParameterInfo::A1, osgIntrospection::Value(D1))); \
params.push_back(new osgIntrospection::ParameterInfo(#N2, osgIntrospection::Reflection::getType(extended_typeid<P2>()), osgIntrospection::ParameterInfo::A2, osgIntrospection::Value(D2))); \
params.push_back(new osgIntrospection::ParameterInfo(#N3, osgIntrospection::Reflection::getType(extended_typeid<P3>()), osgIntrospection::ParameterInfo::A3, osgIntrospection::Value(D3))); \
From David Callu: " the main problem is the wrapper generation: The PropertyInfo class use MethodInfo class to access to the value. When the property are define with the I_Property* macro, the MethodInfo use by the property to have access to the value are instancied in the I_Property* macro, but there are already instantied by the I_Method* macro before secondary problem: - the function used by the property could no be customized in the genwrapper.conf file - an array property can't insert a value - the std::map reflector (and indexedProperty in general) haven't remove method - about the help in wrapper ... why not ... solution : To use the function define by the I_Method, I add a MethodInfo variable in the I_Method0 macro old macro : #define I_Method0(ret, fn) (\ params.clear(),\ addMethod(new osgIntrospection::TypedMethodIn fo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params))) new macro : #define I_Method0(ret, fn, signature, briefHelp, detailedHelp) \ params.clear(); \ osgIntrospection::MethodInfo* signature = addMethod(new osgIntrospection::TypedMethodInfo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature) the osgIntrospection::MethodInfo* signature is used by the I_Property macro to define the MethodInfo that it use so for I_Property macro : old macro : #define I_PropertyWithReturnType(t, n, r) \ cap=addProperty(new osgIntrospection::PropertyInfo(osgIntrospection::Reflection::getType(typeid(reflected_type)), osgIntrospection::Reflection::getType(typeid(t)), #n, \ I_Method0(t, get##n), \ I_Method1(r, set##n, IN, t, value))) new macro: #define I_SimpleProperty(t, n, get, set) \ get, \ set)) The genwrapper has been modified in this way. The method signature is define by the prototype of the method For example, the "const char* libraryName();" have "__C5_char_P1__libraryName" for signature solution for secondary problem: The genwrapper accept new tokens in the configuration to custumize the property. The new PropertyInserter and the CustomPropertyInsertAttribute class has been defined The PropertyRemover has been added to the StdMapReflector The _briefHelp and _detailedHelp variable has been added in PropertyInfo, MethodInfo and ContructorInfo class modification: I have modify the genwrapper files Configuration.cpp Configuration.h add some tokens to custumize the property Doxyfile.template add the comment in the output xml genwrapper.conf customize some property in osg::Geometry RegistryBuilder.h RegistryBuilder.cpp add the process_help function (to extract help from xml) TypeRegister.cpp TypeRegister.h optimize the property detection TypeDesc.h TypeDesc.cpp modify FunctionDesc and PropertyDesc WrapperGenerator.h WrapperGenerator.cpp modify the output I also modify the fallowing osgIntrospection files: include/osgIntrospection/Attributes add the PropertyInserter and the CustomPropertyInsertAttribute class include/osgIntrospection/ConstructorInfo add the _briefHelp and _detailedHelp variable in the ConstructorInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/MethodInfo add the _briefHelp and _detailedHelp variable in the MethodInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/PropertyInfo add the _briefHelp and _detailedHelp variable in the PropertyInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/ReflectionMacro remove unused I_Property* macro modify all I_Method macro to accept the help string modify all I_Method macro to define a MethodInfo signature include/osgIntrospection/Reflector add the PropertyInserter in StdVectorReflector and StdListReflector add the PropertyRemover in the StdMapReflector include/osgIntrospection/StaticMethodInfo modify all StaticMethodInfo* to accept the help in parameter include/osgIntrospection/TypedMethodInfo modify all TypedMethodInfo* to accept the help in parameter include/osgIntrospection/TypedConstructorInfo modify all TypedConstructorInfo* to accept the help in parameter include/osgIntrospection/Type add the _briefHelp and _detailedHelp variable in the Type class "
2006-10-17 23:17:06 +08:00
D_MethodInfoType signature = addMethod(new osgIntrospection::StaticMethodInfo4<reflected_type, ret, P0, P1, P2, P3>(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature)
#define I_StaticMethodWithDefaults5(ret, fn, A0, P0, N0, D0, A1, P1, N1, D1, A2, P2, N2, D2, A3, P3, N3, D3, A4, P4, N4, D4, signature, briefHelp, detailedHelp) \
params.clear(); \
params.push_back(new osgIntrospection::ParameterInfo(#N0, osgIntrospection::Reflection::getType(extended_typeid<P0>()), osgIntrospection::ParameterInfo::A0, osgIntrospection::Value(D0))); \
params.push_back(new osgIntrospection::ParameterInfo(#N1, osgIntrospection::Reflection::getType(extended_typeid<P1>()), osgIntrospection::ParameterInfo::A1, osgIntrospection::Value(D1))); \
params.push_back(new osgIntrospection::ParameterInfo(#N2, osgIntrospection::Reflection::getType(extended_typeid<P2>()), osgIntrospection::ParameterInfo::A2, osgIntrospection::Value(D2))); \
params.push_back(new osgIntrospection::ParameterInfo(#N3, osgIntrospection::Reflection::getType(extended_typeid<P3>()), osgIntrospection::ParameterInfo::A3, osgIntrospection::Value(D3))); \
params.push_back(new osgIntrospection::ParameterInfo(#N4, osgIntrospection::Reflection::getType(extended_typeid<P4>()), osgIntrospection::ParameterInfo::A4, osgIntrospection::Value(D4))); \
From David Callu: " the main problem is the wrapper generation: The PropertyInfo class use MethodInfo class to access to the value. When the property are define with the I_Property* macro, the MethodInfo use by the property to have access to the value are instancied in the I_Property* macro, but there are already instantied by the I_Method* macro before secondary problem: - the function used by the property could no be customized in the genwrapper.conf file - an array property can't insert a value - the std::map reflector (and indexedProperty in general) haven't remove method - about the help in wrapper ... why not ... solution : To use the function define by the I_Method, I add a MethodInfo variable in the I_Method0 macro old macro : #define I_Method0(ret, fn) (\ params.clear(),\ addMethod(new osgIntrospection::TypedMethodIn fo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params))) new macro : #define I_Method0(ret, fn, signature, briefHelp, detailedHelp) \ params.clear(); \ osgIntrospection::MethodInfo* signature = addMethod(new osgIntrospection::TypedMethodInfo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature) the osgIntrospection::MethodInfo* signature is used by the I_Property macro to define the MethodInfo that it use so for I_Property macro : old macro : #define I_PropertyWithReturnType(t, n, r) \ cap=addProperty(new osgIntrospection::PropertyInfo(osgIntrospection::Reflection::getType(typeid(reflected_type)), osgIntrospection::Reflection::getType(typeid(t)), #n, \ I_Method0(t, get##n), \ I_Method1(r, set##n, IN, t, value))) new macro: #define I_SimpleProperty(t, n, get, set) \ get, \ set)) The genwrapper has been modified in this way. The method signature is define by the prototype of the method For example, the "const char* libraryName();" have "__C5_char_P1__libraryName" for signature solution for secondary problem: The genwrapper accept new tokens in the configuration to custumize the property. The new PropertyInserter and the CustomPropertyInsertAttribute class has been defined The PropertyRemover has been added to the StdMapReflector The _briefHelp and _detailedHelp variable has been added in PropertyInfo, MethodInfo and ContructorInfo class modification: I have modify the genwrapper files Configuration.cpp Configuration.h add some tokens to custumize the property Doxyfile.template add the comment in the output xml genwrapper.conf customize some property in osg::Geometry RegistryBuilder.h RegistryBuilder.cpp add the process_help function (to extract help from xml) TypeRegister.cpp TypeRegister.h optimize the property detection TypeDesc.h TypeDesc.cpp modify FunctionDesc and PropertyDesc WrapperGenerator.h WrapperGenerator.cpp modify the output I also modify the fallowing osgIntrospection files: include/osgIntrospection/Attributes add the PropertyInserter and the CustomPropertyInsertAttribute class include/osgIntrospection/ConstructorInfo add the _briefHelp and _detailedHelp variable in the ConstructorInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/MethodInfo add the _briefHelp and _detailedHelp variable in the MethodInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/PropertyInfo add the _briefHelp and _detailedHelp variable in the PropertyInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/ReflectionMacro remove unused I_Property* macro modify all I_Method macro to accept the help string modify all I_Method macro to define a MethodInfo signature include/osgIntrospection/Reflector add the PropertyInserter in StdVectorReflector and StdListReflector add the PropertyRemover in the StdMapReflector include/osgIntrospection/StaticMethodInfo modify all StaticMethodInfo* to accept the help in parameter include/osgIntrospection/TypedMethodInfo modify all TypedMethodInfo* to accept the help in parameter include/osgIntrospection/TypedConstructorInfo modify all TypedConstructorInfo* to accept the help in parameter include/osgIntrospection/Type add the _briefHelp and _detailedHelp variable in the Type class "
2006-10-17 23:17:06 +08:00
D_MethodInfoType signature = addMethod(new osgIntrospection::StaticMethodInfo5<reflected_type, ret, P0, P1, P2, P3, P4>(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature)
#define I_StaticMethodWithDefaults6(ret, fn, A0, P0, N0, D0, A1, P1, N1, D1, A2, P2, N2, D2, A3, P3, N3, D3, A4, P4, N4, D4, A5, P5, N5, D5, signature, briefHelp, detailedHelp) \
params.clear(); \
params.push_back(new osgIntrospection::ParameterInfo(#N0, osgIntrospection::Reflection::getType(extended_typeid<P0>()), osgIntrospection::ParameterInfo::A0, osgIntrospection::Value(D0))); \
params.push_back(new osgIntrospection::ParameterInfo(#N1, osgIntrospection::Reflection::getType(extended_typeid<P1>()), osgIntrospection::ParameterInfo::A1, osgIntrospection::Value(D1))); \
params.push_back(new osgIntrospection::ParameterInfo(#N2, osgIntrospection::Reflection::getType(extended_typeid<P2>()), osgIntrospection::ParameterInfo::A2, osgIntrospection::Value(D2))); \
params.push_back(new osgIntrospection::ParameterInfo(#N3, osgIntrospection::Reflection::getType(extended_typeid<P3>()), osgIntrospection::ParameterInfo::A3, osgIntrospection::Value(D3))); \
params.push_back(new osgIntrospection::ParameterInfo(#N4, osgIntrospection::Reflection::getType(extended_typeid<P4>()), osgIntrospection::ParameterInfo::A4, osgIntrospection::Value(D4))); \
params.push_back(new osgIntrospection::ParameterInfo(#N5, osgIntrospection::Reflection::getType(extended_typeid<P5>()), osgIntrospection::ParameterInfo::A5, osgIntrospection::Value(D5))); \
From David Callu: " the main problem is the wrapper generation: The PropertyInfo class use MethodInfo class to access to the value. When the property are define with the I_Property* macro, the MethodInfo use by the property to have access to the value are instancied in the I_Property* macro, but there are already instantied by the I_Method* macro before secondary problem: - the function used by the property could no be customized in the genwrapper.conf file - an array property can't insert a value - the std::map reflector (and indexedProperty in general) haven't remove method - about the help in wrapper ... why not ... solution : To use the function define by the I_Method, I add a MethodInfo variable in the I_Method0 macro old macro : #define I_Method0(ret, fn) (\ params.clear(),\ addMethod(new osgIntrospection::TypedMethodIn fo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params))) new macro : #define I_Method0(ret, fn, signature, briefHelp, detailedHelp) \ params.clear(); \ osgIntrospection::MethodInfo* signature = addMethod(new osgIntrospection::TypedMethodInfo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature) the osgIntrospection::MethodInfo* signature is used by the I_Property macro to define the MethodInfo that it use so for I_Property macro : old macro : #define I_PropertyWithReturnType(t, n, r) \ cap=addProperty(new osgIntrospection::PropertyInfo(osgIntrospection::Reflection::getType(typeid(reflected_type)), osgIntrospection::Reflection::getType(typeid(t)), #n, \ I_Method0(t, get##n), \ I_Method1(r, set##n, IN, t, value))) new macro: #define I_SimpleProperty(t, n, get, set) \ get, \ set)) The genwrapper has been modified in this way. The method signature is define by the prototype of the method For example, the "const char* libraryName();" have "__C5_char_P1__libraryName" for signature solution for secondary problem: The genwrapper accept new tokens in the configuration to custumize the property. The new PropertyInserter and the CustomPropertyInsertAttribute class has been defined The PropertyRemover has been added to the StdMapReflector The _briefHelp and _detailedHelp variable has been added in PropertyInfo, MethodInfo and ContructorInfo class modification: I have modify the genwrapper files Configuration.cpp Configuration.h add some tokens to custumize the property Doxyfile.template add the comment in the output xml genwrapper.conf customize some property in osg::Geometry RegistryBuilder.h RegistryBuilder.cpp add the process_help function (to extract help from xml) TypeRegister.cpp TypeRegister.h optimize the property detection TypeDesc.h TypeDesc.cpp modify FunctionDesc and PropertyDesc WrapperGenerator.h WrapperGenerator.cpp modify the output I also modify the fallowing osgIntrospection files: include/osgIntrospection/Attributes add the PropertyInserter and the CustomPropertyInsertAttribute class include/osgIntrospection/ConstructorInfo add the _briefHelp and _detailedHelp variable in the ConstructorInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/MethodInfo add the _briefHelp and _detailedHelp variable in the MethodInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/PropertyInfo add the _briefHelp and _detailedHelp variable in the PropertyInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/ReflectionMacro remove unused I_Property* macro modify all I_Method macro to accept the help string modify all I_Method macro to define a MethodInfo signature include/osgIntrospection/Reflector add the PropertyInserter in StdVectorReflector and StdListReflector add the PropertyRemover in the StdMapReflector include/osgIntrospection/StaticMethodInfo modify all StaticMethodInfo* to accept the help in parameter include/osgIntrospection/TypedMethodInfo modify all TypedMethodInfo* to accept the help in parameter include/osgIntrospection/TypedConstructorInfo modify all TypedConstructorInfo* to accept the help in parameter include/osgIntrospection/Type add the _briefHelp and _detailedHelp variable in the Type class "
2006-10-17 23:17:06 +08:00
D_MethodInfoType signature = addMethod(new osgIntrospection::StaticMethodInfo6<reflected_type, ret, P0, P1, P2, P3, P4, P5>(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature)
#define I_StaticMethodWithDefaults7(ret, fn, A0, P0, N0, D0, A1, P1, N1, D1, A2, P2, N2, D2, A3, P3, N3, D3, A4, P4, N4, D4, A5, P5, N5, D5, A6, P6, N6, D6, signature, briefHelp, detailedHelp) \
params.clear(); \
params.push_back(new osgIntrospection::ParameterInfo(#N0, osgIntrospection::Reflection::getType(extended_typeid<P0>()), osgIntrospection::ParameterInfo::A0, osgIntrospection::Value(D0))); \
params.push_back(new osgIntrospection::ParameterInfo(#N1, osgIntrospection::Reflection::getType(extended_typeid<P1>()), osgIntrospection::ParameterInfo::A1, osgIntrospection::Value(D1))); \
params.push_back(new osgIntrospection::ParameterInfo(#N2, osgIntrospection::Reflection::getType(extended_typeid<P2>()), osgIntrospection::ParameterInfo::A2, osgIntrospection::Value(D2))); \
params.push_back(new osgIntrospection::ParameterInfo(#N3, osgIntrospection::Reflection::getType(extended_typeid<P3>()), osgIntrospection::ParameterInfo::A3, osgIntrospection::Value(D3))); \
params.push_back(new osgIntrospection::ParameterInfo(#N4, osgIntrospection::Reflection::getType(extended_typeid<P4>()), osgIntrospection::ParameterInfo::A4, osgIntrospection::Value(D4))); \
params.push_back(new osgIntrospection::ParameterInfo(#N5, osgIntrospection::Reflection::getType(extended_typeid<P5>()), osgIntrospection::ParameterInfo::A5, osgIntrospection::Value(D5))); \
params.push_back(new osgIntrospection::ParameterInfo(#N6, osgIntrospection::Reflection::getType(extended_typeid<P6>()), osgIntrospection::ParameterInfo::A6, osgIntrospection::Value(D6))); \
From David Callu: " the main problem is the wrapper generation: The PropertyInfo class use MethodInfo class to access to the value. When the property are define with the I_Property* macro, the MethodInfo use by the property to have access to the value are instancied in the I_Property* macro, but there are already instantied by the I_Method* macro before secondary problem: - the function used by the property could no be customized in the genwrapper.conf file - an array property can't insert a value - the std::map reflector (and indexedProperty in general) haven't remove method - about the help in wrapper ... why not ... solution : To use the function define by the I_Method, I add a MethodInfo variable in the I_Method0 macro old macro : #define I_Method0(ret, fn) (\ params.clear(),\ addMethod(new osgIntrospection::TypedMethodIn fo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params))) new macro : #define I_Method0(ret, fn, signature, briefHelp, detailedHelp) \ params.clear(); \ osgIntrospection::MethodInfo* signature = addMethod(new osgIntrospection::TypedMethodInfo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature) the osgIntrospection::MethodInfo* signature is used by the I_Property macro to define the MethodInfo that it use so for I_Property macro : old macro : #define I_PropertyWithReturnType(t, n, r) \ cap=addProperty(new osgIntrospection::PropertyInfo(osgIntrospection::Reflection::getType(typeid(reflected_type)), osgIntrospection::Reflection::getType(typeid(t)), #n, \ I_Method0(t, get##n), \ I_Method1(r, set##n, IN, t, value))) new macro: #define I_SimpleProperty(t, n, get, set) \ get, \ set)) The genwrapper has been modified in this way. The method signature is define by the prototype of the method For example, the "const char* libraryName();" have "__C5_char_P1__libraryName" for signature solution for secondary problem: The genwrapper accept new tokens in the configuration to custumize the property. The new PropertyInserter and the CustomPropertyInsertAttribute class has been defined The PropertyRemover has been added to the StdMapReflector The _briefHelp and _detailedHelp variable has been added in PropertyInfo, MethodInfo and ContructorInfo class modification: I have modify the genwrapper files Configuration.cpp Configuration.h add some tokens to custumize the property Doxyfile.template add the comment in the output xml genwrapper.conf customize some property in osg::Geometry RegistryBuilder.h RegistryBuilder.cpp add the process_help function (to extract help from xml) TypeRegister.cpp TypeRegister.h optimize the property detection TypeDesc.h TypeDesc.cpp modify FunctionDesc and PropertyDesc WrapperGenerator.h WrapperGenerator.cpp modify the output I also modify the fallowing osgIntrospection files: include/osgIntrospection/Attributes add the PropertyInserter and the CustomPropertyInsertAttribute class include/osgIntrospection/ConstructorInfo add the _briefHelp and _detailedHelp variable in the ConstructorInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/MethodInfo add the _briefHelp and _detailedHelp variable in the MethodInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/PropertyInfo add the _briefHelp and _detailedHelp variable in the PropertyInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/ReflectionMacro remove unused I_Property* macro modify all I_Method macro to accept the help string modify all I_Method macro to define a MethodInfo signature include/osgIntrospection/Reflector add the PropertyInserter in StdVectorReflector and StdListReflector add the PropertyRemover in the StdMapReflector include/osgIntrospection/StaticMethodInfo modify all StaticMethodInfo* to accept the help in parameter include/osgIntrospection/TypedMethodInfo modify all TypedMethodInfo* to accept the help in parameter include/osgIntrospection/TypedConstructorInfo modify all TypedConstructorInfo* to accept the help in parameter include/osgIntrospection/Type add the _briefHelp and _detailedHelp variable in the Type class "
2006-10-17 23:17:06 +08:00
D_MethodInfoType signature = addMethod(new osgIntrospection::StaticMethodInfo7<reflected_type, ret, P0, P1, P2, P3, P4, P5, P6>(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature)
#define I_StaticMethodWithDefaults8(ret, fn, A0, P0, N0, D0, A1, P1, N1, D1, A2, P2, N2, D2, A3, P3, N3, D3, A4, P4, N4, D4, A5, P5, N5, D5, A6, P6, N6, D6, A7, P7, N7, D7, signature, briefHelp, detailedHelp) \
params.clear(); \
params.push_back(new osgIntrospection::ParameterInfo(#N0, osgIntrospection::Reflection::getType(extended_typeid<P0>()), osgIntrospection::ParameterInfo::A0, osgIntrospection::Value(D0))); \
params.push_back(new osgIntrospection::ParameterInfo(#N1, osgIntrospection::Reflection::getType(extended_typeid<P1>()), osgIntrospection::ParameterInfo::A1, osgIntrospection::Value(D1))); \
params.push_back(new osgIntrospection::ParameterInfo(#N2, osgIntrospection::Reflection::getType(extended_typeid<P2>()), osgIntrospection::ParameterInfo::A2, osgIntrospection::Value(D2))); \
params.push_back(new osgIntrospection::ParameterInfo(#N3, osgIntrospection::Reflection::getType(extended_typeid<P3>()), osgIntrospection::ParameterInfo::A3, osgIntrospection::Value(D3))); \
params.push_back(new osgIntrospection::ParameterInfo(#N4, osgIntrospection::Reflection::getType(extended_typeid<P4>()), osgIntrospection::ParameterInfo::A4, osgIntrospection::Value(D4))); \
params.push_back(new osgIntrospection::ParameterInfo(#N5, osgIntrospection::Reflection::getType(extended_typeid<P5>()), osgIntrospection::ParameterInfo::A5, osgIntrospection::Value(D5))); \
params.push_back(new osgIntrospection::ParameterInfo(#N6, osgIntrospection::Reflection::getType(extended_typeid<P6>()), osgIntrospection::ParameterInfo::A6, osgIntrospection::Value(D6))); \
params.push_back(new osgIntrospection::ParameterInfo(#N7, osgIntrospection::Reflection::getType(extended_typeid<P7>()), osgIntrospection::ParameterInfo::A7, osgIntrospection::Value(D7))); \
From David Callu: " the main problem is the wrapper generation: The PropertyInfo class use MethodInfo class to access to the value. When the property are define with the I_Property* macro, the MethodInfo use by the property to have access to the value are instancied in the I_Property* macro, but there are already instantied by the I_Method* macro before secondary problem: - the function used by the property could no be customized in the genwrapper.conf file - an array property can't insert a value - the std::map reflector (and indexedProperty in general) haven't remove method - about the help in wrapper ... why not ... solution : To use the function define by the I_Method, I add a MethodInfo variable in the I_Method0 macro old macro : #define I_Method0(ret, fn) (\ params.clear(),\ addMethod(new osgIntrospection::TypedMethodIn fo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params))) new macro : #define I_Method0(ret, fn, signature, briefHelp, detailedHelp) \ params.clear(); \ osgIntrospection::MethodInfo* signature = addMethod(new osgIntrospection::TypedMethodInfo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature) the osgIntrospection::MethodInfo* signature is used by the I_Property macro to define the MethodInfo that it use so for I_Property macro : old macro : #define I_PropertyWithReturnType(t, n, r) \ cap=addProperty(new osgIntrospection::PropertyInfo(osgIntrospection::Reflection::getType(typeid(reflected_type)), osgIntrospection::Reflection::getType(typeid(t)), #n, \ I_Method0(t, get##n), \ I_Method1(r, set##n, IN, t, value))) new macro: #define I_SimpleProperty(t, n, get, set) \ get, \ set)) The genwrapper has been modified in this way. The method signature is define by the prototype of the method For example, the "const char* libraryName();" have "__C5_char_P1__libraryName" for signature solution for secondary problem: The genwrapper accept new tokens in the configuration to custumize the property. The new PropertyInserter and the CustomPropertyInsertAttribute class has been defined The PropertyRemover has been added to the StdMapReflector The _briefHelp and _detailedHelp variable has been added in PropertyInfo, MethodInfo and ContructorInfo class modification: I have modify the genwrapper files Configuration.cpp Configuration.h add some tokens to custumize the property Doxyfile.template add the comment in the output xml genwrapper.conf customize some property in osg::Geometry RegistryBuilder.h RegistryBuilder.cpp add the process_help function (to extract help from xml) TypeRegister.cpp TypeRegister.h optimize the property detection TypeDesc.h TypeDesc.cpp modify FunctionDesc and PropertyDesc WrapperGenerator.h WrapperGenerator.cpp modify the output I also modify the fallowing osgIntrospection files: include/osgIntrospection/Attributes add the PropertyInserter and the CustomPropertyInsertAttribute class include/osgIntrospection/ConstructorInfo add the _briefHelp and _detailedHelp variable in the ConstructorInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/MethodInfo add the _briefHelp and _detailedHelp variable in the MethodInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/PropertyInfo add the _briefHelp and _detailedHelp variable in the PropertyInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/ReflectionMacro remove unused I_Property* macro modify all I_Method macro to accept the help string modify all I_Method macro to define a MethodInfo signature include/osgIntrospection/Reflector add the PropertyInserter in StdVectorReflector and StdListReflector add the PropertyRemover in the StdMapReflector include/osgIntrospection/StaticMethodInfo modify all StaticMethodInfo* to accept the help in parameter include/osgIntrospection/TypedMethodInfo modify all TypedMethodInfo* to accept the help in parameter include/osgIntrospection/TypedConstructorInfo modify all TypedConstructorInfo* to accept the help in parameter include/osgIntrospection/Type add the _briefHelp and _detailedHelp variable in the Type class "
2006-10-17 23:17:06 +08:00
D_MethodInfoType signature = addMethod(new osgIntrospection::StaticMethodInfo8<reflected_type, ret, P0, P1, P2, P3, P4, P5, P6, P7>(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature)
#define I_StaticMethodWithDefaults9(ret, fn, A0, P0, N0, D0, A1, P1, N1, D1, A2, P2, N2, D2, A3, P3, N3, D3, A4, P4, N4, D4, A5, P5, N5, D5, A6, P6, N6, D6, A7, P7, N7, D7, A8, P8, N8, D8, signature, briefHelp, detailedHelp) \
params.clear(); \
params.push_back(new osgIntrospection::ParameterInfo(#N0, osgIntrospection::Reflection::getType(extended_typeid<P0>()), osgIntrospection::ParameterInfo::A0, osgIntrospection::Value(D0))); \
params.push_back(new osgIntrospection::ParameterInfo(#N1, osgIntrospection::Reflection::getType(extended_typeid<P1>()), osgIntrospection::ParameterInfo::A1, osgIntrospection::Value(D1))); \
params.push_back(new osgIntrospection::ParameterInfo(#N2, osgIntrospection::Reflection::getType(extended_typeid<P2>()), osgIntrospection::ParameterInfo::A2, osgIntrospection::Value(D2))); \
params.push_back(new osgIntrospection::ParameterInfo(#N3, osgIntrospection::Reflection::getType(extended_typeid<P3>()), osgIntrospection::ParameterInfo::A3, osgIntrospection::Value(D3))); \
params.push_back(new osgIntrospection::ParameterInfo(#N4, osgIntrospection::Reflection::getType(extended_typeid<P4>()), osgIntrospection::ParameterInfo::A4, osgIntrospection::Value(D4))); \
params.push_back(new osgIntrospection::ParameterInfo(#N5, osgIntrospection::Reflection::getType(extended_typeid<P5>()), osgIntrospection::ParameterInfo::A5, osgIntrospection::Value(D5))); \
params.push_back(new osgIntrospection::ParameterInfo(#N6, osgIntrospection::Reflection::getType(extended_typeid<P6>()), osgIntrospection::ParameterInfo::A6, osgIntrospection::Value(D6))); \
params.push_back(new osgIntrospection::ParameterInfo(#N7, osgIntrospection::Reflection::getType(extended_typeid<P7>()), osgIntrospection::ParameterInfo::A7, osgIntrospection::Value(D7))); \
params.push_back(new osgIntrospection::ParameterInfo(#N8, osgIntrospection::Reflection::getType(extended_typeid<P8>()), osgIntrospection::ParameterInfo::A8, osgIntrospection::Value(D8))); \
From David Callu: " the main problem is the wrapper generation: The PropertyInfo class use MethodInfo class to access to the value. When the property are define with the I_Property* macro, the MethodInfo use by the property to have access to the value are instancied in the I_Property* macro, but there are already instantied by the I_Method* macro before secondary problem: - the function used by the property could no be customized in the genwrapper.conf file - an array property can't insert a value - the std::map reflector (and indexedProperty in general) haven't remove method - about the help in wrapper ... why not ... solution : To use the function define by the I_Method, I add a MethodInfo variable in the I_Method0 macro old macro : #define I_Method0(ret, fn) (\ params.clear(),\ addMethod(new osgIntrospection::TypedMethodIn fo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params))) new macro : #define I_Method0(ret, fn, signature, briefHelp, detailedHelp) \ params.clear(); \ osgIntrospection::MethodInfo* signature = addMethod(new osgIntrospection::TypedMethodInfo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature) the osgIntrospection::MethodInfo* signature is used by the I_Property macro to define the MethodInfo that it use so for I_Property macro : old macro : #define I_PropertyWithReturnType(t, n, r) \ cap=addProperty(new osgIntrospection::PropertyInfo(osgIntrospection::Reflection::getType(typeid(reflected_type)), osgIntrospection::Reflection::getType(typeid(t)), #n, \ I_Method0(t, get##n), \ I_Method1(r, set##n, IN, t, value))) new macro: #define I_SimpleProperty(t, n, get, set) \ get, \ set)) The genwrapper has been modified in this way. The method signature is define by the prototype of the method For example, the "const char* libraryName();" have "__C5_char_P1__libraryName" for signature solution for secondary problem: The genwrapper accept new tokens in the configuration to custumize the property. The new PropertyInserter and the CustomPropertyInsertAttribute class has been defined The PropertyRemover has been added to the StdMapReflector The _briefHelp and _detailedHelp variable has been added in PropertyInfo, MethodInfo and ContructorInfo class modification: I have modify the genwrapper files Configuration.cpp Configuration.h add some tokens to custumize the property Doxyfile.template add the comment in the output xml genwrapper.conf customize some property in osg::Geometry RegistryBuilder.h RegistryBuilder.cpp add the process_help function (to extract help from xml) TypeRegister.cpp TypeRegister.h optimize the property detection TypeDesc.h TypeDesc.cpp modify FunctionDesc and PropertyDesc WrapperGenerator.h WrapperGenerator.cpp modify the output I also modify the fallowing osgIntrospection files: include/osgIntrospection/Attributes add the PropertyInserter and the CustomPropertyInsertAttribute class include/osgIntrospection/ConstructorInfo add the _briefHelp and _detailedHelp variable in the ConstructorInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/MethodInfo add the _briefHelp and _detailedHelp variable in the MethodInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/PropertyInfo add the _briefHelp and _detailedHelp variable in the PropertyInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/ReflectionMacro remove unused I_Property* macro modify all I_Method macro to accept the help string modify all I_Method macro to define a MethodInfo signature include/osgIntrospection/Reflector add the PropertyInserter in StdVectorReflector and StdListReflector add the PropertyRemover in the StdMapReflector include/osgIntrospection/StaticMethodInfo modify all StaticMethodInfo* to accept the help in parameter include/osgIntrospection/TypedMethodInfo modify all TypedMethodInfo* to accept the help in parameter include/osgIntrospection/TypedConstructorInfo modify all TypedConstructorInfo* to accept the help in parameter include/osgIntrospection/Type add the _briefHelp and _detailedHelp variable in the Type class "
2006-10-17 23:17:06 +08:00
D_MethodInfoType signature = addMethod(new osgIntrospection::StaticMethodInfo9<reflected_type, ret, P0, P1, P2, P3, P4, P5, P6, P7, P8>(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature)
#define I_StaticMethodWithDefaults10(ret, fn, A0, P0, N0, D0, A1, P1, N1, D1, A2, P2, N2, D2, A3, P3, N3, D3, A4, P4, N4, D4, A5, P5, N5, D5, A6, P6, N6, D6, A7, P7, N7, D7, A8, P8, N8, D8, A9, P9, N9, D9, signature, briefHelp, detailedHelp) \
params.clear(); \
params.push_back(new osgIntrospection::ParameterInfo(#N0, osgIntrospection::Reflection::getType(extended_typeid<P0>()), osgIntrospection::ParameterInfo::A0, osgIntrospection::Value(D0))); \
params.push_back(new osgIntrospection::ParameterInfo(#N1, osgIntrospection::Reflection::getType(extended_typeid<P1>()), osgIntrospection::ParameterInfo::A1, osgIntrospection::Value(D1))); \
params.push_back(new osgIntrospection::ParameterInfo(#N2, osgIntrospection::Reflection::getType(extended_typeid<P2>()), osgIntrospection::ParameterInfo::A2, osgIntrospection::Value(D2))); \
params.push_back(new osgIntrospection::ParameterInfo(#N3, osgIntrospection::Reflection::getType(extended_typeid<P3>()), osgIntrospection::ParameterInfo::A3, osgIntrospection::Value(D3))); \
params.push_back(new osgIntrospection::ParameterInfo(#N4, osgIntrospection::Reflection::getType(extended_typeid<P4>()), osgIntrospection::ParameterInfo::A4, osgIntrospection::Value(D4))); \
params.push_back(new osgIntrospection::ParameterInfo(#N5, osgIntrospection::Reflection::getType(extended_typeid<P5>()), osgIntrospection::ParameterInfo::A5, osgIntrospection::Value(D5))); \
params.push_back(new osgIntrospection::ParameterInfo(#N6, osgIntrospection::Reflection::getType(extended_typeid<P6>()), osgIntrospection::ParameterInfo::A6, osgIntrospection::Value(D6))); \
params.push_back(new osgIntrospection::ParameterInfo(#N7, osgIntrospection::Reflection::getType(extended_typeid<P7>()), osgIntrospection::ParameterInfo::A7, osgIntrospection::Value(D7))); \
params.push_back(new osgIntrospection::ParameterInfo(#N8, osgIntrospection::Reflection::getType(extended_typeid<P8>()), osgIntrospection::ParameterInfo::A8, osgIntrospection::Value(D8))); \
params.push_back(new osgIntrospection::ParameterInfo(#N9, osgIntrospection::Reflection::getType(extended_typeid<P9>()), osgIntrospection::ParameterInfo::A9, osgIntrospection::Value(D9))); \
From David Callu: " the main problem is the wrapper generation: The PropertyInfo class use MethodInfo class to access to the value. When the property are define with the I_Property* macro, the MethodInfo use by the property to have access to the value are instancied in the I_Property* macro, but there are already instantied by the I_Method* macro before secondary problem: - the function used by the property could no be customized in the genwrapper.conf file - an array property can't insert a value - the std::map reflector (and indexedProperty in general) haven't remove method - about the help in wrapper ... why not ... solution : To use the function define by the I_Method, I add a MethodInfo variable in the I_Method0 macro old macro : #define I_Method0(ret, fn) (\ params.clear(),\ addMethod(new osgIntrospection::TypedMethodIn fo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params))) new macro : #define I_Method0(ret, fn, signature, briefHelp, detailedHelp) \ params.clear(); \ osgIntrospection::MethodInfo* signature = addMethod(new osgIntrospection::TypedMethodInfo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature) the osgIntrospection::MethodInfo* signature is used by the I_Property macro to define the MethodInfo that it use so for I_Property macro : old macro : #define I_PropertyWithReturnType(t, n, r) \ cap=addProperty(new osgIntrospection::PropertyInfo(osgIntrospection::Reflection::getType(typeid(reflected_type)), osgIntrospection::Reflection::getType(typeid(t)), #n, \ I_Method0(t, get##n), \ I_Method1(r, set##n, IN, t, value))) new macro: #define I_SimpleProperty(t, n, get, set) \ get, \ set)) The genwrapper has been modified in this way. The method signature is define by the prototype of the method For example, the "const char* libraryName();" have "__C5_char_P1__libraryName" for signature solution for secondary problem: The genwrapper accept new tokens in the configuration to custumize the property. The new PropertyInserter and the CustomPropertyInsertAttribute class has been defined The PropertyRemover has been added to the StdMapReflector The _briefHelp and _detailedHelp variable has been added in PropertyInfo, MethodInfo and ContructorInfo class modification: I have modify the genwrapper files Configuration.cpp Configuration.h add some tokens to custumize the property Doxyfile.template add the comment in the output xml genwrapper.conf customize some property in osg::Geometry RegistryBuilder.h RegistryBuilder.cpp add the process_help function (to extract help from xml) TypeRegister.cpp TypeRegister.h optimize the property detection TypeDesc.h TypeDesc.cpp modify FunctionDesc and PropertyDesc WrapperGenerator.h WrapperGenerator.cpp modify the output I also modify the fallowing osgIntrospection files: include/osgIntrospection/Attributes add the PropertyInserter and the CustomPropertyInsertAttribute class include/osgIntrospection/ConstructorInfo add the _briefHelp and _detailedHelp variable in the ConstructorInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/MethodInfo add the _briefHelp and _detailedHelp variable in the MethodInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/PropertyInfo add the _briefHelp and _detailedHelp variable in the PropertyInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/ReflectionMacro remove unused I_Property* macro modify all I_Method macro to accept the help string modify all I_Method macro to define a MethodInfo signature include/osgIntrospection/Reflector add the PropertyInserter in StdVectorReflector and StdListReflector add the PropertyRemover in the StdMapReflector include/osgIntrospection/StaticMethodInfo modify all StaticMethodInfo* to accept the help in parameter include/osgIntrospection/TypedMethodInfo modify all TypedMethodInfo* to accept the help in parameter include/osgIntrospection/TypedConstructorInfo modify all TypedConstructorInfo* to accept the help in parameter include/osgIntrospection/Type add the _briefHelp and _detailedHelp variable in the Type class "
2006-10-17 23:17:06 +08:00
D_MethodInfoType signature = addMethod(new osgIntrospection::StaticMethodInfo10<reflected_type, ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9>(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature)
#define I_StaticMethodWithDefaults11(ret, fn, A0, P0, N0, D0, A1, P1, N1, D1, A2, P2, N2, D2, A3, P3, N3, D3, A4, P4, N4, D4, A5, P5, N5, D5, A6, P6, N6, D6, A7, P7, N7, D7, A8, P8, N8, D8, A9, P9, N9, D9, A10, P10, N10, D10, signature, briefHelp, detailedHelp) \
params.clear(); \
params.push_back(new osgIntrospection::ParameterInfo(#N0, osgIntrospection::Reflection::getType(extended_typeid<P0>()), osgIntrospection::ParameterInfo::A0, osgIntrospection::Value(D0))); \
params.push_back(new osgIntrospection::ParameterInfo(#N1, osgIntrospection::Reflection::getType(extended_typeid<P1>()), osgIntrospection::ParameterInfo::A1, osgIntrospection::Value(D1))); \
params.push_back(new osgIntrospection::ParameterInfo(#N2, osgIntrospection::Reflection::getType(extended_typeid<P2>()), osgIntrospection::ParameterInfo::A2, osgIntrospection::Value(D2))); \
params.push_back(new osgIntrospection::ParameterInfo(#N3, osgIntrospection::Reflection::getType(extended_typeid<P3>()), osgIntrospection::ParameterInfo::A3, osgIntrospection::Value(D3))); \
params.push_back(new osgIntrospection::ParameterInfo(#N4, osgIntrospection::Reflection::getType(extended_typeid<P4>()), osgIntrospection::ParameterInfo::A4, osgIntrospection::Value(D4))); \
params.push_back(new osgIntrospection::ParameterInfo(#N5, osgIntrospection::Reflection::getType(extended_typeid<P5>()), osgIntrospection::ParameterInfo::A5, osgIntrospection::Value(D5))); \
params.push_back(new osgIntrospection::ParameterInfo(#N6, osgIntrospection::Reflection::getType(extended_typeid<P6>()), osgIntrospection::ParameterInfo::A6, osgIntrospection::Value(D6))); \
params.push_back(new osgIntrospection::ParameterInfo(#N7, osgIntrospection::Reflection::getType(extended_typeid<P7>()), osgIntrospection::ParameterInfo::A7, osgIntrospection::Value(D7))); \
params.push_back(new osgIntrospection::ParameterInfo(#N8, osgIntrospection::Reflection::getType(extended_typeid<P8>()), osgIntrospection::ParameterInfo::A8, osgIntrospection::Value(D8))); \
params.push_back(new osgIntrospection::ParameterInfo(#N9, osgIntrospection::Reflection::getType(extended_typeid<P9>()), osgIntrospection::ParameterInfo::A9, osgIntrospection::Value(D9))); \
params.push_back(new osgIntrospection::ParameterInfo(#N10, osgIntrospection::Reflection::getType(extended_typeid<P10>()), osgIntrospection::ParameterInfo::A10, osgIntrospection::Value(D10))); \
From David Callu: " the main problem is the wrapper generation: The PropertyInfo class use MethodInfo class to access to the value. When the property are define with the I_Property* macro, the MethodInfo use by the property to have access to the value are instancied in the I_Property* macro, but there are already instantied by the I_Method* macro before secondary problem: - the function used by the property could no be customized in the genwrapper.conf file - an array property can't insert a value - the std::map reflector (and indexedProperty in general) haven't remove method - about the help in wrapper ... why not ... solution : To use the function define by the I_Method, I add a MethodInfo variable in the I_Method0 macro old macro : #define I_Method0(ret, fn) (\ params.clear(),\ addMethod(new osgIntrospection::TypedMethodIn fo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params))) new macro : #define I_Method0(ret, fn, signature, briefHelp, detailedHelp) \ params.clear(); \ osgIntrospection::MethodInfo* signature = addMethod(new osgIntrospection::TypedMethodInfo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature) the osgIntrospection::MethodInfo* signature is used by the I_Property macro to define the MethodInfo that it use so for I_Property macro : old macro : #define I_PropertyWithReturnType(t, n, r) \ cap=addProperty(new osgIntrospection::PropertyInfo(osgIntrospection::Reflection::getType(typeid(reflected_type)), osgIntrospection::Reflection::getType(typeid(t)), #n, \ I_Method0(t, get##n), \ I_Method1(r, set##n, IN, t, value))) new macro: #define I_SimpleProperty(t, n, get, set) \ get, \ set)) The genwrapper has been modified in this way. The method signature is define by the prototype of the method For example, the "const char* libraryName();" have "__C5_char_P1__libraryName" for signature solution for secondary problem: The genwrapper accept new tokens in the configuration to custumize the property. The new PropertyInserter and the CustomPropertyInsertAttribute class has been defined The PropertyRemover has been added to the StdMapReflector The _briefHelp and _detailedHelp variable has been added in PropertyInfo, MethodInfo and ContructorInfo class modification: I have modify the genwrapper files Configuration.cpp Configuration.h add some tokens to custumize the property Doxyfile.template add the comment in the output xml genwrapper.conf customize some property in osg::Geometry RegistryBuilder.h RegistryBuilder.cpp add the process_help function (to extract help from xml) TypeRegister.cpp TypeRegister.h optimize the property detection TypeDesc.h TypeDesc.cpp modify FunctionDesc and PropertyDesc WrapperGenerator.h WrapperGenerator.cpp modify the output I also modify the fallowing osgIntrospection files: include/osgIntrospection/Attributes add the PropertyInserter and the CustomPropertyInsertAttribute class include/osgIntrospection/ConstructorInfo add the _briefHelp and _detailedHelp variable in the ConstructorInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/MethodInfo add the _briefHelp and _detailedHelp variable in the MethodInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/PropertyInfo add the _briefHelp and _detailedHelp variable in the PropertyInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/ReflectionMacro remove unused I_Property* macro modify all I_Method macro to accept the help string modify all I_Method macro to define a MethodInfo signature include/osgIntrospection/Reflector add the PropertyInserter in StdVectorReflector and StdListReflector add the PropertyRemover in the StdMapReflector include/osgIntrospection/StaticMethodInfo modify all StaticMethodInfo* to accept the help in parameter include/osgIntrospection/TypedMethodInfo modify all TypedMethodInfo* to accept the help in parameter include/osgIntrospection/TypedConstructorInfo modify all TypedConstructorInfo* to accept the help in parameter include/osgIntrospection/Type add the _briefHelp and _detailedHelp variable in the Type class "
2006-10-17 23:17:06 +08:00
D_MethodInfoType signature = addMethod(new osgIntrospection::StaticMethodInfo11<reflected_type, ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10>(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature)
#define I_StaticMethodWithDefaults12(ret, fn, A0, P0, N0, D0, A1, P1, N1, D1, A2, P2, N2, D2, A3, P3, N3, D3, A4, P4, N4, D4, A5, P5, N5, D5, A6, P6, N6, D6, A7, P7, N7, D7, A8, P8, N8, D8, A9, P9, N9, D9, A10, P10, N10, D10, A11, P11, N11, D11, signature, briefHelp, detailedHelp) \
params.clear(); \
params.push_back(new osgIntrospection::ParameterInfo(#N0, osgIntrospection::Reflection::getType(extended_typeid<P0>()), osgIntrospection::ParameterInfo::A0, osgIntrospection::Value(D0))); \
params.push_back(new osgIntrospection::ParameterInfo(#N1, osgIntrospection::Reflection::getType(extended_typeid<P1>()), osgIntrospection::ParameterInfo::A1, osgIntrospection::Value(D1))); \
params.push_back(new osgIntrospection::ParameterInfo(#N2, osgIntrospection::Reflection::getType(extended_typeid<P2>()), osgIntrospection::ParameterInfo::A2, osgIntrospection::Value(D2))); \
params.push_back(new osgIntrospection::ParameterInfo(#N3, osgIntrospection::Reflection::getType(extended_typeid<P3>()), osgIntrospection::ParameterInfo::A3, osgIntrospection::Value(D3))); \
params.push_back(new osgIntrospection::ParameterInfo(#N4, osgIntrospection::Reflection::getType(extended_typeid<P4>()), osgIntrospection::ParameterInfo::A4, osgIntrospection::Value(D4))); \
params.push_back(new osgIntrospection::ParameterInfo(#N5, osgIntrospection::Reflection::getType(extended_typeid<P5>()), osgIntrospection::ParameterInfo::A5, osgIntrospection::Value(D5))); \
params.push_back(new osgIntrospection::ParameterInfo(#N6, osgIntrospection::Reflection::getType(extended_typeid<P6>()), osgIntrospection::ParameterInfo::A6, osgIntrospection::Value(D6))); \
params.push_back(new osgIntrospection::ParameterInfo(#N7, osgIntrospection::Reflection::getType(extended_typeid<P7>()), osgIntrospection::ParameterInfo::A7, osgIntrospection::Value(D7))); \
params.push_back(new osgIntrospection::ParameterInfo(#N8, osgIntrospection::Reflection::getType(extended_typeid<P8>()), osgIntrospection::ParameterInfo::A8, osgIntrospection::Value(D8))); \
params.push_back(new osgIntrospection::ParameterInfo(#N9, osgIntrospection::Reflection::getType(extended_typeid<P9>()), osgIntrospection::ParameterInfo::A9, osgIntrospection::Value(D9))); \
params.push_back(new osgIntrospection::ParameterInfo(#N10, osgIntrospection::Reflection::getType(extended_typeid<P10>()), osgIntrospection::ParameterInfo::A10, osgIntrospection::Value(D10))); \
params.push_back(new osgIntrospection::ParameterInfo(#N11, osgIntrospection::Reflection::getType(extended_typeid<P11>()), osgIntrospection::ParameterInfo::A11, osgIntrospection::Value(D11))); \
From David Callu: " the main problem is the wrapper generation: The PropertyInfo class use MethodInfo class to access to the value. When the property are define with the I_Property* macro, the MethodInfo use by the property to have access to the value are instancied in the I_Property* macro, but there are already instantied by the I_Method* macro before secondary problem: - the function used by the property could no be customized in the genwrapper.conf file - an array property can't insert a value - the std::map reflector (and indexedProperty in general) haven't remove method - about the help in wrapper ... why not ... solution : To use the function define by the I_Method, I add a MethodInfo variable in the I_Method0 macro old macro : #define I_Method0(ret, fn) (\ params.clear(),\ addMethod(new osgIntrospection::TypedMethodIn fo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params))) new macro : #define I_Method0(ret, fn, signature, briefHelp, detailedHelp) \ params.clear(); \ osgIntrospection::MethodInfo* signature = addMethod(new osgIntrospection::TypedMethodInfo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature) the osgIntrospection::MethodInfo* signature is used by the I_Property macro to define the MethodInfo that it use so for I_Property macro : old macro : #define I_PropertyWithReturnType(t, n, r) \ cap=addProperty(new osgIntrospection::PropertyInfo(osgIntrospection::Reflection::getType(typeid(reflected_type)), osgIntrospection::Reflection::getType(typeid(t)), #n, \ I_Method0(t, get##n), \ I_Method1(r, set##n, IN, t, value))) new macro: #define I_SimpleProperty(t, n, get, set) \ get, \ set)) The genwrapper has been modified in this way. The method signature is define by the prototype of the method For example, the "const char* libraryName();" have "__C5_char_P1__libraryName" for signature solution for secondary problem: The genwrapper accept new tokens in the configuration to custumize the property. The new PropertyInserter and the CustomPropertyInsertAttribute class has been defined The PropertyRemover has been added to the StdMapReflector The _briefHelp and _detailedHelp variable has been added in PropertyInfo, MethodInfo and ContructorInfo class modification: I have modify the genwrapper files Configuration.cpp Configuration.h add some tokens to custumize the property Doxyfile.template add the comment in the output xml genwrapper.conf customize some property in osg::Geometry RegistryBuilder.h RegistryBuilder.cpp add the process_help function (to extract help from xml) TypeRegister.cpp TypeRegister.h optimize the property detection TypeDesc.h TypeDesc.cpp modify FunctionDesc and PropertyDesc WrapperGenerator.h WrapperGenerator.cpp modify the output I also modify the fallowing osgIntrospection files: include/osgIntrospection/Attributes add the PropertyInserter and the CustomPropertyInsertAttribute class include/osgIntrospection/ConstructorInfo add the _briefHelp and _detailedHelp variable in the ConstructorInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/MethodInfo add the _briefHelp and _detailedHelp variable in the MethodInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/PropertyInfo add the _briefHelp and _detailedHelp variable in the PropertyInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/ReflectionMacro remove unused I_Property* macro modify all I_Method macro to accept the help string modify all I_Method macro to define a MethodInfo signature include/osgIntrospection/Reflector add the PropertyInserter in StdVectorReflector and StdListReflector add the PropertyRemover in the StdMapReflector include/osgIntrospection/StaticMethodInfo modify all StaticMethodInfo* to accept the help in parameter include/osgIntrospection/TypedMethodInfo modify all TypedMethodInfo* to accept the help in parameter include/osgIntrospection/TypedConstructorInfo modify all TypedConstructorInfo* to accept the help in parameter include/osgIntrospection/Type add the _briefHelp and _detailedHelp variable in the Type class "
2006-10-17 23:17:06 +08:00
D_MethodInfoType signature = addMethod(new osgIntrospection::StaticMethodInfo12<reflected_type, ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11>(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature)
#define I_StaticMethodWithDefaults13(ret, fn, A0, P0, N0, D0, A1, P1, N1, D1, A2, P2, N2, D2, A3, P3, N3, D3, A4, P4, N4, D4, A5, P5, N5, D5, A6, P6, N6, D6, A7, P7, N7, D7, A8, P8, N8, D8, A9, P9, N9, D9, A10, P10, N10, D10, A11, P11, N11, D11, A12, P12, N12, D12, signature, briefHelp, detailedHelp) \
params.clear(); \
params.push_back(new osgIntrospection::ParameterInfo(#N0, osgIntrospection::Reflection::getType(extended_typeid<P0>()), osgIntrospection::ParameterInfo::A0, osgIntrospection::Value(D0))); \
params.push_back(new osgIntrospection::ParameterInfo(#N1, osgIntrospection::Reflection::getType(extended_typeid<P1>()), osgIntrospection::ParameterInfo::A1, osgIntrospection::Value(D1))); \
params.push_back(new osgIntrospection::ParameterInfo(#N2, osgIntrospection::Reflection::getType(extended_typeid<P2>()), osgIntrospection::ParameterInfo::A2, osgIntrospection::Value(D2))); \
params.push_back(new osgIntrospection::ParameterInfo(#N3, osgIntrospection::Reflection::getType(extended_typeid<P3>()), osgIntrospection::ParameterInfo::A3, osgIntrospection::Value(D3))); \
params.push_back(new osgIntrospection::ParameterInfo(#N4, osgIntrospection::Reflection::getType(extended_typeid<P4>()), osgIntrospection::ParameterInfo::A4, osgIntrospection::Value(D4))); \
params.push_back(new osgIntrospection::ParameterInfo(#N5, osgIntrospection::Reflection::getType(extended_typeid<P5>()), osgIntrospection::ParameterInfo::A5, osgIntrospection::Value(D5))); \
params.push_back(new osgIntrospection::ParameterInfo(#N6, osgIntrospection::Reflection::getType(extended_typeid<P6>()), osgIntrospection::ParameterInfo::A6, osgIntrospection::Value(D6))); \
params.push_back(new osgIntrospection::ParameterInfo(#N7, osgIntrospection::Reflection::getType(extended_typeid<P7>()), osgIntrospection::ParameterInfo::A7, osgIntrospection::Value(D7))); \
params.push_back(new osgIntrospection::ParameterInfo(#N8, osgIntrospection::Reflection::getType(extended_typeid<P8>()), osgIntrospection::ParameterInfo::A8, osgIntrospection::Value(D8))); \
params.push_back(new osgIntrospection::ParameterInfo(#N9, osgIntrospection::Reflection::getType(extended_typeid<P9>()), osgIntrospection::ParameterInfo::A9, osgIntrospection::Value(D9))); \
params.push_back(new osgIntrospection::ParameterInfo(#N10, osgIntrospection::Reflection::getType(extended_typeid<P10>()), osgIntrospection::ParameterInfo::A10, osgIntrospection::Value(D10))); \
params.push_back(new osgIntrospection::ParameterInfo(#N11, osgIntrospection::Reflection::getType(extended_typeid<P11>()), osgIntrospection::ParameterInfo::A11, osgIntrospection::Value(D11))); \
params.push_back(new osgIntrospection::ParameterInfo(#N12, osgIntrospection::Reflection::getType(extended_typeid<P12>()), osgIntrospection::ParameterInfo::A12, osgIntrospection::Value(D12))); \
From David Callu: " the main problem is the wrapper generation: The PropertyInfo class use MethodInfo class to access to the value. When the property are define with the I_Property* macro, the MethodInfo use by the property to have access to the value are instancied in the I_Property* macro, but there are already instantied by the I_Method* macro before secondary problem: - the function used by the property could no be customized in the genwrapper.conf file - an array property can't insert a value - the std::map reflector (and indexedProperty in general) haven't remove method - about the help in wrapper ... why not ... solution : To use the function define by the I_Method, I add a MethodInfo variable in the I_Method0 macro old macro : #define I_Method0(ret, fn) (\ params.clear(),\ addMethod(new osgIntrospection::TypedMethodIn fo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params))) new macro : #define I_Method0(ret, fn, signature, briefHelp, detailedHelp) \ params.clear(); \ osgIntrospection::MethodInfo* signature = addMethod(new osgIntrospection::TypedMethodInfo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature) the osgIntrospection::MethodInfo* signature is used by the I_Property macro to define the MethodInfo that it use so for I_Property macro : old macro : #define I_PropertyWithReturnType(t, n, r) \ cap=addProperty(new osgIntrospection::PropertyInfo(osgIntrospection::Reflection::getType(typeid(reflected_type)), osgIntrospection::Reflection::getType(typeid(t)), #n, \ I_Method0(t, get##n), \ I_Method1(r, set##n, IN, t, value))) new macro: #define I_SimpleProperty(t, n, get, set) \ get, \ set)) The genwrapper has been modified in this way. The method signature is define by the prototype of the method For example, the "const char* libraryName();" have "__C5_char_P1__libraryName" for signature solution for secondary problem: The genwrapper accept new tokens in the configuration to custumize the property. The new PropertyInserter and the CustomPropertyInsertAttribute class has been defined The PropertyRemover has been added to the StdMapReflector The _briefHelp and _detailedHelp variable has been added in PropertyInfo, MethodInfo and ContructorInfo class modification: I have modify the genwrapper files Configuration.cpp Configuration.h add some tokens to custumize the property Doxyfile.template add the comment in the output xml genwrapper.conf customize some property in osg::Geometry RegistryBuilder.h RegistryBuilder.cpp add the process_help function (to extract help from xml) TypeRegister.cpp TypeRegister.h optimize the property detection TypeDesc.h TypeDesc.cpp modify FunctionDesc and PropertyDesc WrapperGenerator.h WrapperGenerator.cpp modify the output I also modify the fallowing osgIntrospection files: include/osgIntrospection/Attributes add the PropertyInserter and the CustomPropertyInsertAttribute class include/osgIntrospection/ConstructorInfo add the _briefHelp and _detailedHelp variable in the ConstructorInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/MethodInfo add the _briefHelp and _detailedHelp variable in the MethodInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/PropertyInfo add the _briefHelp and _detailedHelp variable in the PropertyInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/ReflectionMacro remove unused I_Property* macro modify all I_Method macro to accept the help string modify all I_Method macro to define a MethodInfo signature include/osgIntrospection/Reflector add the PropertyInserter in StdVectorReflector and StdListReflector add the PropertyRemover in the StdMapReflector include/osgIntrospection/StaticMethodInfo modify all StaticMethodInfo* to accept the help in parameter include/osgIntrospection/TypedMethodInfo modify all TypedMethodInfo* to accept the help in parameter include/osgIntrospection/TypedConstructorInfo modify all TypedConstructorInfo* to accept the help in parameter include/osgIntrospection/Type add the _briefHelp and _detailedHelp variable in the Type class "
2006-10-17 23:17:06 +08:00
D_MethodInfoType signature = addMethod(new osgIntrospection::StaticMethodInfo13<reflected_type, ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12>(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature)
#define I_StaticMethodWithDefaults14(ret, fn, A0, P0, N0, D0, A1, P1, N1, D1, A2, P2, N2, D2, A3, P3, N3, D3, A4, P4, N4, D4, A5, P5, N5, D5, A6, P6, N6, D6, A7, P7, N7, D7, A8, P8, N8, D8, A9, P9, N9, D9, A10, P10, N10, D10, A11, P11, N11, D11, A12, P12, N12, D12, A13, P13, N13, D13, signature, briefHelp, detailedHelp) \
params.clear(); \
params.push_back(new osgIntrospection::ParameterInfo(#N0, osgIntrospection::Reflection::getType(extended_typeid<P0>()), osgIntrospection::ParameterInfo::A0, osgIntrospection::Value(D0))); \
params.push_back(new osgIntrospection::ParameterInfo(#N1, osgIntrospection::Reflection::getType(extended_typeid<P1>()), osgIntrospection::ParameterInfo::A1, osgIntrospection::Value(D1))); \
params.push_back(new osgIntrospection::ParameterInfo(#N2, osgIntrospection::Reflection::getType(extended_typeid<P2>()), osgIntrospection::ParameterInfo::A2, osgIntrospection::Value(D2))); \
params.push_back(new osgIntrospection::ParameterInfo(#N3, osgIntrospection::Reflection::getType(extended_typeid<P3>()), osgIntrospection::ParameterInfo::A3, osgIntrospection::Value(D3))); \
params.push_back(new osgIntrospection::ParameterInfo(#N4, osgIntrospection::Reflection::getType(extended_typeid<P4>()), osgIntrospection::ParameterInfo::A4, osgIntrospection::Value(D4))); \
params.push_back(new osgIntrospection::ParameterInfo(#N5, osgIntrospection::Reflection::getType(extended_typeid<P5>()), osgIntrospection::ParameterInfo::A5, osgIntrospection::Value(D5))); \
params.push_back(new osgIntrospection::ParameterInfo(#N6, osgIntrospection::Reflection::getType(extended_typeid<P6>()), osgIntrospection::ParameterInfo::A6, osgIntrospection::Value(D6))); \
params.push_back(new osgIntrospection::ParameterInfo(#N7, osgIntrospection::Reflection::getType(extended_typeid<P7>()), osgIntrospection::ParameterInfo::A7, osgIntrospection::Value(D7))); \
params.push_back(new osgIntrospection::ParameterInfo(#N8, osgIntrospection::Reflection::getType(extended_typeid<P8>()), osgIntrospection::ParameterInfo::A8, osgIntrospection::Value(D8))); \
params.push_back(new osgIntrospection::ParameterInfo(#N9, osgIntrospection::Reflection::getType(extended_typeid<P9>()), osgIntrospection::ParameterInfo::A9, osgIntrospection::Value(D9))); \
params.push_back(new osgIntrospection::ParameterInfo(#N10, osgIntrospection::Reflection::getType(extended_typeid<P10>()), osgIntrospection::ParameterInfo::A10, osgIntrospection::Value(D10))); \
params.push_back(new osgIntrospection::ParameterInfo(#N11, osgIntrospection::Reflection::getType(extended_typeid<P11>()), osgIntrospection::ParameterInfo::A11, osgIntrospection::Value(D11))); \
params.push_back(new osgIntrospection::ParameterInfo(#N12, osgIntrospection::Reflection::getType(extended_typeid<P12>()), osgIntrospection::ParameterInfo::A12, osgIntrospection::Value(D12))); \
params.push_back(new osgIntrospection::ParameterInfo(#N13, osgIntrospection::Reflection::getType(extended_typeid<P13>()), osgIntrospection::ParameterInfo::A13, osgIntrospection::Value(D13))); \
From David Callu: " the main problem is the wrapper generation: The PropertyInfo class use MethodInfo class to access to the value. When the property are define with the I_Property* macro, the MethodInfo use by the property to have access to the value are instancied in the I_Property* macro, but there are already instantied by the I_Method* macro before secondary problem: - the function used by the property could no be customized in the genwrapper.conf file - an array property can't insert a value - the std::map reflector (and indexedProperty in general) haven't remove method - about the help in wrapper ... why not ... solution : To use the function define by the I_Method, I add a MethodInfo variable in the I_Method0 macro old macro : #define I_Method0(ret, fn) (\ params.clear(),\ addMethod(new osgIntrospection::TypedMethodIn fo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params))) new macro : #define I_Method0(ret, fn, signature, briefHelp, detailedHelp) \ params.clear(); \ osgIntrospection::MethodInfo* signature = addMethod(new osgIntrospection::TypedMethodInfo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature) the osgIntrospection::MethodInfo* signature is used by the I_Property macro to define the MethodInfo that it use so for I_Property macro : old macro : #define I_PropertyWithReturnType(t, n, r) \ cap=addProperty(new osgIntrospection::PropertyInfo(osgIntrospection::Reflection::getType(typeid(reflected_type)), osgIntrospection::Reflection::getType(typeid(t)), #n, \ I_Method0(t, get##n), \ I_Method1(r, set##n, IN, t, value))) new macro: #define I_SimpleProperty(t, n, get, set) \ get, \ set)) The genwrapper has been modified in this way. The method signature is define by the prototype of the method For example, the "const char* libraryName();" have "__C5_char_P1__libraryName" for signature solution for secondary problem: The genwrapper accept new tokens in the configuration to custumize the property. The new PropertyInserter and the CustomPropertyInsertAttribute class has been defined The PropertyRemover has been added to the StdMapReflector The _briefHelp and _detailedHelp variable has been added in PropertyInfo, MethodInfo and ContructorInfo class modification: I have modify the genwrapper files Configuration.cpp Configuration.h add some tokens to custumize the property Doxyfile.template add the comment in the output xml genwrapper.conf customize some property in osg::Geometry RegistryBuilder.h RegistryBuilder.cpp add the process_help function (to extract help from xml) TypeRegister.cpp TypeRegister.h optimize the property detection TypeDesc.h TypeDesc.cpp modify FunctionDesc and PropertyDesc WrapperGenerator.h WrapperGenerator.cpp modify the output I also modify the fallowing osgIntrospection files: include/osgIntrospection/Attributes add the PropertyInserter and the CustomPropertyInsertAttribute class include/osgIntrospection/ConstructorInfo add the _briefHelp and _detailedHelp variable in the ConstructorInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/MethodInfo add the _briefHelp and _detailedHelp variable in the MethodInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/PropertyInfo add the _briefHelp and _detailedHelp variable in the PropertyInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/ReflectionMacro remove unused I_Property* macro modify all I_Method macro to accept the help string modify all I_Method macro to define a MethodInfo signature include/osgIntrospection/Reflector add the PropertyInserter in StdVectorReflector and StdListReflector add the PropertyRemover in the StdMapReflector include/osgIntrospection/StaticMethodInfo modify all StaticMethodInfo* to accept the help in parameter include/osgIntrospection/TypedMethodInfo modify all TypedMethodInfo* to accept the help in parameter include/osgIntrospection/TypedConstructorInfo modify all TypedConstructorInfo* to accept the help in parameter include/osgIntrospection/Type add the _briefHelp and _detailedHelp variable in the Type class "
2006-10-17 23:17:06 +08:00
D_MethodInfoType signature = addMethod(new osgIntrospection::StaticMethodInfo14<reflected_type, ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13>(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature)
#define I_StaticMethodWithDefaults15(ret, fn, A0, P0, N0, D0, A1, P1, N1, D1, A2, P2, N2, D2, A3, P3, N3, D3, A4, P4, N4, D4, A5, P5, N5, D5, A6, P6, N6, D6, A7, P7, N7, D7, A8, P8, N8, D8, A9, P9, N9, D9, A10, P10, N10, D10, A11, P11, N11, D11, A12, P12, N12, D12, A13, P13, N13, D13, A14, P14, N14, D14, signature, briefHelp, detailedHelp) \
params.clear(); \
params.push_back(new osgIntrospection::ParameterInfo(#N0, osgIntrospection::Reflection::getType(extended_typeid<P0>()), osgIntrospection::ParameterInfo::A0, osgIntrospection::Value(D0))); \
params.push_back(new osgIntrospection::ParameterInfo(#N1, osgIntrospection::Reflection::getType(extended_typeid<P1>()), osgIntrospection::ParameterInfo::A1, osgIntrospection::Value(D1))); \
params.push_back(new osgIntrospection::ParameterInfo(#N2, osgIntrospection::Reflection::getType(extended_typeid<P2>()), osgIntrospection::ParameterInfo::A2, osgIntrospection::Value(D2))); \
params.push_back(new osgIntrospection::ParameterInfo(#N3, osgIntrospection::Reflection::getType(extended_typeid<P3>()), osgIntrospection::ParameterInfo::A3, osgIntrospection::Value(D3))); \
params.push_back(new osgIntrospection::ParameterInfo(#N4, osgIntrospection::Reflection::getType(extended_typeid<P4>()), osgIntrospection::ParameterInfo::A4, osgIntrospection::Value(D4))); \
params.push_back(new osgIntrospection::ParameterInfo(#N5, osgIntrospection::Reflection::getType(extended_typeid<P5>()), osgIntrospection::ParameterInfo::A5, osgIntrospection::Value(D5))); \
params.push_back(new osgIntrospection::ParameterInfo(#N6, osgIntrospection::Reflection::getType(extended_typeid<P6>()), osgIntrospection::ParameterInfo::A6, osgIntrospection::Value(D6))); \
params.push_back(new osgIntrospection::ParameterInfo(#N7, osgIntrospection::Reflection::getType(extended_typeid<P7>()), osgIntrospection::ParameterInfo::A7, osgIntrospection::Value(D7))); \
params.push_back(new osgIntrospection::ParameterInfo(#N8, osgIntrospection::Reflection::getType(extended_typeid<P8>()), osgIntrospection::ParameterInfo::A8, osgIntrospection::Value(D8))); \
params.push_back(new osgIntrospection::ParameterInfo(#N9, osgIntrospection::Reflection::getType(extended_typeid<P9>()), osgIntrospection::ParameterInfo::A9, osgIntrospection::Value(D9))); \
params.push_back(new osgIntrospection::ParameterInfo(#N10, osgIntrospection::Reflection::getType(extended_typeid<P10>()), osgIntrospection::ParameterInfo::A10, osgIntrospection::Value(D10))); \
params.push_back(new osgIntrospection::ParameterInfo(#N11, osgIntrospection::Reflection::getType(extended_typeid<P11>()), osgIntrospection::ParameterInfo::A11, osgIntrospection::Value(D11))); \
params.push_back(new osgIntrospection::ParameterInfo(#N12, osgIntrospection::Reflection::getType(extended_typeid<P12>()), osgIntrospection::ParameterInfo::A12, osgIntrospection::Value(D12))); \
params.push_back(new osgIntrospection::ParameterInfo(#N13, osgIntrospection::Reflection::getType(extended_typeid<P13>()), osgIntrospection::ParameterInfo::A13, osgIntrospection::Value(D13))); \
params.push_back(new osgIntrospection::ParameterInfo(#N14, osgIntrospection::Reflection::getType(extended_typeid<P14>()), osgIntrospection::ParameterInfo::A14, osgIntrospection::Value(D14))); \
From David Callu: " the main problem is the wrapper generation: The PropertyInfo class use MethodInfo class to access to the value. When the property are define with the I_Property* macro, the MethodInfo use by the property to have access to the value are instancied in the I_Property* macro, but there are already instantied by the I_Method* macro before secondary problem: - the function used by the property could no be customized in the genwrapper.conf file - an array property can't insert a value - the std::map reflector (and indexedProperty in general) haven't remove method - about the help in wrapper ... why not ... solution : To use the function define by the I_Method, I add a MethodInfo variable in the I_Method0 macro old macro : #define I_Method0(ret, fn) (\ params.clear(),\ addMethod(new osgIntrospection::TypedMethodIn fo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params))) new macro : #define I_Method0(ret, fn, signature, briefHelp, detailedHelp) \ params.clear(); \ osgIntrospection::MethodInfo* signature = addMethod(new osgIntrospection::TypedMethodInfo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature) the osgIntrospection::MethodInfo* signature is used by the I_Property macro to define the MethodInfo that it use so for I_Property macro : old macro : #define I_PropertyWithReturnType(t, n, r) \ cap=addProperty(new osgIntrospection::PropertyInfo(osgIntrospection::Reflection::getType(typeid(reflected_type)), osgIntrospection::Reflection::getType(typeid(t)), #n, \ I_Method0(t, get##n), \ I_Method1(r, set##n, IN, t, value))) new macro: #define I_SimpleProperty(t, n, get, set) \ get, \ set)) The genwrapper has been modified in this way. The method signature is define by the prototype of the method For example, the "const char* libraryName();" have "__C5_char_P1__libraryName" for signature solution for secondary problem: The genwrapper accept new tokens in the configuration to custumize the property. The new PropertyInserter and the CustomPropertyInsertAttribute class has been defined The PropertyRemover has been added to the StdMapReflector The _briefHelp and _detailedHelp variable has been added in PropertyInfo, MethodInfo and ContructorInfo class modification: I have modify the genwrapper files Configuration.cpp Configuration.h add some tokens to custumize the property Doxyfile.template add the comment in the output xml genwrapper.conf customize some property in osg::Geometry RegistryBuilder.h RegistryBuilder.cpp add the process_help function (to extract help from xml) TypeRegister.cpp TypeRegister.h optimize the property detection TypeDesc.h TypeDesc.cpp modify FunctionDesc and PropertyDesc WrapperGenerator.h WrapperGenerator.cpp modify the output I also modify the fallowing osgIntrospection files: include/osgIntrospection/Attributes add the PropertyInserter and the CustomPropertyInsertAttribute class include/osgIntrospection/ConstructorInfo add the _briefHelp and _detailedHelp variable in the ConstructorInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/MethodInfo add the _briefHelp and _detailedHelp variable in the MethodInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/PropertyInfo add the _briefHelp and _detailedHelp variable in the PropertyInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/ReflectionMacro remove unused I_Property* macro modify all I_Method macro to accept the help string modify all I_Method macro to define a MethodInfo signature include/osgIntrospection/Reflector add the PropertyInserter in StdVectorReflector and StdListReflector add the PropertyRemover in the StdMapReflector include/osgIntrospection/StaticMethodInfo modify all StaticMethodInfo* to accept the help in parameter include/osgIntrospection/TypedMethodInfo modify all TypedMethodInfo* to accept the help in parameter include/osgIntrospection/TypedConstructorInfo modify all TypedConstructorInfo* to accept the help in parameter include/osgIntrospection/Type add the _briefHelp and _detailedHelp variable in the Type class "
2006-10-17 23:17:06 +08:00
D_MethodInfoType signature = addMethod(new osgIntrospection::StaticMethodInfo15<reflected_type, ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14>(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature)
#define I_StaticMethodWithDefaults16(ret, fn, A0, P0, N0, D0, A1, P1, N1, D1, A2, P2, N2, D2, A3, P3, N3, D3, A4, P4, N4, D4, A5, P5, N5, D5, A6, P6, N6, D6, A7, P7, N7, D7, A8, P8, N8, D8, A9, P9, N9, D9, A10, P10, N10, D10, A11, P11, N11, D11, A12, P12, N12, D12, A13, P13, N13, D13, A14, P14, N14, D14, A15, P15, N15, D15, signature, briefHelp, detailedHelp) \
params.clear(); \
params.push_back(new osgIntrospection::ParameterInfo(#N0, osgIntrospection::Reflection::getType(extended_typeid<P0>()), osgIntrospection::ParameterInfo::A0, osgIntrospection::Value(D0))); \
params.push_back(new osgIntrospection::ParameterInfo(#N1, osgIntrospection::Reflection::getType(extended_typeid<P1>()), osgIntrospection::ParameterInfo::A1, osgIntrospection::Value(D1))); \
params.push_back(new osgIntrospection::ParameterInfo(#N2, osgIntrospection::Reflection::getType(extended_typeid<P2>()), osgIntrospection::ParameterInfo::A2, osgIntrospection::Value(D2))); \
params.push_back(new osgIntrospection::ParameterInfo(#N3, osgIntrospection::Reflection::getType(extended_typeid<P3>()), osgIntrospection::ParameterInfo::A3, osgIntrospection::Value(D3))); \
params.push_back(new osgIntrospection::ParameterInfo(#N4, osgIntrospection::Reflection::getType(extended_typeid<P4>()), osgIntrospection::ParameterInfo::A4, osgIntrospection::Value(D4))); \
params.push_back(new osgIntrospection::ParameterInfo(#N5, osgIntrospection::Reflection::getType(extended_typeid<P5>()), osgIntrospection::ParameterInfo::A5, osgIntrospection::Value(D5))); \
params.push_back(new osgIntrospection::ParameterInfo(#N6, osgIntrospection::Reflection::getType(extended_typeid<P6>()), osgIntrospection::ParameterInfo::A6, osgIntrospection::Value(D6))); \
params.push_back(new osgIntrospection::ParameterInfo(#N7, osgIntrospection::Reflection::getType(extended_typeid<P7>()), osgIntrospection::ParameterInfo::A7, osgIntrospection::Value(D7))); \
params.push_back(new osgIntrospection::ParameterInfo(#N8, osgIntrospection::Reflection::getType(extended_typeid<P8>()), osgIntrospection::ParameterInfo::A8, osgIntrospection::Value(D8))); \
params.push_back(new osgIntrospection::ParameterInfo(#N9, osgIntrospection::Reflection::getType(extended_typeid<P9>()), osgIntrospection::ParameterInfo::A9, osgIntrospection::Value(D9))); \
params.push_back(new osgIntrospection::ParameterInfo(#N10, osgIntrospection::Reflection::getType(extended_typeid<P10>()), osgIntrospection::ParameterInfo::A10, osgIntrospection::Value(D10))); \
params.push_back(new osgIntrospection::ParameterInfo(#N11, osgIntrospection::Reflection::getType(extended_typeid<P11>()), osgIntrospection::ParameterInfo::A11, osgIntrospection::Value(D11))); \
params.push_back(new osgIntrospection::ParameterInfo(#N12, osgIntrospection::Reflection::getType(extended_typeid<P12>()), osgIntrospection::ParameterInfo::A12, osgIntrospection::Value(D12))); \
params.push_back(new osgIntrospection::ParameterInfo(#N13, osgIntrospection::Reflection::getType(extended_typeid<P13>()), osgIntrospection::ParameterInfo::A13, osgIntrospection::Value(D13))); \
params.push_back(new osgIntrospection::ParameterInfo(#N14, osgIntrospection::Reflection::getType(extended_typeid<P14>()), osgIntrospection::ParameterInfo::A14, osgIntrospection::Value(D14))); \
params.push_back(new osgIntrospection::ParameterInfo(#N15, osgIntrospection::Reflection::getType(extended_typeid<P15>()), osgIntrospection::ParameterInfo::A15, osgIntrospection::Value(D15))); \
From David Callu: " the main problem is the wrapper generation: The PropertyInfo class use MethodInfo class to access to the value. When the property are define with the I_Property* macro, the MethodInfo use by the property to have access to the value are instancied in the I_Property* macro, but there are already instantied by the I_Method* macro before secondary problem: - the function used by the property could no be customized in the genwrapper.conf file - an array property can't insert a value - the std::map reflector (and indexedProperty in general) haven't remove method - about the help in wrapper ... why not ... solution : To use the function define by the I_Method, I add a MethodInfo variable in the I_Method0 macro old macro : #define I_Method0(ret, fn) (\ params.clear(),\ addMethod(new osgIntrospection::TypedMethodIn fo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params))) new macro : #define I_Method0(ret, fn, signature, briefHelp, detailedHelp) \ params.clear(); \ osgIntrospection::MethodInfo* signature = addMethod(new osgIntrospection::TypedMethodInfo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature) the osgIntrospection::MethodInfo* signature is used by the I_Property macro to define the MethodInfo that it use so for I_Property macro : old macro : #define I_PropertyWithReturnType(t, n, r) \ cap=addProperty(new osgIntrospection::PropertyInfo(osgIntrospection::Reflection::getType(typeid(reflected_type)), osgIntrospection::Reflection::getType(typeid(t)), #n, \ I_Method0(t, get##n), \ I_Method1(r, set##n, IN, t, value))) new macro: #define I_SimpleProperty(t, n, get, set) \ get, \ set)) The genwrapper has been modified in this way. The method signature is define by the prototype of the method For example, the "const char* libraryName();" have "__C5_char_P1__libraryName" for signature solution for secondary problem: The genwrapper accept new tokens in the configuration to custumize the property. The new PropertyInserter and the CustomPropertyInsertAttribute class has been defined The PropertyRemover has been added to the StdMapReflector The _briefHelp and _detailedHelp variable has been added in PropertyInfo, MethodInfo and ContructorInfo class modification: I have modify the genwrapper files Configuration.cpp Configuration.h add some tokens to custumize the property Doxyfile.template add the comment in the output xml genwrapper.conf customize some property in osg::Geometry RegistryBuilder.h RegistryBuilder.cpp add the process_help function (to extract help from xml) TypeRegister.cpp TypeRegister.h optimize the property detection TypeDesc.h TypeDesc.cpp modify FunctionDesc and PropertyDesc WrapperGenerator.h WrapperGenerator.cpp modify the output I also modify the fallowing osgIntrospection files: include/osgIntrospection/Attributes add the PropertyInserter and the CustomPropertyInsertAttribute class include/osgIntrospection/ConstructorInfo add the _briefHelp and _detailedHelp variable in the ConstructorInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/MethodInfo add the _briefHelp and _detailedHelp variable in the MethodInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/PropertyInfo add the _briefHelp and _detailedHelp variable in the PropertyInfo class add access function for the two new variables (_briefHelp and _detailedHelp) modify the constructor to define the two new variables (_briefHelp and _detailedHelp) include/osgIntrospection/ReflectionMacro remove unused I_Property* macro modify all I_Method macro to accept the help string modify all I_Method macro to define a MethodInfo signature include/osgIntrospection/Reflector add the PropertyInserter in StdVectorReflector and StdListReflector add the PropertyRemover in the StdMapReflector include/osgIntrospection/StaticMethodInfo modify all StaticMethodInfo* to accept the help in parameter include/osgIntrospection/TypedMethodInfo modify all TypedMethodInfo* to accept the help in parameter include/osgIntrospection/TypedConstructorInfo modify all TypedConstructorInfo* to accept the help in parameter include/osgIntrospection/Type add the _briefHelp and _detailedHelp variable in the Type class "
2006-10-17 23:17:06 +08:00
D_MethodInfoType signature = addMethod(new osgIntrospection::StaticMethodInfo16<reflected_type, ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15>(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature)
#endif
2005-09-29 21:00:23 +08:00