pygccxml-commit Mailing List for C++ Python language bindings (Page 31)
Brought to you by:
mbaas,
roman_yakovenko
You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
(190) |
Apr
(166) |
May
(170) |
Jun
(75) |
Jul
(105) |
Aug
(131) |
Sep
(99) |
Oct
(84) |
Nov
(67) |
Dec
(54) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
(66) |
Feb
(49) |
Mar
(25) |
Apr
(62) |
May
(21) |
Jun
(34) |
Jul
(9) |
Aug
(21) |
Sep
(5) |
Oct
|
Nov
(63) |
Dec
(34) |
2008 |
Jan
(10) |
Feb
(42) |
Mar
(26) |
Apr
(25) |
May
(6) |
Jun
(40) |
Jul
(18) |
Aug
(29) |
Sep
(6) |
Oct
(32) |
Nov
(14) |
Dec
(56) |
2009 |
Jan
(127) |
Feb
(52) |
Mar
(2) |
Apr
(10) |
May
(29) |
Jun
(3) |
Jul
|
Aug
(16) |
Sep
(4) |
Oct
(11) |
Nov
(8) |
Dec
(14) |
2010 |
Jan
(31) |
Feb
(1) |
Mar
(7) |
Apr
(9) |
May
(1) |
Jun
|
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2011 |
Jan
|
Feb
(8) |
Mar
(4) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2014 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <rom...@us...> - 2007-08-18 05:52:18
|
Revision: 1108 http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1108&view=rev Author: roman_yakovenko Date: 2007-08-17 22:52:21 -0700 (Fri, 17 Aug 2007) Log Message: ----------- cosmetic fix - use "property" decorator Modified Paths: -------------- pyplusplus_dev/pyplusplus/code_creators/indexing_suites.py Modified: pyplusplus_dev/pyplusplus/code_creators/indexing_suites.py =================================================================== --- pyplusplus_dev/pyplusplus/code_creators/indexing_suites.py 2007-08-18 05:51:01 UTC (rev 1107) +++ pyplusplus_dev/pyplusplus/code_creators/indexing_suites.py 2007-08-18 05:52:21 UTC (rev 1108) @@ -17,13 +17,13 @@ registration_based.registration_based_t.__init__( self ) declaration_based.declaration_based_t.__init__( self, declaration=container ) - def _get_configuration( self ): + @property + def configuration( self ): return self.declaration.indexing_suite - configuration = property( _get_configuration ) - def _get_container( self ): + @property + def container( self ): return self.declaration - container = property( _get_container ) def guess_suite_name( self ): if self.container.name.startswith( 'vector' ): This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2007-08-18 05:50:58
|
Revision: 1107 http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1107&view=rev Author: roman_yakovenko Date: 2007-08-17 22:51:01 -0700 (Fri, 17 Aug 2007) Log Message: ----------- optimization: eliminating condition test for non-relevant code creators Modified Paths: -------------- pyplusplus_dev/pyplusplus/code_creators/class_declaration.py Modified: pyplusplus_dev/pyplusplus/code_creators/class_declaration.py =================================================================== --- pyplusplus_dev/pyplusplus/code_creators/class_declaration.py 2007-08-18 05:47:24 UTC (rev 1106) +++ pyplusplus_dev/pyplusplus/code_creators/class_declaration.py 2007-08-18 05:51:01 UTC (rev 1107) @@ -122,13 +122,12 @@ base_classes[ id( hierarchy_info.related_class ) ] = hierarchy_info base_classes_size = len( base_classes ) creators = {} + creators_len = 0 for creator in algorithm.make_flatten_generator( self.top_parent.body.creators ): - if not isinstance( creator, class_t ): - continue - if id(creator.declaration) in base_classes: + if isinstance( creator, class_t ) and id(creator.declaration) in base_classes: creators[ id(creator.declaration) ] = creator - if len( creators ) == base_classes_size: - break #all classes has been found + if len( creators ) == base_classes_size: + break #all classes has been found return base_classes, creators def _get_base_operators(self, base_classes, base_creators): This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2007-08-18 05:47:22
|
Revision: 1106 http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1106&view=rev Author: roman_yakovenko Date: 2007-08-17 22:47:24 -0700 (Fri, 17 Aug 2007) Log Message: ----------- adding new test case Modified Paths: -------------- pygccxml_dev/unittests/test_performance.py Modified: pygccxml_dev/unittests/test_performance.py =================================================================== --- pygccxml_dev/unittests/test_performance.py 2007-08-18 05:38:24 UTC (rev 1105) +++ pygccxml_dev/unittests/test_performance.py 2007-08-18 05:47:24 UTC (rev 1106) @@ -83,6 +83,14 @@ reader = parser.project_reader_t( parser.config_t(gccxml_path=autoconfig.gccxml_path) ) reader.read_files([include_std_header]) +def test_on_big_file( file_name, count ): + file_name = os.path.join( autoconfig.data_directory, file_name ) + for i in range( count ): + reader = parser.project_reader_t( parser.config_t(gccxml_path=autoconfig.gccxml_path) ) + decls = reader.read_files([parser.create_gccxml_fc( file_name )]) + global_ns = declarations.get_global_namespace( decls ) + global_ns.init_optimizer() + def parse_big_file(): reader = parser.project_reader_t( parser.config_t(gccxml_path=autoconfig.gccxml_path) ) reader.read_files([parser.create_gccxml_fc( os.path.join( autoconfig.data_directory, 'big.xml' ) )]) @@ -97,7 +105,7 @@ #~ test_project_on_include_std_dot_hpp() print 'running' prof = hotshot.Profile( 'parser.prof' ) - prof.runcall(parse_big_file ) + prof.runcall( lambda: test_on_big_file( 'big2.xml', 1 ) ) stats = hotshot.stats.load("parser.prof") stats.sort_stats('time', 'calls') stats.print_stats(30) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2007-08-18 05:38:22
|
Revision: 1105 http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1105&view=rev Author: roman_yakovenko Date: 2007-08-17 22:38:24 -0700 (Fri, 17 Aug 2007) Log Message: ----------- adding new xml file for performance tests Added Paths: ----------- pygccxml_dev/unittests/data/big2.xml.bz2 Added: pygccxml_dev/unittests/data/big2.xml.bz2 =================================================================== (Binary files differ) Property changes on: pygccxml_dev/unittests/data/big2.xml.bz2 ___________________________________________________________________ Name: svn:mime-type + application/octet-stream This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2007-08-18 05:33:39
|
Revision: 1104 http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1104&view=rev Author: roman_yakovenko Date: 2007-08-17 22:33:41 -0700 (Fri, 17 Aug 2007) Log Message: ----------- internal class impl optimization - in optiized mode it will reused the declarations list it has and will not create a new one Modified Paths: -------------- pygccxml_dev/pygccxml/declarations/scopedef.py Modified: pygccxml_dev/pygccxml/declarations/scopedef.py =================================================================== --- pygccxml_dev/pygccxml/declarations/scopedef.py 2007-08-18 05:31:20 UTC (rev 1103) +++ pygccxml_dev/pygccxml/declarations/scopedef.py 2007-08-18 05:33:41 UTC (rev 1104) @@ -75,6 +75,7 @@ self._type2decls_nr = {} self._type2name2decls_nr = {} self._all_decls = None + self._all_decls_not_recursive = None def _get_logger( self ): return utils.loggers.queries_engine @@ -86,7 +87,12 @@ def _get__cmp__items(self): """implementation details""" - items = [ self._sorted_list( self.declarations ) ] + items = [] + if self._optimized: + #in this case we don't need to build class internal declarations list + items.append( self._sorted_list( self._all_decls_not_recursive ) ) + else: + items.append( self._sorted_list( self.declarations ) ) items.extend( self._get__cmp__scope_items() ) return items @@ -95,16 +101,24 @@ return False return self._sorted_list( self.declarations[:] ) \ == other._sorted_list( other.declarations[:] ) + #self_decls = self._all_decls_not_recursive + #if not self._optimized: + #self_decls = self._sorted_list( self.declarations[:] ) + #other_decls = other._all_decls_not_recursive[:] + #if not other._optimized: + #other_decls = other._sorted_list( other.declarations[:] ) + #else: + #return self_decls == other_decls def _get_declarations_impl(self): raise NotImplementedError() - + def _get_declarations(self): - return self._get_declarations_impl() - declarations = property( _get_declarations, - doc="""A list of children declarations. - @type: list of L{declaration_t} - """) + if True == self._optimized: + return self._all_decls_not_recursive + else: + return self._get_declarations_impl() + declarations = property( _get_declarations, doc="list of children L{declarations<declaration_t>}" ) def remove_declaration( self, decl ): raise NotImplementedError() @@ -136,6 +150,7 @@ self._type2decls_nr = {} self._type2name2decls_nr = {} self._all_decls = None + self._all_decls_not_recursive = None map( lambda decl: decl.clear_optimizer() , filter( lambda decl: isinstance( decl, scopedef_t ) @@ -165,7 +180,8 @@ self._type2name2decls[ dtype ] = {} self._type2name2decls_nr[ dtype ] = {} - self._all_decls = algorithm.make_flatten( self.declarations ) + self._all_decls_not_recursive = self.declarations + self._all_decls = algorithm.make_flatten( self._all_decls_not_recursive ) for decl in self._all_decls: types = self.__decl_types( decl ) for type_ in types: @@ -182,7 +198,8 @@ name2decls_nr[ decl.name ].append( decl ) map( lambda decl: decl.init_optimizer() - , filter( lambda decl: isinstance( decl, scopedef_t ), self.declarations ) ) + , filter( lambda decl: isinstance( decl, scopedef_t ) + , self._all_decls_not_recursive ) ) if self.name == '::': self._logger.debug( "preparing data structures for query optimizer - done( %f seconds ). " % ( time.clock() - start_time ) ) @@ -253,7 +270,6 @@ if matcher_args.has_key('allow_empty'): del matcher_args['allow_empty'] - matcher = match_class( **matcher_args ) if matcher.decl_type: return matcher.decl_type @@ -313,7 +329,7 @@ return self._all_decls else: self._logger.debug( 'non recursive query has not been optimized ( hint: query does not contain type and/or name )' ) - return self.declarations + return self._all_decls_not_recursive def _find_single( self, match_class, **keywds ): """implementation details""" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2007-08-18 05:31:17
|
Revision: 1103 http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1103&view=rev Author: roman_yakovenko Date: 2007-08-17 22:31:20 -0700 (Fri, 17 Aug 2007) Log Message: ----------- optimizing - find_value_type function - remove unnecessary recursion Modified Paths: -------------- pygccxml_dev/pygccxml/declarations/type_traits.py Modified: pygccxml_dev/pygccxml/declarations/type_traits.py =================================================================== --- pygccxml_dev/pygccxml/declarations/type_traits.py 2007-08-18 05:25:18 UTC (rev 1102) +++ pygccxml_dev/pygccxml/declarations/type_traits.py 2007-08-18 05:31:20 UTC (rev 1103) @@ -931,8 +931,9 @@ , function=lambda decl: not isinstance( decl, calldef.calldef_t ) , allow_empty=True ) if not found: - if cpptypes.FUNDAMENTAL_TYPES.has_key( value_type_str[2:] ): #remove leading :: - return cpptypes.FUNDAMENTAL_TYPES[value_type_str[2:]] + no_global_ns_value_type_str = value_type_str[2:] + if cpptypes.FUNDAMENTAL_TYPES.has_key( no_global_ns_value_type_str ): + return cpptypes.FUNDAMENTAL_TYPES[ no_global_ns_value_type_str ] elif is_std_string( value_type_str ): string_ = global_ns.typedef( '::std::string' ) return remove_declarated( string_ ) @@ -940,14 +941,16 @@ string_ = global_ns.typedef( '::std::wstring' ) return remove_declarated( string_ ) else: - value_type_str = value_type_str[2:]#removing leading :: + value_type_str = no_global_ns_value_type_str has_const = value_type_str.startswith( 'const ' ) if has_const: value_type_str = value_type_str[ len('const '): ] has_pointer = value_type_str.endswith( '*' ) if has_pointer: value_type_str = value_type_str[:-1] - found = impl_details.find_value_type( global_ns, value_type_str ) + found = None + if has_const or has_pointer: + found = impl_details.find_value_type( global_ns, value_type_str ) if not found: return None else: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2007-08-18 05:25:15
|
Revision: 1102 http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1102&view=rev Author: roman_yakovenko Date: 2007-08-17 22:25:18 -0700 (Fri, 17 Aug 2007) Log Message: ----------- adding caching for recursive_base and recursive_derived lists optimization Modified Paths: -------------- pygccxml_dev/pygccxml/declarations/class_declaration.py Modified: pygccxml_dev/pygccxml/declarations/class_declaration.py =================================================================== --- pygccxml_dev/pygccxml/declarations/class_declaration.py 2007-08-18 05:21:30 UTC (rev 1101) +++ pygccxml_dev/pygccxml/declarations/class_declaration.py 2007-08-18 05:25:18 UTC (rev 1102) @@ -126,6 +126,8 @@ self._aliases = [] self._container_traits = None self._container_traits_set = False + self._recursive_bases = None + self._recursive_derived = None def _get_name_impl( self ): if not self._name: #class with empty name @@ -197,17 +199,19 @@ bases = property( _get_bases, _set_bases , doc="list of L{base classes<hierarchy_info_t>}") - def _get_recursive_bases(self): - to_go = self.bases[:] - all_bases = [] - while to_go: - base = to_go.pop() - if base not in all_bases: - all_bases.append( base ) - to_go.extend( base.related_class.bases ) - return all_bases - recursive_bases = property( _get_recursive_bases - , doc="returns a list of all L{base classes<hierarchy_info_t>}") + @property + def recursive_bases(self): + """list of all L{base classes<hierarchy_info_t>}""" + if self._recursive_bases is None: + to_go = self.bases[:] + all_bases = [] + while to_go: + base = to_go.pop() + if base not in all_bases: + all_bases.append( base ) + to_go.extend( base.related_class.bases ) + self._recursive_bases = all_bases + return self._recursive_bases def _get_derived(self): return self._derived @@ -216,17 +220,19 @@ derived = property( _get_derived, _set_derived , doc="list of L{derived classes<hierarchy_info_t>}") - def _get_recursive_derived(self): - to_go = self.derived[:] - all_derived = [] - while to_go: - derive = to_go.pop() - if derive not in all_derived: - all_derived.append( derive ) - to_go.extend( derive.related_class.derived ) - return all_derived - recursive_derived = property( _get_recursive_derived - , doc="returns a list of all L{derive classes<hierarchy_info_t>}") + @property + def recursive_derived(self): + """list of all L{derive classes<hierarchy_info_t>}""" + if self._recursive_derived is None: + to_go = self.derived[:] + all_derived = [] + while to_go: + derive = to_go.pop() + if derive not in all_derived: + all_derived.append( derive ) + to_go.extend( derive.related_class.derived ) + self._recursive_derived = all_derived + return self._recursive_derived def _get_is_abstract(self): return self._is_abstract This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2007-08-18 05:21:29
|
Revision: 1101 http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1101&view=rev Author: roman_yakovenko Date: 2007-08-17 22:21:30 -0700 (Fri, 17 Aug 2007) Log Message: ----------- adding small optimization - reuse parent declaration path Modified Paths: -------------- pygccxml_dev/pygccxml/declarations/algorithm.py Modified: pygccxml_dev/pygccxml/declarations/algorithm.py =================================================================== --- pygccxml_dev/pygccxml/declarations/algorithm.py 2007-08-16 21:00:46 UTC (rev 1100) +++ pygccxml_dev/pygccxml/declarations/algorithm.py 2007-08-18 05:21:30 UTC (rev 1101) @@ -26,8 +26,13 @@ result = [ decl.name ] parent = decl.parent while parent: - result.append( parent.name ) - parent = parent.parent + if parent.cache.declaration_path: + result.reverse() + decl.cache.declaration_path = parent.cache.declaration_path + result + return decl.cache.declaration_path + else: + result.append( parent.name ) + parent = parent.parent result.reverse() decl.cache.declaration_path = result return result This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2007-08-16 21:00:44
|
Revision: 1100 http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1100&view=rev Author: roman_yakovenko Date: 2007-08-16 14:00:46 -0700 (Thu, 16 Aug 2007) Log Message: ----------- deleted as I found it buggy and useless Removed Paths: ------------- developer_scripts/profile_gui.py Deleted: developer_scripts/profile_gui.py =================================================================== --- developer_scripts/profile_gui.py 2007-08-16 08:38:11 UTC (rev 1099) +++ developer_scripts/profile_gui.py 2007-08-16 21:00:46 UTC (rev 1100) @@ -1,146 +0,0 @@ -#!/usr/bin/env python -# Python Profiler User Interface -# By Brent Burley, 2004, erb...@ch... -# This software is placed into the public domain - -#Reduced font size, added horizontal scroll bars: Drew Gulino, 2005 - -import os -from Tkinter import * -import tkFileDialog -import sys, string, re, cStringIO, pstats - -skip_re = re.compile(r'(Ordered by|List reduced|^\s*$)') -func_re = re.compile(r'(<?\w+>?:\d+\([^()]+(?:\(\))?\))') - -def ask_file(title, root=None): - created = False - if not root: - root = Tk() - root.withdraw() - created = True - dir_ = tkFileDialog.askopenfilename( title=title ) - if created: - root.destroy() - return dir_ - -def ignore(e): return "break" - -class Profile(Frame): - def __init__(self, filename, parent=None): - # main frame - Frame.__init__(self, parent) - font = ('Courier', 9) - - # create '_callers' listbox - f = Frame(self) - f.pack(expand=YES, fill=BOTH) - vscroll = Scrollbar(f, orient=VERTICAL) - hscroll = Scrollbar(f, orient=HORIZONTAL) - self._callers = Listbox(f, yscrollcommand=vscroll.set, xscrollcommand=hscroll.set,font=font) - hscroll.config(command=self._callers.xview) - hscroll.pack(side=BOTTOM, fill=BOTH) - vscroll.configure(command=self._callers.yview) - vscroll.pack(side=RIGHT, fill=BOTH) - self._callers.pack(side=RIGHT, expand=YES, fill=BOTH) - self._callers.bind('<Button-1>', - lambda e, s=self: s.choose(e, s._callers)) - self._callers.bind('<ButtonRelease-1>', ignore) - self._callers.bind('<B1-Motion>', ignore) - - # create '_callees' listbox - f = Frame(self) - f.pack(expand=YES, fill=BOTH) - vscroll = Scrollbar(f, orient=VERTICAL) - hscroll = Scrollbar(f, orient=HORIZONTAL) - self._callees = Listbox(f, yscrollcommand=vscroll.set, xscrollcommand=hscroll.set, font=font) - hscroll.config(command=self._callees.xview) - hscroll.pack(side=BOTTOM, fill=BOTH) - vscroll.configure(command=self._callees.yview) - vscroll.pack(side=RIGHT, fill=BOTH) - self._callees.pack(side=RIGHT, expand=YES, fill=BOTH) - self._callees.bind('<Button-1>', - lambda e, s=self: s.choose(e, s._callees)) - self._callees.bind('<ButtonRelease-1>', ignore) - self._callees.bind('<B1-Motion>', ignore) - - # button frame - f = Frame(self) - - # list all - self._listall = Button(f, text='List All', command=self.listall) - self._listall.pack(side=LEFT) - - # create sort menu - f.pack(expand=NO, fill=X) - self._sorted = Button(f) - self._sorted.pack(side=LEFT) - self._sortMenu = m = Menu(self, tearoff=0) - self._sorted.bind("<Button-1>", self.popupSortMenu) - opts = 'time cumulative calls file line module name nfl pcalls stdname time' - for o in string.split(opts): - m.add_command(label=o, - command=lambda s=self,o=o: s.sort(o)) - - # close button - self._close = Button(f, text="Close", command=self.quit) - self._close.pack(side=RIGHT) - - # load stats - self.setFilename(filename) - - def setFilename(self, filename): - self._stats = stats = pstats.Stats(filename) -# stats.strip_dirs() - self.sort('cumulative') - - def listall(self): - self._callees.delete(0,END) - self.setStats(self._callers, self._stats.print_stats) - - def popupSortMenu(self, e): - self._sortMenu.tk_popup(e.x_root, e.y_root) - return "break" - - def sort(self, type): - self._stats.sort_stats(type) - self._sorted['text'] = 'sort: ' + type - self._callees.delete(0,END) - self._callees.insert(END, 'Click on an entry display callers/callees') - self.setStats(self._callers, self._stats.print_stats) - - - def setStats(self, list, func, *args): - list.delete(0,END) - sys.stdout = cStringIO.StringIO() - apply(func, args) - for l in string.split(sys.stdout.getvalue(), '\n'): - if skip_re.search(l): continue - list.insert(END, l) - sys.stdout = sys.__stdout__ - - def choose(self, e, list): - text = list.get(list.nearest(e.y)) - try: fn = func_re.findall(text)[-1] - except IndexError: return - fn = re.escape(fn) - self.setStats(self._callees, self._stats.print_callees, fn) - self.setStats(self._callers, self._stats.print_callers, fn) - return "break" - - -if __name__ == '__main__': - stats = '' - if len(sys.argv) < 2: - stats = ask_file( 'Select stats file to view' ) - if not os.path.exists( stats ): - sys.exit(1) - else: - stats = sys.argv[1] - - top = Tk() - p = Profile(stats, top) - p.master.title('Python Profile: ' + stats) - p.pack(expand=YES, fill=BOTH) - top.geometry('800x600+200+200') - mainloop() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2007-08-16 08:38:08
|
Revision: 1099 http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1099&view=rev Author: roman_yakovenko Date: 2007-08-16 01:38:11 -0700 (Thu, 16 Aug 2007) Log Message: ----------- adding gui for profile generated data Added Paths: ----------- developer_scripts/profile_gui.py Added: developer_scripts/profile_gui.py =================================================================== --- developer_scripts/profile_gui.py (rev 0) +++ developer_scripts/profile_gui.py 2007-08-16 08:38:11 UTC (rev 1099) @@ -0,0 +1,146 @@ +#!/usr/bin/env python +# Python Profiler User Interface +# By Brent Burley, 2004, erb...@ch... +# This software is placed into the public domain + +#Reduced font size, added horizontal scroll bars: Drew Gulino, 2005 + +import os +from Tkinter import * +import tkFileDialog +import sys, string, re, cStringIO, pstats + +skip_re = re.compile(r'(Ordered by|List reduced|^\s*$)') +func_re = re.compile(r'(<?\w+>?:\d+\([^()]+(?:\(\))?\))') + +def ask_file(title, root=None): + created = False + if not root: + root = Tk() + root.withdraw() + created = True + dir_ = tkFileDialog.askopenfilename( title=title ) + if created: + root.destroy() + return dir_ + +def ignore(e): return "break" + +class Profile(Frame): + def __init__(self, filename, parent=None): + # main frame + Frame.__init__(self, parent) + font = ('Courier', 9) + + # create '_callers' listbox + f = Frame(self) + f.pack(expand=YES, fill=BOTH) + vscroll = Scrollbar(f, orient=VERTICAL) + hscroll = Scrollbar(f, orient=HORIZONTAL) + self._callers = Listbox(f, yscrollcommand=vscroll.set, xscrollcommand=hscroll.set,font=font) + hscroll.config(command=self._callers.xview) + hscroll.pack(side=BOTTOM, fill=BOTH) + vscroll.configure(command=self._callers.yview) + vscroll.pack(side=RIGHT, fill=BOTH) + self._callers.pack(side=RIGHT, expand=YES, fill=BOTH) + self._callers.bind('<Button-1>', + lambda e, s=self: s.choose(e, s._callers)) + self._callers.bind('<ButtonRelease-1>', ignore) + self._callers.bind('<B1-Motion>', ignore) + + # create '_callees' listbox + f = Frame(self) + f.pack(expand=YES, fill=BOTH) + vscroll = Scrollbar(f, orient=VERTICAL) + hscroll = Scrollbar(f, orient=HORIZONTAL) + self._callees = Listbox(f, yscrollcommand=vscroll.set, xscrollcommand=hscroll.set, font=font) + hscroll.config(command=self._callees.xview) + hscroll.pack(side=BOTTOM, fill=BOTH) + vscroll.configure(command=self._callees.yview) + vscroll.pack(side=RIGHT, fill=BOTH) + self._callees.pack(side=RIGHT, expand=YES, fill=BOTH) + self._callees.bind('<Button-1>', + lambda e, s=self: s.choose(e, s._callees)) + self._callees.bind('<ButtonRelease-1>', ignore) + self._callees.bind('<B1-Motion>', ignore) + + # button frame + f = Frame(self) + + # list all + self._listall = Button(f, text='List All', command=self.listall) + self._listall.pack(side=LEFT) + + # create sort menu + f.pack(expand=NO, fill=X) + self._sorted = Button(f) + self._sorted.pack(side=LEFT) + self._sortMenu = m = Menu(self, tearoff=0) + self._sorted.bind("<Button-1>", self.popupSortMenu) + opts = 'time cumulative calls file line module name nfl pcalls stdname time' + for o in string.split(opts): + m.add_command(label=o, + command=lambda s=self,o=o: s.sort(o)) + + # close button + self._close = Button(f, text="Close", command=self.quit) + self._close.pack(side=RIGHT) + + # load stats + self.setFilename(filename) + + def setFilename(self, filename): + self._stats = stats = pstats.Stats(filename) +# stats.strip_dirs() + self.sort('cumulative') + + def listall(self): + self._callees.delete(0,END) + self.setStats(self._callers, self._stats.print_stats) + + def popupSortMenu(self, e): + self._sortMenu.tk_popup(e.x_root, e.y_root) + return "break" + + def sort(self, type): + self._stats.sort_stats(type) + self._sorted['text'] = 'sort: ' + type + self._callees.delete(0,END) + self._callees.insert(END, 'Click on an entry display callers/callees') + self.setStats(self._callers, self._stats.print_stats) + + + def setStats(self, list, func, *args): + list.delete(0,END) + sys.stdout = cStringIO.StringIO() + apply(func, args) + for l in string.split(sys.stdout.getvalue(), '\n'): + if skip_re.search(l): continue + list.insert(END, l) + sys.stdout = sys.__stdout__ + + def choose(self, e, list): + text = list.get(list.nearest(e.y)) + try: fn = func_re.findall(text)[-1] + except IndexError: return + fn = re.escape(fn) + self.setStats(self._callees, self._stats.print_callees, fn) + self.setStats(self._callers, self._stats.print_callers, fn) + return "break" + + +if __name__ == '__main__': + stats = '' + if len(sys.argv) < 2: + stats = ask_file( 'Select stats file to view' ) + if not os.path.exists( stats ): + sys.exit(1) + else: + stats = sys.argv[1] + + top = Tk() + p = Profile(stats, top) + p.master.title('Python Profile: ' + stats) + p.pack(expand=YES, fill=BOTH) + top.geometry('800x600+200+200') + mainloop() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2007-08-12 21:55:17
|
Revision: 1098 http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1098&view=rev Author: roman_yakovenko Date: 2007-08-12 14:55:20 -0700 (Sun, 12 Aug 2007) Log Message: ----------- adding class which will save\load\provide access to the declarations, exposed by module builders, other than the current one Modified Paths: -------------- pyplusplus_dev/pyplusplus/utils/__init__.py pyplusplus_dev/unittests/test_all.py Added Paths: ----------- pyplusplus_dev/unittests/exposed_decls_db_tester.py Modified: pyplusplus_dev/pyplusplus/utils/__init__.py =================================================================== --- pyplusplus_dev/pyplusplus/utils/__init__.py 2007-08-10 20:58:25 UTC (rev 1097) +++ pyplusplus_dev/pyplusplus/utils/__init__.py 2007-08-12 21:55:20 UTC (rev 1098) @@ -7,13 +7,12 @@ This module is a collection of unrelated algorithms, that works on code creators tree. """ +import os import math from pygccxml import declarations -from pyplusplus import code_creators - +from pyplusplus import code_creators class missing_call_policies: - @staticmethod def _selector( creator ): if not isinstance( creator, code_creators.declaration_based_t ): @@ -40,7 +39,6 @@ for creator in creators: creator.parent.remove_creator( creator ) - def split_sequence(seq, bucket_size): #split sequence to buclets, where every will contain maximum bucket_size items seq_len = len( seq ) @@ -53,4 +51,93 @@ to = min( ( i + 1) * bucket_size, seq_len ) buckets.append( seq[ from_ : to ] ) return buckets - \ No newline at end of file + + +class exposed_decls_db_t( object ): + class row_creator_t( declarations.decl_visitor_t ): + def __init__( self, field_delimiter ): + self.__decl = None + self.__formatted = None + self.__field_delimiter = field_delimiter + + def get_full_name(self): + return declarations.full_name( self.__decl ) + + def __call__( self, decl ): + if not isinstance( decl.parent, declarations.namespace_t ): + return None #we don't want to dump class internal declarations + self.__decl = decl + self.__formatted = None + try: + declarations.apply_visitor( self, decl ) + except NotImplementedError: + pass + return self.__formatted + + def visit_free_function( self ): + self.__formatted = '%s%s%s' % ( self.get_full_name() + , self.__field_delimiter + , self.__decl.function_type().decl_string ) + + def visit_class_declaration(self ): + self.__formatted = self.get_full_name() + + def visit_class(self ): + self.__formatted = self.get_full_name() + + def visit_enumeration(self ): + self.__formatted = self.get_full_name() + + def visit_variable(self ): + self.__formatted = self.get_full_name() + + def __init__( self, activated=False ): + self.__activated = activated + self.__exposed = {} + self.__row_creator = self.row_creator_t(field_delimiter='@') + self.__key_delimiter = '?' + self.__row_delimiter = os.linesep + + def __create_key( self, decl ): + return decl.__class__.__name__ + + @property + def activated( self ): + return self.__activated + + def expose( self, decl ): + if not self.__activated: + return None + row = self.__row_creator( decl ) + if row is None: + return None + key = self.__create_key( decl ) + if not self.__exposed.has_key( key ): + self.__exposed[ key ] = set() + self.__exposed[ key ].add( row ) + + def save( self, fpath ): + f = file( fpath, 'w+b' ) + for key, items in self.__exposed.iteritems(): + for item in items: + f.write( '%s%s%s%s' % ( key, self.__key_delimiter, item, self.__row_delimiter ) ) + f.close() + + def load( self, fpath ): + self.__exposed = {} + f = file( fpath, 'r+b' ) + for line in f: + key, row = line.split( self.__key_delimiter) + if not self.__exposed.has_key( key ): + self.__exposed[ key ] = set() + self.__exposed[ key ].add( row[:len(self.__row_delimiter)] ) + + def is_exposed( self, decl ): + assert self.activated + key = self.__create_key( decl ) + if not self.__exposed.has_key( key ): + return False + row = self.__row_creator( decl ) + return row in self.__exposed[ key ] + + Added: pyplusplus_dev/unittests/exposed_decls_db_tester.py =================================================================== --- pyplusplus_dev/unittests/exposed_decls_db_tester.py (rev 0) +++ pyplusplus_dev/unittests/exposed_decls_db_tester.py 2007-08-12 21:55:20 UTC (rev 1098) @@ -0,0 +1,66 @@ +# Copyright 2004 Roman Yakovenko. +# Distributed under the Boost Software License, Version 1.0. (See +# accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +import os +import sys +import unittest +import autoconfig +from pygccxml import parser +from pygccxml import declarations +from pyplusplus import code_creators +from pyplusplus import module_creator +from pyplusplus import module_builder +from pyplusplus import utils as pypp_utils +from pyplusplus import function_transformers as ft + +class tester_t(unittest.TestCase): + CODE = """ + namespace ns{ + enum AAA{ aaa=1 }; + struct XXX{ + struct yyy{}; + enum bbb{ b=2 }; + void fff(); + }; + + int VVV; + void FFF( int ); + } + """ + def __init__(self, *args ): + unittest.TestCase.__init__(self, *args) + + def test(self): + db = pypp_utils.exposed_decls_db_t(activated=True) + config = parser.config_t( gccxml_path=autoconfig.gccxml.executable ) + global_ns = declarations.get_global_namespace( parser.parse_string( self.CODE, config ) ) + ns = global_ns.namespace( 'ns' ) + for d in ns.decls(recursive=True): + db.expose( d ) + + select_exposed = lambda decl: decl.name == decl.name.upper() \ + and not isinstance( decl, declarations.member_calldef_t ) + + for x in ns.decls( select_exposed ): + self.failUnless( db.is_exposed( x ) == True ) + + db.save( os.path.join( autoconfig.build_dir, 'exposed.db.pypp' ) ) + + db2 = pypp_utils.exposed_decls_db_t(activated=True) + db2.load( os.path.join( autoconfig.build_dir, 'exposed.db.pypp' ) ) + for x in ns.decls( select_exposed ): + self.failUnless( db.is_exposed( x ) == True ) + + +def create_suite(): + suite = unittest.TestSuite() + suite.addTest( unittest.makeSuite(tester_t)) + return suite + +def run_suite(): + unittest.TextTestRunner(verbosity=2).run( create_suite() ) + +if __name__ == "__main__": + run_suite() Modified: pyplusplus_dev/unittests/test_all.py =================================================================== --- pyplusplus_dev/unittests/test_all.py 2007-08-10 20:58:25 UTC (rev 1097) +++ pyplusplus_dev/unittests/test_all.py 2007-08-12 21:55:20 UTC (rev 1098) @@ -71,6 +71,7 @@ import throw_tester import duplicate_aliases_tester import non_overridable_tester +import exposed_decls_db_tester def create_suite(times): testers = [ @@ -138,6 +139,7 @@ , throw_tester , duplicate_aliases_tester , non_overridable_tester + , exposed_decls_db_tester ] main_suite = unittest.TestSuite() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2007-08-10 20:58:26
|
Revision: 1097 http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1097&view=rev Author: roman_yakovenko Date: 2007-08-10 13:58:25 -0700 (Fri, 10 Aug 2007) Log Message: ----------- adding ability to register array class wrapper only once Modified Paths: -------------- pyplusplus_dev/pyplusplus/code_creators/array_1_registrator.py pyplusplus_dev/pyplusplus/code_repository/array_1.py pyplusplus_dev/unittests/arrays_bug_tester.py pyplusplus_dev/unittests/data/arrays_bug_to_be_exported.hpp Modified: pyplusplus_dev/pyplusplus/code_creators/array_1_registrator.py =================================================================== --- pyplusplus_dev/pyplusplus/code_creators/array_1_registrator.py 2007-08-10 20:57:07 UTC (rev 1096) +++ pyplusplus_dev/pyplusplus/code_creators/array_1_registrator.py 2007-08-10 20:58:25 UTC (rev 1097) @@ -57,8 +57,10 @@ fn_name = 'register_array_1' fn_def_tmpl_args = [ declarations.array_item_type(self.array_type).decl_string - , str( declarations.array_size(self.array_type) ) - , self.call_policies.create(self, call_policies.CREATION_POLICY.AS_TEMPLATE_ARGUMENT )] + , str( declarations.array_size(self.array_type) ) ] + if not self.call_policies.is_default(): + fn_def_tmpl_args.append( + self.call_policies.create(self, call_policies.CREATION_POLICY.AS_TEMPLATE_ARGUMENT ) ) fn_def = templates.join( '::'.join( [ns_name, fn_name] ), fn_def_tmpl_args ) return call_invocation.join( fn_def, [ '"%s"' % self._create_name() ] ) + ';' Modified: pyplusplus_dev/pyplusplus/code_repository/array_1.py =================================================================== --- pyplusplus_dev/pyplusplus/code_repository/array_1.py 2007-08-10 20:57:07 UTC (rev 1096) +++ pyplusplus_dev/pyplusplus/code_repository/array_1.py 2007-08-10 20:58:25 UTC (rev 1097) @@ -25,7 +25,10 @@ #include "boost/mpl/if.hpp" #include "boost/type_traits/is_same.hpp" #include "boost/type_traits/is_fundamental.hpp" +#include "boost/python/converter/registry.hpp" +#include <iostream> + //1 - dimension namespace pyplusplus{ namespace containers{ namespace static_sized{ @@ -50,6 +53,20 @@ }; +template<class T> +bool is_registered(){ + namespace bpl = boost::python; + bpl::handle<> class_obj( bpl::objects::registered_class_object( bpl::type_id< T >())); + return class_obj.get() ? true : false; +} + +template< class T > +void register_alias( const char* name ){ + namespace bpl = boost::python; + bpl::handle<> class_obj( bpl::objects::registered_class_object( bpl::type_id< T >())); + boost::python::scope().attr( name ) = bpl::object( class_obj ); +} + }//details template< class TItemType, long unsigned int size > @@ -124,32 +141,53 @@ }; -template< class TItemType, long unsigned int size, typename CallPolicies > -void register_const_array_1(const char* name){ - typedef const_array_1_t< TItemType, size > wrapper_t; - boost::python::class_< wrapper_t >( name, boost::python::no_init ) - .def( "__getitem__" - , &wrapper_t::item_ref - , ( boost::python::arg("index") ) - , CallPolicies() ) - .def( "__len__", &wrapper_t::len ); -} +template< class TItemType + , long unsigned int size + , typename CallPolicies=boost::python::default_call_policies > +struct register_const_array_1{ + register_const_array_1(const char* name){ + namespace bpl = boost::python; + typedef const_array_1_t< TItemType, size > wrapper_t; -template< class TItemType, long unsigned int size, typename CallPolicies > -void register_array_1(const char* name){ - typedef array_1_t< TItemType, size > wrapper_t; - boost::python::class_< wrapper_t >( name, boost::python::no_init ) - .def( "__getitem__" - , &wrapper_t::item_ref - , ( boost::python::arg("index") ) - , CallPolicies() ) - .def( "__setitem__" - , &wrapper_t::set_item - , ( boost::python::arg("index"), boost::python::arg("value") ) - , CallPolicies() ) - .def( "__len__", &wrapper_t::len ); -} + if( details::is_registered< wrapper_t >() ){ + details::register_alias< wrapper_t >( name ); + } + else{ + bpl::class_< wrapper_t >( name, bpl::no_init ) + .def( "__getitem__" + , &wrapper_t::item_ref + , ( bpl::arg("index") ) + , CallPolicies() ) + .def( "__len__", &wrapper_t::len ); + } + } +}; +template< class TItemType + , long unsigned int size + , typename CallPolicies=boost::python::default_call_policies > +struct register_array_1{ + register_array_1(const char* name){ + namespace bpl = boost::python; + typedef array_1_t< TItemType, size > wrapper_t; + if( details::is_registered< wrapper_t >() ){ + details::register_alias< wrapper_t >( name ); + } + else{ + bpl::class_< wrapper_t >( name, bpl::no_init ) + .def( "__getitem__" + , &wrapper_t::item_ref + , ( bpl::arg("index") ) + , CallPolicies() ) + .def( "__setitem__" + , &wrapper_t::set_item + , ( bpl::arg("index"), bpl::arg("value") ) + , CallPolicies() ) + .def( "__len__", &wrapper_t::len ); + } + } +}; + } /*pyplusplus*/ } /*containers*/ } /*static_sized*/ Modified: pyplusplus_dev/unittests/arrays_bug_tester.py =================================================================== --- pyplusplus_dev/unittests/arrays_bug_tester.py 2007-08-10 20:57:07 UTC (rev 1096) +++ pyplusplus_dev/unittests/arrays_bug_tester.py 2007-08-10 20:58:25 UTC (rev 1097) @@ -17,7 +17,11 @@ self , tester_t.EXTENSION_NAME , *args ) - + + def customize(self, mb ): + mb.add_registration_code( 'pyplusplus::containers::static_sized::register_array_1< int, 10 >( "X1" );' ) + mb.add_registration_code( 'pyplusplus::containers::static_sized::register_array_1< int, 10 >( "X2" );' ) + def run_tests( self, module): m = module.arrays_bug c = m.container() @@ -26,6 +30,8 @@ y = c.items[0] c.items[0] = m.item() + self.failUnless( id(module.X1) == id(module.X2) == id( c.items[0].values.__class__ ) ) + def create_suite(): suite = unittest.TestSuite() suite.addTest( unittest.makeSuite(tester_t)) Modified: pyplusplus_dev/unittests/data/arrays_bug_to_be_exported.hpp =================================================================== --- pyplusplus_dev/unittests/data/arrays_bug_to_be_exported.hpp 2007-08-10 20:57:07 UTC (rev 1096) +++ pyplusplus_dev/unittests/data/arrays_bug_to_be_exported.hpp 2007-08-10 20:58:25 UTC (rev 1097) @@ -12,6 +12,11 @@ struct container{ item items[10]; }; +struct const_item{ const int values[10]; }; + +struct const_container{ const const_item items[10]; }; + + }; #endif//__arrays_bug_to_be_exported_hpp__ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2007-08-10 20:57:07
|
Revision: 1096 http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1096&view=rev Author: roman_yakovenko Date: 2007-08-10 13:57:07 -0700 (Fri, 10 Aug 2007) Log Message: ----------- adding new user Modified Paths: -------------- pyplusplus_dev/docs/quotes.rest Modified: pyplusplus_dev/docs/quotes.rest =================================================================== --- pyplusplus_dev/docs/quotes.rest 2007-08-10 17:08:23 UTC (rev 1095) +++ pyplusplus_dev/docs/quotes.rest 2007-08-10 20:57:07 UTC (rev 1096) @@ -94,6 +94,24 @@ You can download the bindings from https://sourceforge.net/project/showfiles.php?group_id=118209 . +* European Space Agency - `ReSP`_ project + + `ReSP`_ is an Open-Source hardware simulation platform targeted for + multiprocessor systems. ReSP will provide a framework for composing a + system by connecting components chosen from a given repository or + developped by the designer. ReSP will provide also also a framework for + fault injection campaigns for the analysis of the reliability level of the + system. + + `ReSP`_ engineers are developping the simulator core in Python language for exploiting + reflective capabilities (missing in a pure C++ environment) that can be + exploited for connecting components in a dynamic way and for enabling + non-intrusive fault injection activity. Components will be described in + SystemC and TLM libraries that are high level hardware description + languages based on C++. + + .. _`ReSP` : http://www.esa.int/TEC/Microelectronics/ + .. _`Py++` : ./pyplusplus.html .. _`Python Computer Graphics Kit` : http://cgkit.sourceforge.net/ .. _`TnFOX`: http://www.nedprod.com/TnFOX/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2007-08-10 17:08:21
|
Revision: 1095 http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1095&view=rev Author: roman_yakovenko Date: 2007-08-10 10:08:23 -0700 (Fri, 10 Aug 2007) Log Message: ----------- small bug fix Modified Paths: -------------- pyplusplus_dev/pyplusplus/file_writers/writer.py Modified: pyplusplus_dev/pyplusplus/file_writers/writer.py =================================================================== --- pyplusplus_dev/pyplusplus/file_writers/writer.py 2007-08-09 06:08:01 UTC (rev 1094) +++ pyplusplus_dev/pyplusplus/file_writers/writer.py 2007-08-10 17:08:23 UTC (rev 1095) @@ -123,7 +123,7 @@ writer_t.create_backup( fpath ) f = codecs.open( fpath, 'w+b', encoding ) - f.write( fcontent_new, encoding ) + f.write( fcontent_new ) f.close() if new_hash_value: files_sum_repository.update_value( fname, new_hash_value ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2007-08-09 06:08:02
|
Revision: 1094 http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1094&view=rev Author: roman_yakovenko Date: 2007-08-08 23:08:01 -0700 (Wed, 08 Aug 2007) Log Message: ----------- updating gccxml installer Modified Paths: -------------- installers/config.py installers/install_gccxml.py Modified: installers/config.py =================================================================== --- installers/config.py 2007-08-07 19:24:02 UTC (rev 1093) +++ installers/config.py 2007-08-09 06:08:01 UTC (rev 1094) @@ -17,8 +17,8 @@ unzip = None gccxml_cvs_dir = None - cmake_windows = 'cmake-2.4.6-win32-x86.zip' - cmake_linux = 'cmake-2.4.6-Linux-i386.tar.gz' + cmake_windows = 'cmake-2.4.7-win32-x86.zip' + cmake_linux = 'cmake-2.4.7-Linux-i386.tar.gz' if 'win32' == sys.platform: gccxml_cvs_dir = r'D:\dev\gccxml_cvs\gccxml' unzip = 'unzip -d $target_dir $archive' #command line to run in order to unzip the file Modified: installers/install_gccxml.py =================================================================== --- installers/install_gccxml.py 2007-08-07 19:24:02 UTC (rev 1093) +++ installers/install_gccxml.py 2007-08-09 06:08:01 UTC (rev 1094) @@ -24,9 +24,12 @@ utils.logger.info( 'GCC_XML build directory "%s" already exists' % build_dir ) if os.path.exists( config.gccxml_install_dir ): - utils.rmtree_safe( config.gccxml_install_dir ) + if os.listdir( config.gccxml_install_dir ) \ + and 'gccxml' not in os.path.split( config.gccxml_install_dir )[1].lower(): + utils.logger.info( "GCC_XML install directory '%s' already exists." % config.gccxml_install_dir) + config.gccxml_install_dir = os.path.join( config.gccxml_install_dir, 'gccxml' ) else: - utils.logger.info( 'GCC_XML install directory "%s" already exists' % config.gccxml_install_dir) + utils.logger.info( "GCC_XML install directory '%s' doesn't exist" % config.gccxml_install_dir) os.chdir( build_dir ) cmake = os.path.join( working_dir @@ -90,7 +93,11 @@ gccxml_cvs_dir_name = os.path.splitext( config.archives.gccxml )[0] gccxml_cvs_dir_path = os.path.join( working_dir, gccxml_cvs_dir_name ) + utils.logger.info( 'coping gccxml directory ' ) + if os.path.realpath( config.setup_builder.gccxml_cvs_dir ) \ + != os.path.realpath( gccxml_cvs_dir_path ): + utils.rmtree_safe( gccxml_cvs_dir_path ) shutil.copytree( config.setup_builder.gccxml_cvs_dir, gccxml_cvs_dir_path ) utils.logger.info( 'coping gccxml directory - done' ) #TODO: remove cvs files from the directory This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2007-08-07 19:24:04
|
Revision: 1093 http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1093&view=rev Author: roman_yakovenko Date: 2007-08-07 12:24:02 -0700 (Tue, 07 Aug 2007) Log Message: ----------- improving unicode support Modified Paths: -------------- pyplusplus_dev/pyplusplus/file_writers/writer.py Modified: pyplusplus_dev/pyplusplus/file_writers/writer.py =================================================================== --- pyplusplus_dev/pyplusplus/file_writers/writer.py 2007-08-03 18:52:33 UTC (rev 1092) +++ pyplusplus_dev/pyplusplus/file_writers/writer.py 2007-08-07 19:24:02 UTC (rev 1093) @@ -94,7 +94,8 @@ fcontent_new.append( content ) fcontent_new.append( os.linesep ) #keep gcc happy fcontent_new = ''.join( fcontent_new ) - fcontent_new = unicode( fcontent_new, encoding ) + if not isinstance( fcontent_new, unicode ): + fcontent_new = unicode( fcontent_new, encoding ) new_hash_value = None curr_hash_value = None This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2007-08-03 18:52:30
|
Revision: 1092 http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1092&view=rev Author: roman_yakovenko Date: 2007-08-03 11:52:33 -0700 (Fri, 03 Aug 2007) Log Message: ----------- improving unicode support Modified Paths: -------------- pyplusplus_dev/pyplusplus/file_writers/writer.py Modified: pyplusplus_dev/pyplusplus/file_writers/writer.py =================================================================== --- pyplusplus_dev/pyplusplus/file_writers/writer.py 2007-07-28 18:08:24 UTC (rev 1091) +++ pyplusplus_dev/pyplusplus/file_writers/writer.py 2007-08-03 18:52:33 UTC (rev 1092) @@ -94,6 +94,7 @@ fcontent_new.append( content ) fcontent_new.append( os.linesep ) #keep gcc happy fcontent_new = ''.join( fcontent_new ) + fcontent_new = unicode( fcontent_new, encoding ) new_hash_value = None curr_hash_value = None @@ -105,7 +106,7 @@ % ( time.clock() - start_time ) ) return - if os.path.exists( fpath ) and None is curr_hash_value: + if None is curr_hash_value and os.path.exists( fpath ): #It could be a first time the user uses files_sum_repository, don't force him #to recompile the code #small optimization to cut down compilation time @@ -121,7 +122,7 @@ writer_t.create_backup( fpath ) f = codecs.open( fpath, 'w+b', encoding ) - f.write( unicode( fcontent_new, encoding ) ) + f.write( fcontent_new, encoding ) f.close() if new_hash_value: files_sum_repository.update_value( fname, new_hash_value ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2007-07-28 18:08:21
|
Revision: 1091 http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1091&view=rev Author: roman_yakovenko Date: 2007-07-28 11:08:24 -0700 (Sat, 28 Jul 2007) Log Message: ----------- adding FT for constructor as comments Modified Paths: -------------- pyplusplus_dev/pyplusplus/module_creator/creator.py Modified: pyplusplus_dev/pyplusplus/module_creator/creator.py =================================================================== --- pyplusplus_dev/pyplusplus/module_creator/creator.py 2007-07-28 18:04:26 UTC (rev 1090) +++ pyplusplus_dev/pyplusplus/module_creator/creator.py 2007-07-28 18:08:24 UTC (rev 1091) @@ -389,6 +389,21 @@ class_wrapper = self.curr_code_creator.wrapper cwrapper = code_creators.constructor_wrapper_t( constructor=self.curr_decl ) class_wrapper.adopt_creator( cwrapper ) +#TODO: FT for constructor + #~ if self.curr_decl.transformations: + #~ cwrapper = code_creators.constructor_transformed_wrapper_t( constructor=self.curr_decl ) + #~ class_wrapper.adopt_creator( cwrapper ) + #~ else: + #~ if self.curr_decl.transformations: + #~ cwrapper = code_creators.constructor_transformed_wrapper_t( constructor=self.curr_decl ) + #~ class_wrapper.adopt_creator( cwrapper ) + #~ self.__module_body.adopt_creator( cwrapper ) + #~ self.curr_code_creator.associated_decl_creators.append( cwrapper ) + + #~ maker = None + #~ if self.curr_decl.transformations: + #~ maker = code_creators.constructor_transformed_t( constructor=self.curr_decl ) + #~ else: maker = code_creators.constructor_t( constructor=self.curr_decl, wrapper=cwrapper ) if None is self.curr_decl.call_policies: self.curr_decl.call_policies = self.__call_policies_resolver( self.curr_decl ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2007-07-28 18:04:23
|
Revision: 1090 http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1090&view=rev Author: roman_yakovenko Date: 2007-07-28 11:04:26 -0700 (Sat, 28 Jul 2007) Log Message: ----------- adding FT for constructor as comments Modified Paths: -------------- pyplusplus_dev/pyplusplus/code_creators/__init__.py pyplusplus_dev/pyplusplus/code_creators/calldef_transformed.py Modified: pyplusplus_dev/pyplusplus/code_creators/__init__.py =================================================================== --- pyplusplus_dev/pyplusplus/code_creators/__init__.py 2007-07-28 17:59:35 UTC (rev 1089) +++ pyplusplus_dev/pyplusplus/code_creators/__init__.py 2007-07-28 18:04:26 UTC (rev 1090) @@ -82,7 +82,11 @@ from calldef_transformed import free_fun_transformed_wrapper_t from calldef_transformed import mem_fun_v_transformed_t from calldef_transformed import mem_fun_v_transformed_wrapper_t +#TODO: FT for constructor +#~ from calldef_transformed import constructor_transformed_t +#~ from calldef_transformed import constructor_transformed_wrapper_t + from global_variable import global_variable_base_t from global_variable import global_variable_t from global_variable import array_gv_t Modified: pyplusplus_dev/pyplusplus/code_creators/calldef_transformed.py =================================================================== --- pyplusplus_dev/pyplusplus/code_creators/calldef_transformed.py 2007-07-28 17:59:35 UTC (rev 1089) +++ pyplusplus_dev/pyplusplus/code_creators/calldef_transformed.py 2007-07-28 18:04:26 UTC (rev 1090) @@ -421,3 +421,80 @@ files = super( mem_fun_v_transformed_wrapper_t, self )._get_system_headers_impl() files.append( code_repository.convenience.file_name ) return files + + +class constructor_transformed_t( calldef_t ): + def __init__( self, constructor, wrapper=None ): + calldef_t.__init__( self, function=constructor, wrapper=wrapper ) + + @property + def ft( self ): #function transformation + return self.declaration.transformations[0] + + @property + def controller( self ): + return self.ft.controller + + def create_call_policies( self ): + return '' + + def _create_impl( self ): + make_constructor = algorithm.create_identifier( self, 'boost::python::make_constructor' ) + + code = 'def( "__init__, %s( &::%s ) )' % self.wrapper.wrapper_name() + if not self.works_on_instance: + code = self.parent.class_var_name + '.' + code + ';' + return code + +#TODO: FT for constructor +#~ class constructor_transformed_wrapper_t( calldef_wrapper_t ): + #~ def __init__( self, constructor ): + #~ calldef_wrapper_t.__init__( self, function=constructor ) + + #~ @property + #~ def ft( self ): #function transformation + #~ return self.declaration.transformations[0] + + #~ @property + #~ def controller( self ): + #~ return self.ft.controller + + #~ def resolve_function_ref( self ): + #~ raise NotImplementedError() + + #~ def wrapper_name( self ): + #~ return self.ft.unique_name() + + #~ def create_fun_definition(self): + #~ cntrl = self.controller + + #~ tmpl_values = dict() + + #~ tmpl_values['unique_function_name'] = self.wrapper_name() + #~ tmpl_values['exposed_class'] = self.decl_identifier + #~ tmpl_values['arg_declarations'] = self.args_declaration() + #~ tmpl_values['result'] = self.ft.result_variable + + #~ tmpl_values['declare_variables'] \ + #~ = os.linesep + os.linesep.join( map( lambda var: self.indent( var.declare_var_string() ) + #~ , cntrl.variables ) ) + + #~ tmpl_values['pre_call'] = os.linesep + self.indent( os.linesep.join( cntrl.pre_call ) ) + + #~ tmpl_values['arg_expressions'] = self.PARAM_SEPARATOR.join( cntrl.arg_expressions ) + #~ return_stmt_creator = calldef_utils.return_stmt_creator_t( self + #~ , self.controller + #~ , self.controller.result_variable + #~ , self.controller.return_variables ) + + #~ tmpl_values['post_call'] = os.linesep + self.indent( os.linesep.join( cntrl.post_call ) ) + #~ if return_stmt_creator.pre_return_code: + #~ tmpl_values['post_call'] \ + #~ = os.linesep.join([ tmpl_values['post_call'] + #~ , self.indent( return_stmt_creator.pre_return_code )]) + + #~ f_def = self.controller.template.substitute(tmpl_values) + #~ return remove_duplicate_linesep( f_def ) + + #~ def _create_impl(self): + #~ return self.create_fun_definition() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2007-07-28 17:59:32
|
Revision: 1089 http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1089&view=rev Author: roman_yakovenko Date: 2007-07-28 10:59:35 -0700 (Sat, 28 Jul 2007) Log Message: ----------- adding FT for constructor as comments Modified Paths: -------------- pyplusplus_dev/pyplusplus/function_transformers/controllers.py pyplusplus_dev/pyplusplus/function_transformers/templates.py pyplusplus_dev/pyplusplus/function_transformers/transformer.py pyplusplus_dev/pyplusplus/function_transformers/transformers.py Modified: pyplusplus_dev/pyplusplus/function_transformers/controllers.py =================================================================== --- pyplusplus_dev/pyplusplus/function_transformers/controllers.py 2007-07-28 17:55:06 UTC (rev 1088) +++ pyplusplus_dev/pyplusplus/function_transformers/controllers.py 2007-07-28 17:59:35 UTC (rev 1089) @@ -336,3 +336,80 @@ @property def default_controller( self ): return self.__default_cntrl + + +#TODO: FT for constructor + +#~ class constructor_controller_t( controller_base_t ): + #~ def __init__( self, function ): + #~ controller_base_t.__init__( self, function ) + #~ self.__vars_manager = create_variables_manager( function ) + #~ self.__wrapper_args = [ arg.clone() for arg in function.arguments ] + #~ self.__result_var = variable_t( self.wrapper_return_type + #~ , self.register_variable_name( 'result' ) ) + #~ self.__pre_call = [] + #~ self.__post_call = [] + #~ self.__arg_expressions = [ arg.name for arg in function.arguments ] + + #~ @property + #~ def variables( self ): + #~ return self.__vars_manager.variables + + #~ def declare_variable( self, type, name, initialize_expr='' ): + #~ return self.__vars_manager.declare_variable( type, name, initialize_expr) + + #~ def register_variable_name( self, name ): + #~ return self.__vars_manager.register_name( name ) + + #~ @property + #~ def result_variable( self ): + #~ return self.__result_var + + #~ @property + #~ def template( self ): + #~ return templates.constructor.body + + #~ @property + #~ def wrapper_args( self ): + #~ return filter( None, self.__wrapper_args ) + + #~ def find_wrapper_arg( self, name ): + #~ for arg in self.wrapper_args: + #~ if arg.name == name: + #~ return arg + #~ return None + + #~ def remove_wrapper_arg( self, name ): + #~ arg = self.find_wrapper_arg( name ) + #~ if not arg: + #~ raise LookupError( "Unable to remove '%s' argument - not found!" % name ) + #~ self.__wrapper_args[ self.__wrapper_args.index(arg) ] = None + + #~ @property + #~ def arg_expressions( self ): + #~ return self.__arg_expressions + + #~ def modify_arg_expression( self, index, expression ): + #~ self.arg_expressions[ index ] = expression + + #~ @property + #~ def wrapper_return_type( self ): + #~ return declarations.dummy_type_t( 'std::auto_ptr< %s >' % self.function.parent.decl_string ) + + #~ @property + #~ def pre_call( self ): + #~ return self.__pre_call + + #~ def add_pre_call_code( self, code ): + #~ self.__pre_call.append( code ) + + #~ @property + #~ def post_call( self ): + #~ return self.__post_call + + #~ def add_post_call_code( self, code ): + #~ self.__post_call.append( code ) + + #~ def apply( self, transformations ): + #~ map( lambda t: t.configure_mem_fun( self ), transformations ) + Modified: pyplusplus_dev/pyplusplus/function_transformers/templates.py =================================================================== --- pyplusplus_dev/pyplusplus/function_transformers/templates.py 2007-07-28 17:55:06 UTC (rev 1088) +++ pyplusplus_dev/pyplusplus/function_transformers/templates.py 2007-07-28 17:59:35 UTC (rev 1089) @@ -55,7 +55,21 @@ , '}' ])) +#TODO: FT for constructor +#~ class constructor: + #~ #User cannot apply transformation on constructor of abstract class + #~ #It is not possible to create an instance of such class + #~ body = Template( os.linesep.join([ + #~ 'std::auto_ptr<$exposed_class> $unique_function_name( $arg_declarations ){' + #~ , ' $declare_variables' + #~ , ' $pre_call' + #~ , ' std::auto_ptr<$exposed_class> $result( new $exposed_class($arg_expressions) );' + #~ , ' $post_call' + #~ , ' return $result;' + #~ , '}' + #~ ])) + def substitute( text, **keywd ): return Template( text ).substitute( **keywd ) Modified: pyplusplus_dev/pyplusplus/function_transformers/transformer.py =================================================================== --- pyplusplus_dev/pyplusplus/function_transformers/transformer.py 2007-07-28 17:55:06 UTC (rev 1088) +++ pyplusplus_dev/pyplusplus/function_transformers/transformer.py 2007-07-28 17:59:35 UTC (rev 1089) @@ -64,7 +64,7 @@ @param controller: instance of L{mem_fun_controller_t} class """ - pass + raise NotImplementedError(self.__class__.__name__) def configure_free_fun( self, controller ): """Transformers should overridde the method, in order to define custom @@ -72,7 +72,7 @@ @param controller: instance of L{free_fun_controller_t} class """ - pass + raise NotImplementedError(self.__class__.__name__) def configure_virtual_mem_fun( self, controller ): """Transformers should overridde the method, in order to define custom @@ -80,5 +80,14 @@ @param controller: instance of L{virtual_mem_fun_controller_t} class """ - pass + raise NotImplementedError(self.__class__.__name__) + +#TODO: FT for constructor + #~ def configure_constructor( self, controller ): + #~ """Transformers should overridde the method, in order to define custom + #~ transformation for constructor. + #~ @param controller: instance of L{constructor_controller_t} class + #~ """ + #~ raise NotImplementedError(self.__class__.__name__) + Modified: pyplusplus_dev/pyplusplus/function_transformers/transformers.py =================================================================== --- pyplusplus_dev/pyplusplus/function_transformers/transformers.py 2007-07-28 17:55:06 UTC (rev 1088) +++ pyplusplus_dev/pyplusplus/function_transformers/transformers.py 2007-07-28 17:59:35 UTC (rev 1089) @@ -535,7 +535,11 @@ self.__configure_sealed( controller ) def configure_virtual_mem_fun( self, controller ): - raise NotImplementedError() + raise NotImplementedError(self.__class__.__name__) + +#TODO: FT for constructor + #~ def configure_constructor( self, controller ): + #~ self.__configure_sealed( controller ) def required_headers( self ): """Returns list of header files that transformer generated code depends on.""" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2007-07-28 17:55:04
|
Revision: 1088 http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1088&view=rev Author: roman_yakovenko Date: 2007-07-28 10:55:06 -0700 (Sat, 28 Jul 2007) Log Message: ----------- adding new test case Modified Paths: -------------- pyplusplus_dev/unittests/split_module_tester.py Modified: pyplusplus_dev/unittests/split_module_tester.py =================================================================== --- pyplusplus_dev/unittests/split_module_tester.py 2007-07-28 17:52:45 UTC (rev 1087) +++ pyplusplus_dev/unittests/split_module_tester.py 2007-07-28 17:55:06 UTC (rev 1088) @@ -19,6 +19,7 @@ fundamental_tester_base.fundamental_tester_base_t.__init__( self , tester_t.EXTENSION_NAME + , indexing_suite_version=2 , *args ) self.files = [] @@ -41,6 +42,7 @@ nested = item.class_( 'nested_t' ) nested.add_declaration_code( '//hello nested decl' ) nested.add_registration_code( '//hello nested reg', False ) + mb.free_fun( 'create_empty_mapping' ).include() def generate_source_files( self, mb ): files = mb.split_module( autoconfig.build_dir, on_unused_file_found=lambda fpath: fpath ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2007-07-28 17:52:43
|
Revision: 1087 http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1087&view=rev Author: roman_yakovenko Date: 2007-07-28 10:52:45 -0700 (Sat, 28 Jul 2007) Log Message: ----------- fadding new test cases Modified Paths: -------------- pyplusplus_dev/unittests/member_variables_tester.py Modified: pyplusplus_dev/unittests/member_variables_tester.py =================================================================== --- pyplusplus_dev/unittests/member_variables_tester.py 2007-07-28 17:47:53 UTC (rev 1086) +++ pyplusplus_dev/unittests/member_variables_tester.py 2007-07-28 17:52:45 UTC (rev 1087) @@ -74,16 +74,12 @@ self.failUnless( tree.left ) self.failUnless( tree.left.data.value == 1 ) - try: - tree.right = module.create_tree() - self.failUnless( 'Attribute error exception should be raised!' ) - except AttributeError: - pass - #self.failUnless( tree.right.parent is None ) - #self.failUnless( tree.right.data.value == 0 ) - #self.failUnless( tree.right.right is None ) - #self.failUnless( tree.right.left ) - #self.failUnless( tree.right.left.data.value == 1 ) + tree.right = module.create_tree() + self.failUnless( tree.right.parent is None ) + self.failUnless( tree.right.data.value == 0 ) + self.failUnless( tree.right.right is None ) + self.failUnless( tree.right.left ) + self.failUnless( tree.right.left.data.value == 1 ) mem_var_str = module.mem_var_str_t() mem_var_str.identity( module.mem_var_str_t.class_name ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2007-07-28 17:47:54
|
Revision: 1086 http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1086&view=rev Author: roman_yakovenko Date: 2007-07-28 10:47:53 -0700 (Sat, 28 Jul 2007) Log Message: ----------- adding new test case for "constructor transformation" Added Paths: ----------- pyplusplus_dev/unittests/data/ft_constructor_to_be_exported.hpp Added: pyplusplus_dev/unittests/data/ft_constructor_to_be_exported.hpp =================================================================== --- pyplusplus_dev/unittests/data/ft_constructor_to_be_exported.hpp (rev 0) +++ pyplusplus_dev/unittests/data/ft_constructor_to_be_exported.hpp 2007-07-28 17:47:53 UTC (rev 1086) @@ -0,0 +1,37 @@ +// Copyright 2004 Roman Yakovenko. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef __ft_constructor_to_be_exported_hpp__ +#define __ft_constructor_to_be_exported_hpp__ + +#include "boost/noncopyable.hpp" + +namespace ft_constructor{ + +struct resources_t{ + resources_t(){ + std::cout << "created"; + } + ~resources_t(){ + std::cout << "destroyed"; + } +}; + +struct holder_t : public boost::noncopyable{ + holder_t(resources_t* r=0) + : resource( r ) + {} + + ~holder_t(){ delete resource; } + + const resources_t* get_resource() const { return resource; } + +private: + resources_t* resource; +}; + +} + +#endif//__ft_constructor_to_be_exported_hpp__ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2007-07-28 17:46:01
|
Revision: 1085 http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1085&view=rev Author: roman_yakovenko Date: 2007-07-28 10:46:02 -0700 (Sat, 28 Jul 2007) Log Message: ----------- adding new test case Modified Paths: -------------- pyplusplus_dev/unittests/data/split_module_to_be_exported.hpp Modified: pyplusplus_dev/unittests/data/split_module_to_be_exported.hpp =================================================================== --- pyplusplus_dev/unittests/data/split_module_to_be_exported.hpp 2007-07-09 06:03:16 UTC (rev 1084) +++ pyplusplus_dev/unittests/data/split_module_to_be_exported.hpp 2007-07-28 17:46:02 UTC (rev 1085) @@ -6,6 +6,11 @@ #ifndef __split_module_to_be_exported_hpp__ #define __split_module_to_be_exported_hpp__ +#include "boost/shared_ptr.hpp" +//#include BOOST_HASH_MAP_HEADER +#include <map> +#include <string> + namespace split_module{ struct op_struct{}; @@ -37,7 +42,14 @@ struct nested_t{}; }; + +//typedef BOOST_STD_EXTENSION_NAMESPACE::hash_map< std::string, boost::shared_ptr< item_t > > str2item_t; +typedef std::map< std::string, boost::shared_ptr< item_t > > str2item_t; +inline str2item_t create_empty_mapping(){ + return str2item_t(); } +} + #endif//__split_module_to_be_exported_hpp__ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2007-07-09 06:03:15
|
Revision: 1084 http://svn.sourceforge.net/pygccxml/?rev=1084&view=rev Author: roman_yakovenko Date: 2007-07-08 23:03:16 -0700 (Sun, 08 Jul 2007) Log Message: ----------- adding new "final class" test case Added Paths: ----------- pyplusplus_dev/unittests/data/final_classes_to_be_exported.hpp pyplusplus_dev/unittests/final_classes_tester.py Added: pyplusplus_dev/unittests/data/final_classes_to_be_exported.hpp =================================================================== --- pyplusplus_dev/unittests/data/final_classes_to_be_exported.hpp (rev 0) +++ pyplusplus_dev/unittests/data/final_classes_to_be_exported.hpp 2007-07-09 06:03:16 UTC (rev 1084) @@ -0,0 +1,24 @@ +// Copyright 2004 Roman Yakovenko. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef __final_classes_to_be_exported_hpp__ +#define __final_classes_to_be_exported_hpp__ + +#include <string> + +namespace final_classes{ + +class Foo{ +public: + virtual void bar() {} +private: + Foo() {} +}; + + +} + +#endif//__final_classes_to_be_exported_hpp__ + Added: pyplusplus_dev/unittests/final_classes_tester.py =================================================================== --- pyplusplus_dev/unittests/final_classes_tester.py (rev 0) +++ pyplusplus_dev/unittests/final_classes_tester.py 2007-07-09 06:03:16 UTC (rev 1084) @@ -0,0 +1,38 @@ +# Copyright 2004 Roman Yakovenko. +# Distributed under the Boost Software License, Version 1.0. (See +# accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +import os +import sys +import unittest +import fundamental_tester_base +from pygccxml import declarations +from pyplusplus.module_builder import call_policies + +class tester_t(fundamental_tester_base.fundamental_tester_base_t): + EXTENSION_NAME = 'final_classes' + + def __init__( self, *args ): + fundamental_tester_base.fundamental_tester_base_t.__init__( + self + , tester_t.EXTENSION_NAME + , *args ) + + def customize(self, mb ): + mb.namespace( 'final_classes' ).include() + mb.mem_fun('bar').virtuality = declarations.FUNCTION_VIRTUALITY_TYPES.NOT_VIRTUAL + + def run_tests(self, module): + pass + +def create_suite(): + suite = unittest.TestSuite() + suite.addTest( unittest.makeSuite(tester_t)) + return suite + +def run_suite(): + unittest.TextTestRunner(verbosity=2).run( create_suite() ) + +if __name__ == "__main__": + run_suite() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |