[pygccxml-commit] SF.net SVN: pygccxml: [1081] pyplusplus_dev
Brought to you by:
mbaas,
roman_yakovenko
|
From: <rom...@us...> - 2007-06-24 05:55:30
|
Revision: 1081
http://svn.sourceforge.net/pygccxml/?rev=1081&view=rev
Author: roman_yakovenko
Date: 2007-06-23 22:55:32 -0700 (Sat, 23 Jun 2007)
Log Message:
-----------
bug fix: any type could also be used as exception modifier in throw statement, in function definition
Modified Paths:
--------------
pyplusplus_dev/pyplusplus/__init__.py
pyplusplus_dev/pyplusplus/code_creators/calldef.py
pyplusplus_dev/pyplusplus/decl_wrappers/class_wrapper.py
pyplusplus_dev/pyplusplus/decl_wrappers/indexing_suite1.py
pyplusplus_dev/pyplusplus/decl_wrappers/indexing_suite2.py
pyplusplus_dev/unittests/indexing_suites2_tester.py
Modified: pyplusplus_dev/pyplusplus/__init__.py
===================================================================
--- pyplusplus_dev/pyplusplus/__init__.py 2007-06-24 05:16:11 UTC (rev 1080)
+++ pyplusplus_dev/pyplusplus/__init__.py 2007-06-24 05:55:32 UTC (rev 1081)
@@ -37,7 +37,7 @@
__version__ = '0.9.0'
import pygccxml
-if not hasattr( pygccxml, '__revision__' ) or pygccxml.__revision__ < 1053:
+if not hasattr( pygccxml, '__revision__' ) or pygccxml.__revision__ < 1080:
msg = 'This revision of Py++ requieres pygccxml revision to be ' \
'greater or equal to %d. ' \
'Please install right pygccxml version.'
Modified: pyplusplus_dev/pyplusplus/code_creators/calldef.py
===================================================================
--- pyplusplus_dev/pyplusplus/code_creators/calldef.py 2007-06-24 05:16:11 UTC (rev 1080)
+++ pyplusplus_dev/pyplusplus/code_creators/calldef.py 2007-06-24 05:55:32 UTC (rev 1081)
@@ -168,8 +168,7 @@
if not self.declaration.exceptions:
return ''
else:
- exceptions = map( lambda exception:
- algorithm.create_identifier( self, declarations.full_name( exception ) )
+ exceptions = map( lambda exception: algorithm.create_identifier( self, exception.decl_string )
, self.declaration.exceptions )
return ' throw( ' + self.PARAM_SEPARATOR.join( exceptions ) + ' )'
else:
Modified: pyplusplus_dev/pyplusplus/decl_wrappers/class_wrapper.py
===================================================================
--- pyplusplus_dev/pyplusplus/decl_wrappers/class_wrapper.py 2007-06-24 05:16:11 UTC (rev 1080)
+++ pyplusplus_dev/pyplusplus/decl_wrappers/class_wrapper.py 2007-06-24 05:55:32 UTC (rev 1081)
@@ -74,19 +74,19 @@
indexing_suite_version = property( _get_indexing_suite_version, _set_indexing_suite_version
, doc="indexing suite version")
- def _get_indexing_suite( self ):
+ @property
+ def indexing_suite( self ):
+ """reference to indexing suite configuration class.
+
+ If the class is not STD container, this property will contain None"
+ """
if self._indexing_suite is None:
- for container_traits in declarations.all_container_traits:
- if container_traits.is_my_case( self ):
- if self._isuite_version == 1:
- self._indexing_suite = isuite1.indexing_suite1_t( self, container_traits )
- else:
- self._indexing_suite = isuite2.indexing_suite2_t( self, container_traits )
- break
+ if self.container_traits:
+ if self._isuite_version == 1:
+ self._indexing_suite = isuite1.indexing_suite1_t( self )
+ else:
+ self._indexing_suite = isuite2.indexing_suite2_t( self )
return self._indexing_suite
- indexing_suite = property( _get_indexing_suite
- , doc="reference to indexing suite configuration class. " \
- +"If the class is not STD container, returns None")
def guess_always_expose_using_scope_value( self ):
if isinstance( self.indexing_suite, isuite2.indexing_suite2_t ) \
Modified: pyplusplus_dev/pyplusplus/decl_wrappers/indexing_suite1.py
===================================================================
--- pyplusplus_dev/pyplusplus/decl_wrappers/indexing_suite1.py 2007-06-24 05:16:11 UTC (rev 1080)
+++ pyplusplus_dev/pyplusplus/decl_wrappers/indexing_suite1.py 2007-06-24 05:55:32 UTC (rev 1081)
@@ -24,12 +24,11 @@
indexing suite.
"""
- def __init__( self, container_class, container_traits, no_proxy=None, derived_policies=None ):
+ def __init__( self, container_class, no_proxy=None, derived_policies=None ):
object.__init__( self )
self.__no_proxy = no_proxy
self.__derived_policies = derived_policies
self.__container_class = container_class
- self.__container_traits = container_traits
self.__include_files = None
@property
@@ -40,12 +39,12 @@
@property
def element_type(self):
"""reference to container value_type( mapped_type ) type"""
- return self.__container_traits.element_type( self.container_class )
+ return self.container_class.container_traits.element_type( self.container_class )
@property
def container_traits( self ):
"reference to container traits. See pygccxml documentation for more information."
- return self.__container_traits
+ return self.container_class.container_traits
def _get_no_proxy( self ):
if self.__no_proxy is None:
Modified: pyplusplus_dev/pyplusplus/decl_wrappers/indexing_suite2.py
===================================================================
--- pyplusplus_dev/pyplusplus/decl_wrappers/indexing_suite2.py 2007-06-24 05:16:11 UTC (rev 1080)
+++ pyplusplus_dev/pyplusplus/decl_wrappers/indexing_suite2.py 2007-06-24 05:55:32 UTC (rev 1081)
@@ -66,11 +66,10 @@
, 'insert' : ( 'method_append', 'method_insert', 'method_extend' )
}
- def __init__( self, container_class, container_traits ):
+ def __init__( self, container_class ):
object.__init__( self )
self.__call_policies = None
self.__container_class = container_class
- self.__container_traits = container_traits
self._disabled_methods = set()
self._disabled_groups = set()
self._default_applied = False
@@ -83,22 +82,21 @@
self._use_container_suite = value
use_container_suite = property( get_use_container_suite, set_use_container_suite )
- def _get_container_class( self ):
+ @property
+ def container_class( self ):
+ """reference to the parent( STD container ) class"""
return self.__container_class
- container_class = property( _get_container_class
- , doc="Reference to STD container class" )
- def _get_container_traits( self ):
- return self.__container_traits
- container_traits = property( _get_container_traits
- , doc="Reference to container traits. See "
- "pygccxml documentation for STD container traits.")
+ @property
+ def element_type(self):
+ """reference to container value_type( mapped_type ) type"""
+ return self.container_traits.element_type( self.container_class )
+
+ @property
+ def container_traits( self ):
+ "reference to container traits. See pygccxml documentation for more information."
+ return self.container_class.container_traits
- def _get_element_type(self):
- return self.__container_traits.element_type( self.container_class )
- element_type = property( _get_element_type
- , doc="Reference to container value_type( mapped_type ) type" )
-
def _get_call_policies( self ):
if self.__call_policies:
return self.__call_policies
Modified: pyplusplus_dev/unittests/indexing_suites2_tester.py
===================================================================
--- pyplusplus_dev/unittests/indexing_suites2_tester.py 2007-06-24 05:16:11 UTC (rev 1080)
+++ pyplusplus_dev/unittests/indexing_suites2_tester.py 2007-06-24 05:55:32 UTC (rev 1081)
@@ -54,8 +54,8 @@
self.failUnless( kv.key == "x" and kv.value == "y" )
for k, v in name2value:
self.failUnless( k == "x" and v == "y" )
- for k, v in name2value.iteritems():
- self.failUnless( k == "x" and v == "y" )
+ #~ for k, v in name2value.iteritems():
+ #~ self.failUnless( k == "x" and v == "y" )
items_ptr = module.items_ptr_t()
items_ptr.append( item )
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|