Revision: 866
http://python-ogre.svn.sourceforge.net/python-ogre/?rev=866&view=rev
Author: andy_miller
Date: 2009-01-30 05:44:36 +0000 (Fri, 30 Jan 2009)
Log Message:
-----------
Updates to OIS to make vector<bool> usable..
Modified Paths:
--------------
trunk/python-ogre/code_generators/ois/generate_code.py
trunk/python-ogre/code_generators/ois/python_ois_aliases.h
trunk/python-ogre/code_generators/ois/python_ois_sizeof.h
Modified: trunk/python-ogre/code_generators/ois/generate_code.py
===================================================================
--- trunk/python-ogre/code_generators/ois/generate_code.py 2009-01-29 11:21:49 UTC (rev 865)
+++ trunk/python-ogre/code_generators/ois/generate_code.py 2009-01-30 05:44:36 UTC (rev 866)
@@ -63,8 +63,8 @@
main_ns = global_ns.namespace( MAIN_NAMESPACE )
else:
main_ns = global_ns
-# main_ns.variable( "::OIS::JoyStickEvent::state" ).exclude()
-
+
+
############################################################
##
## And there are things that manually need to be INCLUDED
@@ -77,7 +77,19 @@
main_ns = global_ns.namespace( MAIN_NAMESPACE )
else:
main_ns = global_ns
-
+ # needed to extract values from a vector<bool>
+ global_ns.namespace ( 'std' ).class_("_Vb_reference<unsigned int, int, std::vector<bool, std::allocator<bool> > >").include()
+
+ # changes relating to vector<bool> support
+ global_ns.namespace ( 'std' ).class_("_Vb_reference<unsigned int, int, std::vector<bool, std::allocator<bool> > >").\
+ member_function("_Getptr").exclude() ## call_policies=call_policies.return_value_policy( call_policies.reference_existing_object )
+
+ # exclude the '=' and then include the simple one -- not sure this is needed ??
+ for o in global_ns.namespace ( 'std' ).class_("_Vb_reference<unsigned int, int, std::vector<bool, std::allocator<bool> > >").operators('='):
+ o.exclude()
+ o = global_ns.namespace ( 'std' ).class_("_Vb_reference<unsigned int, int, std::vector<bool, std::allocator<bool> > >").operator('=',arg_types=["bool"])
+ o.include()
+
############################################################
##
## And things that need manual fixes, but not necessarly hand wrapped
@@ -94,7 +106,7 @@
mb.class_( "JoyStick" ).member_function( "getJoyStickState" ).call_policies =\
call_policies.return_value_policy( call_policies.reference_existing_object )
-
+
############################################################
##
## And things that need to have their argument and call values fixed.
Modified: trunk/python-ogre/code_generators/ois/python_ois_aliases.h
===================================================================
--- trunk/python-ogre/code_generators/ois/python_ois_aliases.h 2009-01-29 11:21:49 UTC (rev 865)
+++ trunk/python-ogre/code_generators/ois/python_ois_aliases.h 2009-01-30 05:44:36 UTC (rev 866)
@@ -5,5 +5,6 @@
//typedef OIS::SupportedEffectList SupportedEffectList;
typedef std::multimap<OIS::Type,std::basic_string<char, std::char_traits<char>, std::allocator<char> >,std::less<OIS::Type>,std::allocator<std::pair<const OIS::Type, std::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >\
multimapOISType;
+typedef std::vector<bool> stdVectorBool; // nicer name than _Bvector
+typedef std::_Vb_reference<unsigned int, int, std::vector<bool, std::allocator<bool> > > stdVectorBoolReference; //
-
Modified: trunk/python-ogre/code_generators/ois/python_ois_sizeof.h
===================================================================
--- trunk/python-ogre/code_generators/ois/python_ois_sizeof.h 2009-01-29 11:21:49 UTC (rev 865)
+++ trunk/python-ogre/code_generators/ois/python_ois_sizeof.h 2009-01-30 05:44:36 UTC (rev 866)
@@ -10,7 +10,10 @@
//sizeof ( SupportedEffectList );
sizeof ( ParamList );
+sizeof ( std::_Vb_reference<unsigned int, int, std::vector<bool, std::allocator<bool> > > ); // needed for return from vector<bool>
+sizeof ( std::multimap<OIS::Type,std::basic_string<char, std::char_traits<char>, std::allocator<char> >,std::less<OIS::Type>,std::allocator<std::pair<const OIS::Type, std::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > );
+
// // typedef std::map<std::string, std::string> ParamList1;
// // sizeof ( ParamList1);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|