Update of /cvsroot/pygccxml/source/pyplusplus/examples/tnfox
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28510/pyplusplus/examples/tnfox
Modified Files:
call_policies.py create_tnfox.py
Log Message:
fixing select API to be more user friendly
Index: create_tnfox.py
===================================================================
RCS file: /cvsroot/pygccxml/source/pyplusplus/examples/tnfox/create_tnfox.py,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** create_tnfox.py 29 Mar 2006 07:03:54 -0000 1.17
--- create_tnfox.py 30 Mar 2006 05:56:17 -0000 1.18
***************
*** 34,38 ****
fx_ns.decls( files_to_exclude.is_excluded ).exclude()
#find FXFunctorTarget constructor that takes 1 argument of some type
! fx_ns.constructors( name='FXFunctorTarget', arg_type=[None] ).exclude()
fx_ns.class_( 'QValueList<FX::Pol::knowReferrers::ReferrerEntry>').exclude()
fx_ns.class_( 'QPtrVector<FX::Generic::BoundFunctorV>').exclude()
--- 34,38 ----
fx_ns.decls( files_to_exclude.is_excluded ).exclude()
#find FXFunctorTarget constructor that takes 1 argument of some type
! fx_ns.constructors( name='FXFunctorTarget', arg_types=[None] ).exclude()
fx_ns.class_( 'QValueList<FX::Pol::knowReferrers::ReferrerEntry>').exclude()
fx_ns.class_( 'QPtrVector<FX::Generic::BoundFunctorV>').exclude()
***************
*** 59,68 ****
#first of all call policies defined within data base
for fname, call_pol in call_policies.db.items():
! print fname
! if fname.startswith( '::FX::FX' ):
! mb.member_functions( fname ).call_policies = call_pol
! else:
! mb.calldefs( fname ).call_policies = call_pol
!
copy_funcs = mb.calldefs( lambda decl: 'FXGL' in decl.parent.name and decl.name == 'copy' )
copy_funcs.call_policies = decl_wrappers.return_value_policy( decl_wrappers.manage_new_object )
--- 59,69 ----
#first of all call policies defined within data base
for fname, call_pol in call_policies.db.items():
! try:
! if fname.startswith( '::FX::FX' ):
! mb.member_functions( fname ).call_policies = call_pol
! else:
! mb.calldefs( fname ).call_policies = call_pol
! except Exception, error:
! print '> error: %s, %s' %( fname, str( error ) )
copy_funcs = mb.calldefs( lambda decl: 'FXGL' in decl.parent.name and decl.name == 'copy' )
copy_funcs.call_policies = decl_wrappers.return_value_policy( decl_wrappers.manage_new_object )
***************
*** 96,101 ****
#~ mb.calldefs( return_type=type_ ).call_policies = policy
! for name in 'FXVec4d', 'FXVec4f', 'FXVec3d', 'FXVec3f', 'QMemArray<unsigned char>':
! mb.casting_operators( name ).call_policies = return_internal_ref
return None
--- 97,102 ----
#~ mb.calldefs( return_type=type_ ).call_policies = policy
! #for name in 'FXVec4d', 'FXVec4f', 'FXVec3d', 'FXVec3f', 'QMemArray<unsigned char>':
! # mb.casting_operators( name ).call_policies = return_internal_ref
return None
***************
*** 136,140 ****
, include_paths=[settings.boost_path, settings.tnfox_include_path]
, define_symbols=settings.defined_symbols_gccxml )
- mb.run_query_optimizer()
print 'filtering declarations'
filter_decls( mb )
--- 137,140 ----
Index: call_policies.py
===================================================================
RCS file: /cvsroot/pygccxml/source/pyplusplus/examples/tnfox/call_policies.py,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** call_policies.py 29 Mar 2006 07:03:54 -0000 1.8
--- call_policies.py 30 Mar 2006 05:56:17 -0000 1.9
***************
*** 441,445 ****
, "::FX::QPtrVector<FX::FXWindow>::getLast" : return_internal_reference()
, "::FX::QPtrVector<FX::FXWindow>::first" : return_internal_reference()
- , "::FX::QPtrVector<FX::FXWindow>::last" : return_internal_reference()
, "::FX::QPtrVector<FX::FXWindow>::int_vector" : return_self()
, "::FX::QPtrVector<FX::Generic::BoundFunctorV>::data" : return_internal_reference()
--- 441,444 ----
|