| Trees | Indices | Help |
|
|---|
|
|
1 # Copyright 2004-2008 Roman Yakovenko 2 # Distributed under the Boost Software License, Version 1.0. (See 3 # accompanying file LICENSE_1_0.txt or copy at 4 # http://www.boost.org/LICENSE_1_0.txt) 5 6 import os 7 import algorithm 8 import code_creator 9 import calldef_utils 10 import class_declaration 11 from pygccxml import declarations 12 from pyplusplus import code_repository 13 from calldef import calldef_t, calldef_wrapper_t 14 import pyplusplus.function_transformers as function_transformers15 16 #TODO: constructors also can have transformation defined. We should use make _init 17 # function for this purpose 18 19 -def remove_duplicate_linesep( code ):20 lines = code.split( os.linesep ) 21 lines = filter( lambda line: line.strip(), lines ) 22 return os.linesep.join( lines )23 31 32 @property 35 3840 ftype = self.wrapper.function_type() 41 return 'typedef %s;' % ftype.create_typedef( self.function_type_alias, exported_class_alias )4244 full_name = self.wrapper.full_name() 45 46 if use_function_alias: 47 return '%s( &%s )' \ 48 % ( self.function_type_alias, full_name ) 49 elif self.declaration.create_with_signature: 50 func_type = self.wrapper.function_type() 51 return '(%s)( &%s )' % ( func_type, full_name ) 52 else: 53 return '&%s' % full_name54 57