Update of /cvsroot/pygccxml/source/pyplusplus/examples/py_date_time
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31188/pyplusplus/examples/py_date_time
Modified Files:
create_date_time.py
Log Message:
1. adding most of the aliases needed to functionality needed by user to module builder package
2. updating examples and cleaning unittests
Index: create_date_time.py
===================================================================
RCS file: /cvsroot/pygccxml/source/pyplusplus/examples/py_date_time/create_date_time.py,v
retrieving revision 1.33
retrieving revision 1.34
diff -C2 -d -r1.33 -r1.34
*** create_date_time.py 21 Mar 2006 08:07:25 -0000 1.33
--- create_date_time.py 29 Mar 2006 04:26:57 -0000 1.34
***************
*** 20,39 ****
def __init__(self):
self.__destination_dir = settings.working_dir
! self.__file = os.path.join( settings.date_time_pypp_include, 'date_time.pypp.hpp' )
!
self.__aliases = customization_data.aliases
self.__includes = customization_data.includes
self.__ns_aliases = customization_data.ns_aliases
!
! self.__parser_config \
= parser.config_t( gccxml_path=settings.gccxml_path
, include_paths=[settings.boost_path]
, define_symbols=settings.defined_symbols
, undefine_symbols=settings.undefined_symbols )
!
! def _create_xml_file( self ):
! #On windows I have some problems to compile boost.date_time
! #library, so I will use xml files generated on linux
! reader = parser.source_reader_t( self.__parser_config )
destination = os.path.join( settings.date_time_pypp_include, 'date_time.pypp.xml' )
if sys.platform == 'linux2':
--- 20,38 ----
def __init__(self):
self.__destination_dir = settings.working_dir
! self.__file = os.path.join( settings.date_time_pypp_include, 'date_time.pypp.hpp' )
self.__aliases = customization_data.aliases
self.__includes = customization_data.includes
self.__ns_aliases = customization_data.ns_aliases
!
! def _create_xml_file( self ):
! #On windows I have some problems to compile boost.date_time
! #library, so I will use xml files generated on linux
! parser_config \
= parser.config_t( gccxml_path=settings.gccxml_path
, include_paths=[settings.boost_path]
, define_symbols=settings.defined_symbols
, undefine_symbols=settings.undefined_symbols )
!
! reader = parser.source_reader_t( )
destination = os.path.join( settings.date_time_pypp_include, 'date_time.pypp.xml' )
if sys.platform == 'linux2':
***************
*** 44,48 ****
date_time_xml_file = self._create_xml_file()
mb = module_builder.module_builder_t( [ parser.create_gccxml_fc( date_time_xml_file ) ]
! , self.__parser_config )
if sys.platform == 'win32':
linux_name = "time_duration<boost::posix_time::time_duration,boost::date_time::time_resolution_traits<boost::date_time::time_resolution_traits_adapted64_impl, micro, 1000000, 6, int> >"
--- 43,50 ----
date_time_xml_file = self._create_xml_file()
mb = module_builder.module_builder_t( [ parser.create_gccxml_fc( date_time_xml_file ) ]
! , gccxml_path=settings.gccxml_path
! , include_paths=[settings.boost_path]
! , define_symbols=settings.defined_symbols
! , undefine_symbols=settings.undefined_symbols )
if sys.platform == 'win32':
linux_name = "time_duration<boost::posix_time::time_duration,boost::date_time::time_resolution_traits<boost::date_time::time_resolution_traits_adapted64_impl, micro, 1000000, 6, int> >"
***************
*** 52,57 ****
time_duration_impl.name = win_name
for name, alias in self.__aliases.items():
! decl = mb.decl( name )
decl.alias = alias
if isinstance( decl, declarations.class_t ):
--- 54,61 ----
time_duration_impl.name = win_name
+ mb.run_query_optimizer()
+
for name, alias in self.__aliases.items():
! decl = mb.class_( name )
decl.alias = alias
if isinstance( decl, declarations.class_t ):
|