Added genwrapper.conf to OSG CVS

This commit is contained in:
Robert Osfield 2007-01-08 21:55:24 +00:00
parent 462803fd57
commit aebbdf59eb

322
genwrapper.conf Normal file
View File

@ -0,0 +1,322 @@
#############################################################################
# #
# GenWrapper Configuration File #
# #
#############################################################################
configure library "osgProducer"
dependency win32-debug "Producerd.lib"
dependency win32-release "Producer.lib"
dependency unix "-losgUtil -losgDB -lProducer -losgGA -losgText"
end
configure library "osgFX"
dependency unix "-losgUtil -losgDB"
end
configure library "osgParticle"
dependency unix "-losgUtil -losgDB"
end
configure library "osgGA"
dependency unix "-losgUtil"
end
configure library "osgSim"
dependency unix "-losgUtil -losgText -losgDB"
end
configure library "osgTerrain"
dependency win32-debug "gdal_iD.lib"
dependency win32-release "gdal_i.lib"
dependency unix "-losgDB -losgUtil -losgFX"
end
configure library "osgText"
dependency unix "-losgDB"
end
configure library "osgViewer"
dependency unix "-losgUtil -losgDB -losgGA"
end
#############################################################################
suppress reflector "osg::CullStack"
ignore file "osgViewer/GraphicsWindowX11"
ignore file "osgViewer/GraphicsWindowWin32"
ignore file "osgViewer/GraphicsWindowCocoa"
#############################################################################
configure file /osg\/GraphicsContext/
emit before "#include <osg/Camera>
"
end
#############################################################################
# add <io_utils> header to Plane, Quat and Vec* files
configure file /osg\/(Plane|Quat|(Vec(2|3|4)(f|d|b|ub)))/
emit before "#include <osg/io_utils>
"
end
# add ReaderWriter and Comparator objects to Vec*, Quat and Plane classes
configure reflector /osg::(Plane|Quat|(Vec(2|3|4)(f|d|b|ub)))/
readerwriter "osgIntrospection::StdReaderWriter<reflected_type>"
comparator "osgIntrospection::PartialOrderComparator<reflected_type>"
end
# add GDAL includes in DataSet.cpp
configure file /osgTerrain\/DataSet/
emit before "#include <gdal_priv.h>
"
end
# add StateGraph includes in RenderLeaf.cpp
configure file /osgUtil\/RenderLeaf/
emit before "#include <osgUtil/StateGraph>
"
end
#############################################################################
# Doxygen fails to detect that std::vector<T> is a base class for
# osg::Vector*, so we need to specify that manually
configure reflector "osg::VectorGLsizei"
add base "std::vector<GLsizei>"
end
configure reflector "osg::VectorGLubyte"
add base "std::vector<GLubyte>"
end
configure reflector "osg::VectorGLushort"
add base "std::vector<GLushort>"
end
configure reflector "osg::VectorGLuint"
add base "std::vector<GLuint>"
end
configure reflector "osgText::VectorUInt"
add base "std::vector<unsigned int>"
end
#############################################################################
# Doxygen fails to detect that std::vector<T> is a base class for
# TemplateArray<> and TemplateIndexArray<> templates, so we need
# to specify that manually
configure reflector /osg::TemplateIndexArray< GLbyte.*/
add base "std::vector<GLbyte>"
end
configure reflector /osg::TemplateIndexArray< GLubyte.*/
add base "std::vector<GLubyte>"
end
configure reflector /osg::TemplateIndexArray< GLshort.*/
add base "std::vector<GLshort>"
end
configure reflector /osg::TemplateIndexArray< GLushort.*/
add base "std::vector<GLushort>"
end
configure reflector /osg::TemplateIndexArray< GLint.*/
add base "std::vector<GLint>"
end
configure reflector /osg::TemplateIndexArray< GLuint.*/
add base "std::vector<GLuint>"
end
configure reflector /osg::TemplateArray< GLfloat.*/
add base "std::vector<GLfloat>"
end
configure reflector /osg::TemplateArray< osg::Vec2\s*\,.*/
add base "std::vector<osg::Vec2>"
end
configure reflector /osg::TemplateArray< osg::Vec3\s*\,.*/
add base "std::vector<osg::Vec3>"
end
configure reflector /osg::TemplateArray< osg::Vec4\s*\,.*/
add base "std::vector<osg::Vec4>"
end
configure reflector /osg::TemplateArray< osg::Vec2b\s*\,.*/
add base "std::vector<osg::Vec2b>"
end
configure reflector /osg::TemplateArray< osg::Vec3b\s*\,.*/
add base "std::vector<osg::Vec3b>"
end
configure reflector /osg::TemplateArray< osg::Vec4b\s*\,.*/
add base "std::vector<osg::Vec4b>"
end
configure reflector /osg::TemplateArray< osg::Vec2s\s*\,.*/
add base "std::vector<osg::Vec2s>"
end
configure reflector /osg::TemplateArray< osg::Vec3s\s*\,.*/
add base "std::vector<osg::Vec3s>"
end
configure reflector /osg::TemplateArray< osg::Vec4s\s*\,.*/
add base "std::vector<osg::Vec4s>"
end
configure reflector /osg::TemplateArray< osg::Vec4ub\s*\,.*/
add base "std::vector<osg::Vec4ub>"
end
configure file "osg/Array"
emit after "
STD_VECTOR_REFLECTOR(std::vector<osg::Vec2>);
STD_VECTOR_REFLECTOR(std::vector<osg::Vec3>);
STD_VECTOR_REFLECTOR(std::vector<osg::Vec4>);
STD_VECTOR_REFLECTOR(std::vector<osg::Vec2b>);
STD_VECTOR_REFLECTOR(std::vector<osg::Vec3b>);
STD_VECTOR_REFLECTOR(std::vector<osg::Vec4b>);
STD_VECTOR_REFLECTOR(std::vector<osg::Vec2s>);
STD_VECTOR_REFLECTOR(std::vector<osg::Vec3s>);
STD_VECTOR_REFLECTOR(std::vector<osg::Vec4s>);
STD_VECTOR_REFLECTOR(std::vector<osg::Vec4ub>);
STD_VECTOR_REFLECTOR(std::vector<GLubyte>);
STD_VECTOR_REFLECTOR(std::vector<GLbyte>);
STD_VECTOR_REFLECTOR(std::vector<GLushort>);
STD_VECTOR_REFLECTOR(std::vector<GLshort>);
STD_VECTOR_REFLECTOR(std::vector<GLuint>);
STD_VECTOR_REFLECTOR(std::vector<GLint>);
"
end
#############################################################################
# StateSet and related types need some advanced tweaking
configure reflector "std::map< osg::StateAttribute::GLMode, osg::StateAttribute::GLModeValue >"
replace with "STD_MAP_REFLECTOR_WITH_TYPES(std::map< osg::StateAttribute::GLMode COMMA osg::StateAttribute::GLModeValue >, osg::StateAttribute::GLMode, osg::StateAttribute::Values);"
end
configure reflector "osg::StateSet"
# remove indexed property "Mode" because its index would not belong to a
# finite set of values
configure property "Mode"
replace with ""
end
end
configure reflector "osg::Geometry"
# define the count method for some Property
configure property "TexCoordData"
count_method "__unsigned_int__getNumTexCoordArrays"
end
configure property "TexCoordIndices"
count_method "__unsigned_int__getNumTexCoordArrays"
end
configure property "VertexAttribBinding"
count_method "__unsigned_int__getNumVertexAttribArrays"
end
configure property "VertexAttribData"
count_method "__unsigned_int__getNumVertexAttribArrays"
end
configure property "VertexAttribIndices"
count_method "__unsigned_int__getNumVertexAttribArrays"
end
configure property "VertexAttribNormalize"
count_method "__unsigned_int__getNumVertexAttribArrays"
end
end
#############################################################################
# Doxygen fails to detect that /osg::Texture(1D|2D|3D|Rectangle)/ and
# osgText::Font::GlyphTexture are not-abstract class, so we need
# to specify that manually
configure reflector /osg::Texture(1D|2D|3D|Rectangle)/
object-type
end
configure reflector "osgText::Font::GlyphTexture"
object-type
end
#############################################################################
# must suppress reflector for osgDB::Output because some of its methods
# are not supported by osgIntrospection (they return non-const references)
suppress reflector "osgDB::Output"
#############################################################################
# some types are incorrectly detected as value type or object type. Here we
# specify the type kind explicitly
configure reflector "osgProducer::KeyboardMouseCallback"
object-type
end
configure reflector "osgDB::ReentrantMutex"
object-type
end
configure reflector "osgDB::ReadWriteMutex"
object-type
end
#############################################################################
# Doxygen doesn't parse ReadFunc and WriteFunc correctly...
configure reflector "osgDB::DotOsgWrapper::ReadFunc"
replace with "TYPE_NAME_ALIAS(bool (*)(osg::Object&,osgDB::Input&), osgDB::DotOsgWrapper::ReadFunc);
"
end
configure reflector "osgDB::DotOsgWrapper::WriteFunc"
replace with "TYPE_NAME_ALIAS(bool (*)(const osg::Object&,osgDB::Output&), osgDB::DotOsgWrapper::WriteFunc);
"
end
#############################################################################
# temporary workaround for problems related to ambiguous name resolution
suppress reflector "osg::ref_ptr< const osg::StateAttribute >"
suppress reflector "osg::ref_ptr< const osgFX::Effect >"
#############################################################################