Revision: 301
Author: roman_yakovenko
Date: 2006-07-12 02:42:52 -0700 (Wed, 12 Jul 2006)
ViewCVS: http://svn.sourceforge.net/pygccxml/?rev=301&view=rev
Log Message:
-----------
small bug fixes in indexing suite functionality
Modified Paths:
--------------
pygccxml_dev/pygccxml/declarations/type_traits.py
pyplusplus_dev/pyplusplus/module_creator/creator.py
Modified: pygccxml_dev/pygccxml/declarations/type_traits.py
===================================================================
--- pygccxml_dev/pygccxml/declarations/type_traits.py 2006-07-11 18:59:43 UTC (rev 300)
+++ pygccxml_dev/pygccxml/declarations/type_traits.py 2006-07-12 09:42:52 UTC (rev 301)
@@ -15,6 +15,7 @@
within this module works on L{type_t} class hierarchy and\\or L{class_t}.
"""
+import types
import filters
import typedef
import calldef
@@ -853,6 +854,14 @@
if not found:
if cpptypes.FUNDAMENTAL_TYPES.has_key( value_type_str ):
return cpptypes.FUNDAMENTAL_TYPES[value_type_str]
+ elif is_std_string( value_type_str ):
+ string_ = global_ns.typedef( '::std::string' )
+ return remove_declarated( string_ )
+ elif is_std_wstring( value_type_str ):
+ string_ = global_ns.typedef( '::std::wstring' )
+ return remove_declarated( string_ )
+ else:
+ return None
if len( found ) == 1:
return found[0]
else:
@@ -892,17 +901,23 @@
decl_strings = [
'::std::basic_string<char,std::char_traits<char>,std::allocator<char> >'
, '::std::basic_string<char, std::char_traits<char>, std::allocator<char> >'
- , '::std::string' ]
- type = remove_alias( type )
- return remove_cv( type ).decl_string in decl_strings
+ , '::std::string' ]
+ if isinstance( type, types.StringTypes ):
+ return type in decl_strings
+ else:
+ type = remove_alias( type )
+ return remove_cv( type ).decl_string in decl_strings
def is_std_wstring( type ):
decl_strings = [
'::std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> >'
, '::std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >'
, '::std::wstring' ]
- type = remove_alias( type )
- return remove_cv( type ).decl_string in decl_strings
+ if isinstance( type, types.StringTypes ):
+ return type in decl_strings
+ else:
+ type = remove_alias( type )
+ return remove_cv( type ).decl_string in decl_strings
Modified: pyplusplus_dev/pyplusplus/module_creator/creator.py
===================================================================
--- pyplusplus_dev/pyplusplus/module_creator/creator.py 2006-07-11 18:59:43 UTC (rev 300)
+++ pyplusplus_dev/pyplusplus/module_creator/creator.py 2006-07-12 09:42:52 UTC (rev 301)
@@ -415,14 +415,14 @@
used_containers = list( self.__types_db.used_containers )
used_containers.sort( cmp_by_name )
for cls in used_containers:
- container_name = cls.name.split( '<' )[0] + '<'
+ container_name = cls.name.split( '<' )[0] + '<'
if isinstance( cls.indexing_suite, decl_wrappers.indexing_suite1_t ):
isuite = isuite1
else:
isuite = isuite2
- if not isuite.has_key( container_name ):
+ if not isuite.has_key( container_name ):
continue #not supported
if isuite is isuite2:
@@ -432,15 +432,9 @@
cls_creator = create_cls_cc( cls )
element_type = cls.indexing_suite.element_type
- if declarations.is_class( element_type ):
- class_traits = declarations.class_traits
- value_cls = class_traits.get_declaration( element_type )
- if value_cls.ignore:
- continue #this collection could not be exported, because
- #the value_type of collection is not exported
if isuite is isuite1:
if declarations.is_class( element_type ) and not declarations.has_public_equal( element_type ):
- cls_creator.adopt_creator( create_explanation( cls ) )
+ cls_creator.adopt_creator( create_explanation( cls ) )
cls_creator.adopt_creator( code_creators.indexing_suite1_t(cls) )
else:
class_traits = declarations.class_traits
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|