Revision: 410
Author: roman_yakovenko
Date: 2006-08-16 01:43:25 -0700 (Wed, 16 Aug 2006)
ViewCVS: http://svn.sourceforge.net/pygccxml/?rev=410&view=rev
Log Message:
-----------
fixing bug related to indexing suite v2
Modified Paths:
--------------
pyplusplus_dev/pyplusplus/decl_wrappers/class_wrapper.py
Modified: pyplusplus_dev/pyplusplus/decl_wrappers/class_wrapper.py
===================================================================
--- pyplusplus_dev/pyplusplus/decl_wrappers/class_wrapper.py 2006-08-16 08:41:53 UTC (rev 409)
+++ pyplusplus_dev/pyplusplus/decl_wrappers/class_wrapper.py 2006-08-16 08:43:25 UTC (rev 410)
@@ -18,20 +18,22 @@
self._equality_comparable = None
self._less_than_comparable = None
self._isuite_version = 1
-
+
def _get_indexing_suite_version( self ):
return self._isuite_version
def _set_indexing_suite_version( self, version ):
assert version in ( 1, 2 )
- self._isuite_version = version
+ if self._isuite_version != version:
+ self._isuite_version = version
+ self._indexing_suite = None
indexing_suite_version = property( _get_indexing_suite_version, _set_indexing_suite_version )
-
+
def _get_always_expose_using_scope( self ):
#I am almost sure this logic should be moved to code_creators
if isinstance( self.indexing_suite, isuite2.indexing_suite2_t ) \
and ( self.indexing_suite.disable_methods or self.indexing_suite.disabled_methods_groups ):
return True
- return self._always_expose_using_scope
+ return self._always_expose_using_scope
def _set_always_expose_using_scope( self, value ):
self._always_expose_using_scope = value
always_expose_using_scope = property( _get_always_expose_using_scope, _set_always_expose_using_scope )
@@ -47,25 +49,25 @@
break
return self._indexing_suite
indexing_suite = property( _get_indexing_suite )
-
+
def _get_equality_comparable( self ):
if None is self._equality_comparable:
self._equality_comparable = declarations.has_public_equal( self )
return self._equality_comparable
-
+
def _set_equality_comparable( self, value ):
self._equality_comparable = value
-
+
equality_comparable = property( _get_equality_comparable, _set_equality_comparable )
def _get_less_than_comparable( self ):
if None is self._less_than_comparable:
self._less_than_comparable = declarations.has_public_less( self )
return self._less_than_comparable
-
+
def _set_less_than_comparable( self, value ):
self._less_than_comparable = value
-
+
less_than_comparable = property( _get_less_than_comparable, _set_less_than_comparable )
@@ -85,12 +87,12 @@
class_common_impl_details_t.__init__( self )
declarations.class_t.__init__(self, *arguments, **keywords )
scopedef_wrapper.scopedef_t.__init__( self )
-
- self._redefine_operators = False
+
+ self._redefine_operators = False
self._held_type = None
self._noncopyable = None
self._wrapper_alias = self._generate_valid_name() + "_wrapper"
- self._registration_code = []
+ self._registration_code = []
self._declaration_code = []
self._wrapper_code = []
self._null_constructor_body = ''
@@ -131,31 +133,31 @@
def _finalize_impl( self, error_behavior ):
for decl in self.declarations:
decl.finalize( error_behavior )
-
- @property
- def declaration_code( self ):
- """
- List of strings, that contains valid C++ code, that will be added to
- the class registration section
- """
- return self._declaration_code
-
+
@property
- def registration_code( self ):
- """
- List of strings, that contains valid C++ code, that will be added to
- the class registration section
+ def declaration_code( self ):
"""
+ List of strings, that contains valid C++ code, that will be added to
+ the class registration section
+ """
+ return self._declaration_code
+
+ @property
+ def registration_code( self ):
+ """
+ List of strings, that contains valid C++ code, that will be added to
+ the class registration section
+ """
return self._registration_code
-
+
@property
- def wrapper_code( self ):
- """
- List of strings, that contains valid C++ code, that will be added to
- the class wrapper.
+ def wrapper_code( self ):
"""
+ List of strings, that contains valid C++ code, that will be added to
+ the class wrapper.
+ """
return self._wrapper_code
-
+
def _get_null_constructor_body(self):
return self._null_constructor_body
def _set_null_constructor_body(self, body):
@@ -167,30 +169,30 @@
def _set_copy_constructor_body(self, body):
self._copy_constructor_body = body
copy_constructor_body = property( _get_copy_constructor_body, _set_copy_constructor_body )
-
- def add_declaration_code( self, code ):
- self.declaration_code.append( user_text.user_text_t( code ) )
+ def add_declaration_code( self, code ):
+ self.declaration_code.append( user_text.user_text_t( code ) )
+
def add_registration_code( self, code, works_on_instance=True ):
"""works_on_instance: If true, the custom code can be applied directly to obj inst.
Ex: ObjInst."CustomCode"
"""
- self.registration_code.append( user_text.class_user_text_t( code, works_on_instance ) )
+ self.registration_code.append( user_text.class_user_text_t( code, works_on_instance ) )
#preserving backward computability
- add_code = add_registration_code
-
+ add_code = add_registration_code
+
def add_wrapper_code( self, code ):
self.wrapper_code.append( user_text.user_text_t( code ) )
-
+
def set_constructors_body( self, body ):
"""Sets the body for all constructors"""
self.constructors().body = body
self.null_constructor_body = body
self.copy_constructor_body = body
-
+
def _exportable_impl( self ):
if not self.name:
- return 'Py++ can not expose unnamed classes.'
+ return 'Py++ can not expose unnamed classes.'
#it is possible to do so, but not for unnamed classes defined under namespace.
if isinstance( self.parent, declarations.namespace_t ):
return ''
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|