pygccxml-commit Mailing List for C++ Python language bindings (Page 36)
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-04-15 06:33:35
|
Revision: 983
http://svn.sourceforge.net/pygccxml/?rev=983&view=rev
Author: roman_yakovenko
Date: 2007-04-14 23:33:36 -0700 (Sat, 14 Apr 2007)
Log Message:
-----------
adding few small convenience methods
Modified Paths:
--------------
pyplusplus_dev/pyplusplus/code_creators/code_creator.py
pyplusplus_dev/pyplusplus/code_creators/compound.py
Modified: pyplusplus_dev/pyplusplus/code_creators/code_creator.py
===================================================================
--- pyplusplus_dev/pyplusplus/code_creators/code_creator.py 2007-04-15 06:31:35 UTC (rev 982)
+++ pyplusplus_dev/pyplusplus/code_creators/code_creator.py 2007-04-15 06:33:36 UTC (rev 983)
@@ -100,15 +100,25 @@
assert isinstance( code, types.StringTypes )
return self.beautify( code )
- def get_system_headers( self ):
- files = [ "boost/python.hpp" ]
- files.extend( self._get_system_headers_impl() )
- return filter( None, files)
+ @staticmethod
+ def unique_headers( headers ):
+ used = set()
+ uheaders = []
+ for h in headers:
+ if h not in used:
+ used.add( h )
+ uheaders.append( h )
+ return uheaders
def _get_system_headers_impl( self ):
"""Return list of system header files the generated code depends on"""
raise NotImplementedError(self.__class__.__name__)
-
+
+ def get_system_headers( self, recursive=False ):
+ files = [ "boost/python.hpp" ]
+ files.extend( self._get_system_headers_impl() )
+ return filter( None, files)
+
def beautify( self, code ):
"""
function that returns code without leading and trailing whitespaces.
Modified: pyplusplus_dev/pyplusplus/code_creators/compound.py
===================================================================
--- pyplusplus_dev/pyplusplus/code_creators/compound.py 2007-04-15 06:31:35 UTC (rev 982)
+++ pyplusplus_dev/pyplusplus/code_creators/compound.py 2007-04-15 06:33:36 UTC (rev 983)
@@ -74,4 +74,12 @@
, internals )
for index in range( len( internals ) - 1):
internals[index] = internals[index] + os.linesep
- return os.linesep.join( internals )
\ No newline at end of file
+ return os.linesep.join( internals )
+
+ def get_system_headers( self, recursive=False ):
+ files = [ "boost/python.hpp" ]
+ files.extend( self._get_system_headers_impl() )
+ if recursive:
+ for creator in self._creators:
+ files.extend( creator.get_system_headers(recursive) )
+ return files
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rom...@us...> - 2007-04-15 06:31:34
|
Revision: 982
http://svn.sourceforge.net/pygccxml/?rev=982&view=rev
Author: roman_yakovenko
Date: 2007-04-14 23:31:35 -0700 (Sat, 14 Apr 2007)
Log Message:
-----------
fixing small bug - now will report correctly the header files generated code depends on
Modified Paths:
--------------
pyplusplus_dev/pyplusplus/function_transformers/transformers.py
Modified: pyplusplus_dev/pyplusplus/function_transformers/transformers.py
===================================================================
--- pyplusplus_dev/pyplusplus/function_transformers/transformers.py 2007-04-15 06:17:03 UTC (rev 981)
+++ pyplusplus_dev/pyplusplus/function_transformers/transformers.py 2007-04-15 06:31:35 UTC (rev 982)
@@ -225,7 +225,11 @@
self.__configure_v_mem_fun_override( controller.override_controller )
self.__configure_v_mem_fun_default( controller.default_controller )
+ def required_headers( self ):
+ """Returns list of header files that transformer generated code depends on."""
+ return [ code_repository.convenience.file_name ]
+
_seq2arr = string.Template( os.linesep.join([
'pyplus_conv::ensure_uniform_sequence< $type >( $pylist, $array_size );'
, 'pyplus_conv::copy_sequence( $pylist, pyplus_conv::array_inserter( $native_array, $array_size ) );']))
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rom...@us...> - 2007-04-15 06:17:03
|
Revision: 981
http://svn.sourceforge.net/pygccxml/?rev=981&view=rev
Author: roman_yakovenko
Date: 2007-04-14 23:17:03 -0700 (Sat, 14 Apr 2007)
Log Message:
-----------
fixing small bug: header file should be normalized before I check whether it is system header or not
Modified Paths:
--------------
pyplusplus_dev/pyplusplus/module_creator/header_files_manager.py
Modified: pyplusplus_dev/pyplusplus/module_creator/header_files_manager.py
===================================================================
--- pyplusplus_dev/pyplusplus/module_creator/header_files_manager.py 2007-04-14 19:44:48 UTC (rev 980)
+++ pyplusplus_dev/pyplusplus/module_creator/header_files_manager.py 2007-04-15 06:17:03 UTC (rev 981)
@@ -36,6 +36,7 @@
self.include( call_policy.header_file, system=True )
def include_ft( self, required_headers ): #include function transformation headers
+ required_headers = map( self.normalize, required_headers )
for header in required_headers:
# Check whether the header is already included
system = bool( header in code_repository.headers )
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rom...@us...> - 2007-04-14 19:44:47
|
Revision: 980
http://svn.sourceforge.net/pygccxml/?rev=980&view=rev
Author: roman_yakovenko
Date: 2007-04-14 12:44:48 -0700 (Sat, 14 Apr 2007)
Log Message:
-----------
adding new functionality to code creators - to report system header files the generated code will depend on
this functionality will allow better code generation and simpler "creator_t" class implementation
Modified Paths:
--------------
pyplusplus_dev/pyplusplus/code_creators/array_1_registrator.py
pyplusplus_dev/pyplusplus/code_creators/calldef.py
pyplusplus_dev/pyplusplus/code_creators/class_declaration.py
pyplusplus_dev/pyplusplus/code_creators/code_creator.py
pyplusplus_dev/pyplusplus/code_creators/custom.py
pyplusplus_dev/pyplusplus/code_creators/enum.py
pyplusplus_dev/pyplusplus/code_creators/exception_translator.py
pyplusplus_dev/pyplusplus/code_creators/global_variable.py
pyplusplus_dev/pyplusplus/code_creators/include.py
pyplusplus_dev/pyplusplus/code_creators/indexing_suites.py
pyplusplus_dev/pyplusplus/code_creators/instruction.py
pyplusplus_dev/pyplusplus/code_creators/license.py
pyplusplus_dev/pyplusplus/code_creators/member_variable.py
pyplusplus_dev/pyplusplus/code_creators/module.py
pyplusplus_dev/pyplusplus/code_creators/module_body.py
pyplusplus_dev/pyplusplus/code_creators/namespace.py
pyplusplus_dev/pyplusplus/code_creators/opaque_type_registrator.py
pyplusplus_dev/pyplusplus/code_creators/properties.py
pyplusplus_dev/pyplusplus/code_creators/smart_pointers.py
pyplusplus_dev/pyplusplus/code_creators/unnamed_enum.py
Modified: pyplusplus_dev/pyplusplus/code_creators/array_1_registrator.py
===================================================================
--- pyplusplus_dev/pyplusplus/code_creators/array_1_registrator.py 2007-04-10 20:23:57 UTC (rev 979)
+++ pyplusplus_dev/pyplusplus/code_creators/array_1_registrator.py 2007-04-14 19:44:48 UTC (rev 980)
@@ -62,3 +62,6 @@
fn_def = templates.join( '::'.join( [ns_name, fn_name] ), fn_def_tmpl_args )
return call_invocation.join( fn_def, [ '"%s"' % self._create_name() ] ) + ';'
+
+ def _get_system_headers_impl( self ):
+ return [code_repository.array_1.file_name]
Modified: pyplusplus_dev/pyplusplus/code_creators/calldef.py
===================================================================
--- pyplusplus_dev/pyplusplus/code_creators/calldef.py 2007-04-10 20:23:57 UTC (rev 979)
+++ pyplusplus_dev/pyplusplus/code_creators/calldef.py 2007-04-14 19:44:48 UTC (rev 980)
@@ -134,6 +134,11 @@
return ''.join( result )
+ def _get_system_headers_impl( self ):
+ files = []
+ if self.declaration.call_policies:
+ files.append( self.declaration.call_policies.header_file )
+ return files
class calldef_wrapper_t( code_creator.code_creator_t
, declaration_based.declaration_based_t):
@@ -170,6 +175,13 @@
else:
return ' throw()'
+ def _get_system_headers_impl( self ):
+ files = []
+ if self.declaration.transformations:
+ ft = self.declaration.transformations[0]
+ files.extend( ft.required_headers() )
+ return files
+
class free_function_t( calldef_t ):
def __init__( self, function ):
calldef_t.__init__( self, function=function )
@@ -849,6 +861,9 @@
def _create_impl( self ):
return 'staticmethod( "%s" )' % self.function_code_creator.alias
+ def _get_system_headers_impl( self ):
+ return []
+
class constructor_wrapper_t( calldef_wrapper_t ):
"""
Creates C++ code that builds wrapper arround exposed constructor.
@@ -939,6 +954,8 @@
answer.append( '}' )
return os.linesep.join( answer )
+ def _get_system_headers_impl( self ):
+ return []
class null_constructor_wrapper_t( code_creator.code_creator_t
, declaration_based.declaration_based_t ):
@@ -965,6 +982,9 @@
answer.append( '}' )
return os.linesep.join( answer )
+ def _get_system_headers_impl( self ):
+ return []
+
#in python all operators are members of class, while in C++
#you can define operators that are not.
class operator_t( registration_based.registration_based_t
@@ -1046,6 +1066,9 @@
code = self._create_unary_operator()
return 'def( %s )' % code
+ def _get_system_headers_impl( self ):
+ return []
+
class casting_operator_t( registration_based.registration_based_t
, declaration_based.declaration_based_t ):
"""
@@ -1067,6 +1090,9 @@
, [ from_arg , to_arg ] ) \
+ '();'
+ def _get_system_headers_impl( self ):
+ return []
+
class casting_member_operator_t( registration_based.registration_based_t
, declaration_based.declaration_based_t ):
"""
@@ -1102,6 +1128,9 @@
, 'doc' : doc
}
+ def _get_system_headers_impl( self ):
+ return []
+
class casting_constructor_t( registration_based.registration_based_t
, declaration_based.declaration_based_t ):
"""
@@ -1124,6 +1153,8 @@
, [ from_arg , to_arg ] ) \
+ '();'
+ def _get_system_headers_impl( self ):
+ return []
class calldef_overloads_class_t( code_creator.code_creator_t ):
@@ -1196,6 +1227,9 @@
, 'max' : max_
}
+ def _get_system_headers_impl( self ):
+ return []
+
class free_fun_overloads_class_t( calldef_overloads_class_t ):
def __init__( self, free_funs ):
#precondition: all member functions belong to same class and
@@ -1214,6 +1248,9 @@
, 'max' : max_
}
+ def _get_system_headers_impl( self ):
+ return []
+
class calldef_overloads_t( registration_based.registration_based_t ):
def __init__( self, overloads_class ):
registration_based.registration_based_t.__init__( self )
@@ -1298,6 +1335,9 @@
return ''.join( result )
+ def _get_system_headers_impl( self ):
+ return []
+
class mem_fun_overloads_t( calldef_overloads_t ):
def __init__( self, overloads_class ):
calldef_overloads_t.__init__( self, overloads_class )
Modified: pyplusplus_dev/pyplusplus/code_creators/class_declaration.py
===================================================================
--- pyplusplus_dev/pyplusplus/code_creators/class_declaration.py 2007-04-10 20:23:57 UTC (rev 979)
+++ pyplusplus_dev/pyplusplus/code_creators/class_declaration.py 2007-04-14 19:44:48 UTC (rev 980)
@@ -82,6 +82,8 @@
else:
return self._generate_code_no_scope()
+ def _get_system_headers_impl( self ):
+ return []
class class_t( scoped.scoped_t, registration_based.registration_based_t ):
"""
@@ -323,6 +325,9 @@
return self._generate_code_with_scope()
else:
return self._generate_code_no_scope()
+
+ def _get_system_headers_impl( self ):
+ return []
#open question: should I put class wrapper under some specifiec namespace?
class class_wrapper_t( scoped.scoped_t ):
@@ -396,6 +401,8 @@
answer.append( '};' )
return os.linesep.join( answer )
+ def _get_system_headers_impl( self ):
+ return []
@@ -403,3 +410,4 @@
+
Modified: pyplusplus_dev/pyplusplus/code_creators/code_creator.py
===================================================================
--- pyplusplus_dev/pyplusplus/code_creators/code_creator.py 2007-04-10 20:23:57 UTC (rev 979)
+++ pyplusplus_dev/pyplusplus/code_creators/code_creator.py 2007-04-14 19:44:48 UTC (rev 980)
@@ -100,6 +100,15 @@
assert isinstance( code, types.StringTypes )
return self.beautify( code )
+ def get_system_headers( self ):
+ files = [ "boost/python.hpp" ]
+ files.extend( self._get_system_headers_impl() )
+ return filter( None, files)
+
+ def _get_system_headers_impl( self ):
+ """Return list of system header files the generated code depends on"""
+ raise NotImplementedError(self.__class__.__name__)
+
def beautify( self, code ):
"""
function that returns code without leading and trailing whitespaces.
@@ -155,4 +164,4 @@
"""
assert isinstance( line, types.StringTypes )
l = line.lstrip()
- return l.startswith( '//' ) or l.startswith( '/*' )
\ No newline at end of file
+ return l.startswith( '//' ) or l.startswith( '/*' )
Modified: pyplusplus_dev/pyplusplus/code_creators/custom.py
===================================================================
--- pyplusplus_dev/pyplusplus/code_creators/custom.py 2007-04-10 20:23:57 UTC (rev 979)
+++ pyplusplus_dev/pyplusplus/code_creators/custom.py 2007-04-14 19:44:48 UTC (rev 980)
@@ -17,6 +17,9 @@
def _create_impl(self):
raise NotImplementedError()
+ def _get_system_headers_impl( self ):
+ return []
+
class custom_text_t(custom_t):
def __init__(self, text, works_on_instance=True):
custom_t.__init__(self, works_on_instance)
@@ -29,4 +32,7 @@
text = property( _get_text, _set_text )
def _create_impl(self):
- return self.text
\ No newline at end of file
+ return self.text
+
+ def _get_system_headers_impl( self ):
+ return []
Modified: pyplusplus_dev/pyplusplus/code_creators/enum.py
===================================================================
--- pyplusplus_dev/pyplusplus/code_creators/enum.py 2007-04-10 20:23:57 UTC (rev 979)
+++ pyplusplus_dev/pyplusplus/code_creators/enum.py 2007-04-14 19:44:48 UTC (rev 980)
@@ -63,3 +63,6 @@
values = self.indent( os.linesep.join( values ) )
return bpl_enum + os.linesep + values
+
+ def _get_system_headers_impl( self ):
+ return []
Modified: pyplusplus_dev/pyplusplus/code_creators/exception_translator.py
===================================================================
--- pyplusplus_dev/pyplusplus/code_creators/exception_translator.py 2007-04-10 20:23:57 UTC (rev 979)
+++ pyplusplus_dev/pyplusplus/code_creators/exception_translator.py 2007-04-14 19:44:48 UTC (rev 980)
@@ -32,7 +32,10 @@
, 'cls_name' : self.decl_identifier
, 'arg_name' : self.declaration.exception_argument_name }
+ def _get_system_headers_impl( self ):
+ return []
+
class exception_translator_register_t( registration_based.registration_based_t
, declaration_based.declaration_based_t ):
def __init__(self, exception_class, exception_translator):
@@ -49,5 +52,6 @@
% { 'register_exception_translator' : algorithm.create_identifier( self, 'boost::python::register_exception_translator' )
, 'cls' : self.decl_identifier
, 'translator' : self.translator.translator_name }
-
-
+
+ def _get_system_headers_impl( self ):
+ return []
Modified: pyplusplus_dev/pyplusplus/code_creators/global_variable.py
===================================================================
--- pyplusplus_dev/pyplusplus/code_creators/global_variable.py 2007-04-10 20:23:57 UTC (rev 979)
+++ pyplusplus_dev/pyplusplus/code_creators/global_variable.py 2007-04-14 19:44:48 UTC (rev 980)
@@ -30,6 +30,9 @@
self._wrapper = new_wrapper
wrapper = property( _get_wrapper, _set_wrapper )
+ def _get_system_headers_impl( self ):
+ return []
+
class global_variable_t( global_variable_base_t ):
"""
Creates boost.python code that exposes global variable.
@@ -65,6 +68,9 @@
def __init__(self, variable, wrapper ):
global_variable_base_t.__init__( self, variable=variable, wrapper=wrapper )
+ def _get_system_headers_impl( self ):
+ return []
+
def _create_impl( self ):
if self.declaration.already_exposed:
return ''
@@ -147,3 +153,6 @@
answer.append('}')
answer.append( '}' * len( self._create_namespaces() ) )
return os.linesep.join( answer )
+
+ def _get_system_headers_impl( self ):
+ return [code_repository.array_1.file_name]
Modified: pyplusplus_dev/pyplusplus/code_creators/include.py
===================================================================
--- pyplusplus_dev/pyplusplus/code_creators/include.py 2007-04-10 20:23:57 UTC (rev 979)
+++ pyplusplus_dev/pyplusplus/code_creators/include.py 2007-04-14 19:44:48 UTC (rev 980)
@@ -46,4 +46,7 @@
if self.include_dirs_optimization.is_std(self.header):
return '#include <%s>' % normalize_header
else:
- return '#include "%s"' % normalize_header
\ No newline at end of file
+ return '#include "%s"' % normalize_header
+
+ def _get_system_headers_impl( self ):
+ return []
Modified: pyplusplus_dev/pyplusplus/code_creators/indexing_suites.py
===================================================================
--- pyplusplus_dev/pyplusplus/code_creators/indexing_suites.py 2007-04-10 20:23:57 UTC (rev 979)
+++ pyplusplus_dev/pyplusplus/code_creators/indexing_suites.py 2007-04-14 19:44:48 UTC (rev 980)
@@ -49,6 +49,8 @@
def _create_impl(self):
return "def( %s() )" % self._create_suite_declaration()
+ def _get_system_headers_impl( self ):
+ return self.configuration.include_files
class indexing_suite2_t( registration_based.registration_based_t
, declaration_based.declaration_based_t ):
@@ -116,6 +118,9 @@
answer.append( ';' )
return ''.join( answer )
+ def _get_system_headers_impl( self ):
+ return self.declaration.indexing_suite.include_files
+
class value_traits_t( code_creator.code_creator_t
, declaration_based.declaration_based_t ):
def __init__( self, value_class ):
@@ -168,15 +173,5 @@
return ''
return self.generate_value_traits()
-
-
-
-
-
-
-
-
-
-
-
-
+ def _get_system_headers_impl( self ):
+ return ['boost/python/suite/indexing/value_traits.hpp']
Modified: pyplusplus_dev/pyplusplus/code_creators/instruction.py
===================================================================
--- pyplusplus_dev/pyplusplus/code_creators/instruction.py 2007-04-10 20:23:57 UTC (rev 979)
+++ pyplusplus_dev/pyplusplus/code_creators/instruction.py 2007-04-14 19:44:48 UTC (rev 980)
@@ -35,4 +35,7 @@
return os.linesep.join( answer )
def _generate_description(self):
- raise NotImplementedError()
\ No newline at end of file
+ raise NotImplementedError()
+
+ def _get_system_headers_impl( self ):
+ return []
Modified: pyplusplus_dev/pyplusplus/code_creators/license.py
===================================================================
--- pyplusplus_dev/pyplusplus/code_creators/license.py 2007-04-10 20:23:57 UTC (rev 979)
+++ pyplusplus_dev/pyplusplus/code_creators/license.py 2007-04-14 19:44:48 UTC (rev 980)
@@ -20,6 +20,9 @@
self._text = new_text
text = property( _get_text, _set_text )
+ def _get_system_headers_impl( self ):
+ return []
+
def _create_impl(self):
return self.text
Modified: pyplusplus_dev/pyplusplus/code_creators/member_variable.py
===================================================================
--- pyplusplus_dev/pyplusplus/code_creators/member_variable.py 2007-04-10 20:23:57 UTC (rev 979)
+++ pyplusplus_dev/pyplusplus/code_creators/member_variable.py 2007-04-14 19:44:48 UTC (rev 980)
@@ -30,6 +30,14 @@
def _set_wrapper( self, new_wrapper ):
self._wrapper = new_wrapper
wrapper = property( _get_wrapper, _set_wrapper )
+
+ def _get_system_headers_impl( self ):
+ files = []
+ if self.declaration.getter_call_policies:
+ files.append( self.declaration.getter_call_policies.header_file )
+ if self.declaration.setter_call_policies:
+ files.append( self.declaration.setter_call_policies.header_file )
+ return files
class member_variable_t( member_variable_base_t ):
"""
@@ -257,6 +265,9 @@
, 'cls_type' : self.inst_arg_type( has_const=False ) })
return os.linesep.join( answer )
+ def _get_system_headers_impl( self ):
+ return []
+
class bit_field_t( member_variable_base_t ):
"""
Creates boost.python code that exposes bit fields member variables
@@ -359,6 +370,9 @@
answer.append( self.BF_SET_TEMPLATE % substitutions )
return os.linesep.join( answer )
+ def _get_system_headers_impl( self ):
+ return []
+
class array_mv_t( member_variable_base_t ):
"""
Creates boost.python code that exposes array member variable.
@@ -405,7 +419,11 @@
answer.append( os.linesep )
answer.append( '}' )
return ''.join( answer )
+
+ def _get_system_headers_impl( self ):
+ return []
+
#TODO: generated fucntion should be static and take instance of the wrapped class
#as first argument.
class array_mv_wrapper_t( code_creator.code_creator_t
@@ -468,6 +486,9 @@
, 'mem_var_ref' : self.declaration.name
}
+ def _get_system_headers_impl( self ):
+ return [code_repository.array_1.file_name]
+
class mem_var_ref_t( member_variable_base_t ):
"""
@@ -614,3 +635,6 @@
if self.has_setter:
answer.append( self.SET_TEMPLATE % substitutions )
return os.linesep.join( answer )
+
+ def _get_system_headers_impl( self ):
+ return []
Modified: pyplusplus_dev/pyplusplus/code_creators/module.py
===================================================================
--- pyplusplus_dev/pyplusplus/code_creators/module.py 2007-04-10 20:23:57 UTC (rev 979)
+++ pyplusplus_dev/pyplusplus/code_creators/module.py 2007-04-14 19:44:48 UTC (rev 980)
@@ -140,7 +140,6 @@
map( lambda header: self.adopt_include( include.include_t( header=header ) )
, headers )
-
def adopt_include(self, include_creator):
"""Insert an L{include_t} object.
@@ -157,7 +156,10 @@
, self.creators )
for include_creator in includes:
include_creator.include_dirs_optimization = include_dirs
-
+
+ def _get_system_headers_impl( self ):
+ return []
+
def _create_impl(self):
self.do_include_dirs_optimization()
index = 0
Modified: pyplusplus_dev/pyplusplus/code_creators/module_body.py
===================================================================
--- pyplusplus_dev/pyplusplus/code_creators/module_body.py 2007-04-10 20:23:57 UTC (rev 979)
+++ pyplusplus_dev/pyplusplus/code_creators/module_body.py 2007-04-14 19:44:48 UTC (rev 980)
@@ -20,4 +20,7 @@
result.append( "BOOST_PYTHON_MODULE(%s){" % self.name )
result.append( compound.compound_t.create_internal_code( self.creators ) )
result.append( "}" )
- return os.linesep.join( result )
\ No newline at end of file
+ return os.linesep.join( result )
+
+ def _get_system_headers_impl( self ):
+ return []
Modified: pyplusplus_dev/pyplusplus/code_creators/namespace.py
===================================================================
--- pyplusplus_dev/pyplusplus/code_creators/namespace.py 2007-04-10 20:23:57 UTC (rev 979)
+++ pyplusplus_dev/pyplusplus/code_creators/namespace.py 2007-04-14 19:44:48 UTC (rev 980)
@@ -26,6 +26,9 @@
def _create_impl(self):
return 'namespace %s = %s;' % ( self.alias, self.full_namespace_name )
+ def _get_system_headers_impl( self ):
+ return []
+
class namespace_using_t(code_creator.code_creator_t):
def __init__( self, namespace_name ):
code_creator.code_creator_t.__init__(self )
@@ -38,4 +41,7 @@
namespace_name = property( _get_namespace_name, _set_namespace_name )
def _create_impl(self):
- return 'using namespace %s;' % self.namespace_name
\ No newline at end of file
+ return 'using namespace %s;' % self.namespace_name
+
+ def _get_system_headers_impl( self ):
+ return []
Modified: pyplusplus_dev/pyplusplus/code_creators/opaque_type_registrator.py
===================================================================
--- pyplusplus_dev/pyplusplus/code_creators/opaque_type_registrator.py 2007-04-10 20:23:57 UTC (rev 979)
+++ pyplusplus_dev/pyplusplus/code_creators/opaque_type_registrator.py 2007-04-14 19:44:48 UTC (rev 980)
@@ -19,4 +19,8 @@
def _create_impl(self):
return 'BOOST_PYTHON_OPAQUE_SPECIALIZED_TYPE_ID( %s )' % self.decl_identifier
+
+ def _get_system_headers_impl( self ):
+ return []
+
Modified: pyplusplus_dev/pyplusplus/code_creators/properties.py
===================================================================
--- pyplusplus_dev/pyplusplus/code_creators/properties.py 2007-04-10 20:23:57 UTC (rev 979)
+++ pyplusplus_dev/pyplusplus/code_creators/properties.py 2007-04-14 19:44:48 UTC (rev 980)
@@ -80,7 +80,6 @@
cls_name = 'exported_class_t'
return ( 'typedef %s %s;' % ( cls_identifier, cls_name ), cls_name )
-
def create_property_code( self ):
result = []
param_sep = ', '
@@ -146,6 +145,8 @@
result.append( '}' )
return os.linesep.join( result )
+ def _get_system_headers_impl( self ):
+ return []
Modified: pyplusplus_dev/pyplusplus/code_creators/smart_pointers.py
===================================================================
--- pyplusplus_dev/pyplusplus/code_creators/smart_pointers.py 2007-04-10 20:23:57 UTC (rev 979)
+++ pyplusplus_dev/pyplusplus/code_creators/smart_pointers.py 2007-04-14 19:44:48 UTC (rev 980)
@@ -73,6 +73,9 @@
rptp = algorithm.create_identifier( self, '::boost::python::register_ptr_to_python' )
held_type = held_type_t(self.smart_ptr).create( self )
return templates.join( rptp, [ held_type ] ) + '();'
+
+ def _get_system_headers_impl( self ):
+ return []
class smart_pointers_converter_t( registration_based.registration_based_t
, declaration_based.declaration_based_t ):
@@ -112,4 +115,6 @@
to_arg = self._instantiate_smart_ptr( self.target )
return templates.join(implicitly_convertible, [ from_arg, to_arg ] ) + '();'
+ def _get_system_headers_impl( self ):
+ return []
Modified: pyplusplus_dev/pyplusplus/code_creators/unnamed_enum.py
===================================================================
--- pyplusplus_dev/pyplusplus/code_creators/unnamed_enum.py 2007-04-10 20:23:57 UTC (rev 979)
+++ pyplusplus_dev/pyplusplus/code_creators/unnamed_enum.py 2007-04-14 19:44:48 UTC (rev 980)
@@ -34,3 +34,5 @@
, algorithm.create_identifier( self, full_name + '::' + name ) ) )
return os.linesep.join( result )
+ def _get_system_headers_impl( self ):
+ return []
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rom...@us...> - 2007-04-10 20:23:56
|
Revision: 979
http://svn.sourceforge.net/pygccxml/?rev=979&view=rev
Author: roman_yakovenko
Date: 2007-04-10 13:23:57 -0700 (Tue, 10 Apr 2007)
Log Message:
-----------
fixing bug - redefining CLASS_TYPE
Modified Paths:
--------------
pyplusplus_dev/pyplusplus/code_creators/class_declaration.py
pyplusplus_dev/pyplusplus/decl_wrappers/class_wrapper.py
Modified: pyplusplus_dev/pyplusplus/code_creators/class_declaration.py
===================================================================
--- pyplusplus_dev/pyplusplus/code_creators/class_declaration.py 2007-04-10 20:12:42 UTC (rev 978)
+++ pyplusplus_dev/pyplusplus/code_creators/class_declaration.py 2007-04-10 20:23:57 UTC (rev 979)
@@ -178,7 +178,7 @@
held_type = self._generated_held_type()
if self.wrapper:
- if self.declaration.class_type == self.declaration.CLASS_TYPE.WRAPPER:
+ if self.declaration.exposed_class_type == self.declaration.EXPOSED_CLASS_TYPE.WRAPPER:
args.append( self.wrapper.full_name )
else:
if not self.target_configuration.boost_python_has_wrapper_held_type \
Modified: pyplusplus_dev/pyplusplus/decl_wrappers/class_wrapper.py
===================================================================
--- pyplusplus_dev/pyplusplus/decl_wrappers/class_wrapper.py 2007-04-10 20:12:42 UTC (rev 978)
+++ pyplusplus_dev/pyplusplus/decl_wrappers/class_wrapper.py 2007-04-10 20:23:57 UTC (rev 979)
@@ -178,10 +178,10 @@
, scopedef_wrapper.scopedef_t
, declarations.class_t):
- class CLASS_TYPE:
- DEFAULT = 'default'
+ class EXPOSED_CLASS_TYPE:
+ DECLARED = 'declared'
WRAPPER = 'wrapper'
- ALL = ( DEFAULT, WRAPPER )
+ ALL = ( DECLARED, WRAPPER )
def __init__(self, *arguments, **keywords):
class_common_details_t.__init__( self )
@@ -201,7 +201,7 @@
self._properties = []
self._redefined_funcs = None
self._require_self_reference = False
- self._class_type = self.CLASS_TYPE.DEFAULT
+ self._exposed_class_type = self.EXPOSED_CLASS_TYPE.DECLARED
def _get_redefine_operators( self ):
return self._redefine_operators
@@ -210,11 +210,12 @@
redefine_operators = property( _get_redefine_operators, _set_redefine_operators
, doc="tells Py++ to redefine operators from base class in this class, False by default")
- def _get_class_type(self):
- return self._class_type
- def _set_class_type(self, class_type):
+ def _get_exposed_class_type(self):
+ return self._exposed_class_type
+ def _set_exposed_class_type(self, class_type):
+ assert class_type in self.EXPOSED_CLASS_TYPE.ALL
self._class_type = class_type
- class_type = property( _get_class_type, _set_class_type
+ exposed_class_type = property( _get_exposed_class_type, _set_exposed_class_type
, doc="set this value to CLASS_TYPE.WRAPPER, if you need to transfer ownership of" \
"polymorphic class" )
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rom...@us...> - 2007-04-10 20:12:41
|
Revision: 978
http://svn.sourceforge.net/pygccxml/?rev=978&view=rev
Author: roman_yakovenko
Date: 2007-04-10 13:12:42 -0700 (Tue, 10 Apr 2007)
Log Message:
-----------
slightly improving code for is_noncopyable function
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-04-10 06:15:58 UTC (rev 977)
+++ pygccxml_dev/pygccxml/declarations/type_traits.py 2007-04-10 20:12:42 UTC (rev 978)
@@ -848,15 +848,18 @@
if __is_noncopyable_single( base_desc.related_class ):
return True
- if not has_trivial_copy( class_ ) \
- or not has_public_constructor( class_ )\
- or class_.is_abstract \
- or ( has_destructor( class_ ) and not has_public_destructor( class_ ) ):
+ if class_.is_abstract:
return True
+ elif not has_trivial_copy( class_ ):
+ return True
+ elif not has_public_constructor( class_ ):
+ return True
+ elif has_destructor( class_ ) and not has_public_destructor( class_ ):
+ return True
+ else:
+ return __is_noncopyable_single( class_ )
- return __is_noncopyable_single( class_ )
-
def is_defined_in_xxx( xxx, cls ):
"""small helper function, that checks whether class ( C{cls} ) is defined
under C{::xxx} namespace"""
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rom...@us...> - 2007-04-10 06:15:56
|
Revision: 977
http://svn.sourceforge.net/pygccxml/?rev=977&view=rev
Author: roman_yakovenko
Date: 2007-04-09 23:15:58 -0700 (Mon, 09 Apr 2007)
Log Message:
-----------
making code generator to honor "use_keywords" settings
Modified Paths:
--------------
pyplusplus_dev/pyplusplus/code_creators/calldef.py
Modified: pyplusplus_dev/pyplusplus/code_creators/calldef.py
===================================================================
--- pyplusplus_dev/pyplusplus/code_creators/calldef.py 2007-04-10 06:14:44 UTC (rev 976)
+++ pyplusplus_dev/pyplusplus/code_creators/calldef.py 2007-04-10 06:15:58 UTC (rev 977)
@@ -1251,9 +1251,11 @@
def create_overloads_cls( self ):
result = [ self.overloads_class.name ]
result.append( '( ' )
- result.append( os.linesep + self.indent( self.create_keywords_args(), 3 ) )
+ if self.overloads_class.max_function.use_keywords:
+ result.append( os.linesep + self.indent( self.create_keywords_args(), 3 ) )
if self.overloads_class.max_function.documentation:
- result.append( os.linesep + self.indent( self.PARAM_SEPARATOR, 3 ) )
+ if self.overloads_class.max_function.use_keywords:
+ result.append( os.linesep + self.indent( self.PARAM_SEPARATOR, 3 ) )
result.append( self.overloads_class.max_function.documentation )
result.append( ' )' )
if self.overloads_class.max_function.call_policies \
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rom...@us...> - 2007-04-10 06:14:43
|
Revision: 976
http://svn.sourceforge.net/pygccxml/?rev=976&view=rev
Author: roman_yakovenko
Date: 2007-04-09 23:14:44 -0700 (Mon, 09 Apr 2007)
Log Message:
-----------
fixing spelling error
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 2007-04-10 06:13:54 UTC (rev 975)
+++ pyplusplus_dev/pyplusplus/decl_wrappers/class_wrapper.py 2007-04-10 06:14:44 UTC (rev 976)
@@ -19,7 +19,7 @@
VIRTUALITY_TYPES = declarations.VIRTUALITY_TYPES
class impl_details:
- class GAEUS_VALUES: #guess always expose using scope values
+ class GUESS_VALUES: #guess always expose using scope values
TRUE = 'true'
FALSE = 'false'
ALWAYS_TRUE = 'always true'
@@ -91,16 +91,16 @@
def guess_always_expose_using_scope_value( self ):
if isinstance( self.indexing_suite, isuite2.indexing_suite2_t ) \
and ( self.indexing_suite.disable_methods or self.indexing_suite.disabled_methods_groups ):
- return impl_details.GAEUS_VALUES.ALWAYS_TRUE
+ return impl_details.GUESS_VALUES.ALWAYS_TRUE
else:
- return impl_details.GAEUS_VALUES.FALSE
+ return impl_details.GUESS_VALUES.FALSE
def _get_always_expose_using_scope( self ):
tmp = self.guess_always_expose_using_scope_value()
- if tmp == impl_details.GAEUS_VALUES.ALWAYS_TRUE:
+ if tmp == impl_details.GUESS_VALUES.ALWAYS_TRUE:
return True
if None is self._always_expose_using_scope:
- if impl_details.GAEUS_VALUES.TRUE == tmp:
+ if impl_details.GUESS_VALUES.TRUE == tmp:
self._always_expose_using_scope = True
else:
self._always_expose_using_scope = False
@@ -542,7 +542,7 @@
return True
#MSVC 7.1 has problem with taking reference to operator=
if self.member_operators( is_assign, allow_empty=True, recursive=False ):
- return impl_details.GAEUS_VALUES.ALWAYS_TRUE
+ return impl_details.GUESS_VALUES.ALWAYS_TRUE
return super(class_t, self).guess_always_expose_using_scope_value()
def _get_require_self_reference(self):
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rom...@us...> - 2007-04-10 06:13:54
|
Revision: 975
http://svn.sourceforge.net/pygccxml/?rev=975&view=rev
Author: roman_yakovenko
Date: 2007-04-09 23:13:54 -0700 (Mon, 09 Apr 2007)
Log Message:
-----------
excluding "excluded" function from being exposed
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-04-10 06:09:31 UTC (rev 974)
+++ pyplusplus_dev/pyplusplus/module_creator/creator.py 2007-04-10 06:13:54 UTC (rev 975)
@@ -437,7 +437,7 @@
, parent_decl.free_functions( allow_empty=True, recursive=False ) ) )
for name in names:
overloads = parent_decl.free_functions( name, allow_empty=True, recursive=False )
- overloads = filter( lambda decl: decl.use_overload_macro, overloads )
+ overloads = filter( lambda decl: decl.ignore == False and decl.use_overload_macro, overloads )
if not overloads:
continue
else:
@@ -504,7 +504,8 @@
, cls.member_functions( allow_empty=True, recursive=False ) ) )
for name in names:
overloads = cls.member_functions( name, allow_empty=True, recursive=False )
- overloads = filter( lambda decl: decl.use_overload_macro, overloads )
+ overloads = filter( lambda decl: decl.ignore == False and decl.use_overload_macro
+ , overloads )
if not overloads:
continue
else:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rom...@us...> - 2007-04-10 06:09:30
|
Revision: 974
http://svn.sourceforge.net/pygccxml/?rev=974&view=rev
Author: roman_yakovenko
Date: 2007-04-09 23:09:31 -0700 (Mon, 09 Apr 2007)
Log Message:
-----------
adding new test case
Modified Paths:
--------------
pygccxml_dev/pygccxml/declarations/decl_printer.py
pygccxml_dev/unittests/data/type_traits.hpp
Modified: pygccxml_dev/pygccxml/declarations/decl_printer.py
===================================================================
--- pygccxml_dev/pygccxml/declarations/decl_printer.py 2007-04-09 19:22:53 UTC (rev 973)
+++ pygccxml_dev/pygccxml/declarations/decl_printer.py 2007-04-10 06:09:31 UTC (rev 974)
@@ -109,7 +109,11 @@
def visit_constructor( self ):
self.print_decl_header()
-
+ if self.__print_details:
+ self.writer( ' ' * ( self.level + 1 ) * self.INDENT_SIZE
+ + 'copy constructor: ' + str(self.__inst.is_copy_constructor)
+ + os.linesep )
+
def visit_destructor( self ):
self.print_decl_header()
Modified: pygccxml_dev/unittests/data/type_traits.hpp
===================================================================
--- pygccxml_dev/unittests/data/type_traits.hpp 2007-04-09 19:22:53 UTC (rev 973)
+++ pygccxml_dev/unittests/data/type_traits.hpp 2007-04-10 06:09:31 UTC (rev 974)
@@ -1,702 +1,714 @@
-// 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)
-
-//Almost all test cases have been taken
-//from boost.type_traits (http://www.boost.org) library.
-
-#include <string>
-#include <iostream>
-
-#define TYPE_PERMUTATION( BASE, NAME ) \
- typedef BASE NAME##_t; \
- typedef BASE const NAME##_const_t; \
- typedef BASE volatile NAME##_volatile_t;
-
-struct some_struct_t{
- void do_smth();
- int member;
-};
-
-namespace is_std_ostream{
-namespace yes{
- typedef std::ostream ostream_type;
-}
-namespace no{
- typedef int int__;
-}
-}
-
-namespace is_std_wostream{
-namespace yes{
- typedef std::wostream wostream_type;
-}
-namespace no{
- typedef int int__;
-}
-}
-
-
-struct incomplete_type;
-
-namespace is_void{
-namespace yes{
- typedef void void_t;
- typedef void const void_cont_t;
- typedef void volatile void_volatile_t;
-}
-namespace no{
- typedef void* void_ptr_t;
- typedef int int_t;
- typedef some_struct_t some_struct_alias_t;
- typedef incomplete_type incomplete_type_alias_t;
- typedef void(*function_t)();
- typedef void (some_struct_t::*member_function_t)();
-} }
-
-namespace is_noncopyable{
-
-namespace detail{
- struct x{
- private:
- x( const x& );
- x& operator=(const x& );
- };
-}
-
-namespace yes{
- typedef detail::x x;
-}
-namespace no{
- typedef std::string string_type;
-}
-}
-
-namespace is_integral{
-namespace yes{
-
- TYPE_PERMUTATION( bool, bool )
- TYPE_PERMUTATION( char, char )
- TYPE_PERMUTATION( unsigned char, uchar )
- TYPE_PERMUTATION( short, short )
- TYPE_PERMUTATION( unsigned short, ushort )
- TYPE_PERMUTATION( int, int )
- TYPE_PERMUTATION( unsigned int, uint )
- TYPE_PERMUTATION( long, long )
- TYPE_PERMUTATION( unsigned long, ulong )
- TYPE_PERMUTATION( long long int, llint )
- TYPE_PERMUTATION( long long unsigned int, ulli )
-}
-namespace no{
- typedef some_struct_t some_struct_alias_t;
- typedef float* float_ptr_t;
- typedef float& float_ref_t;
- typedef const float& const_float_ref_t;
- typedef incomplete_type incomplete_type_alias;
- typedef void(*function_t)();
- typedef void (some_struct_t::*member_function_t)();
- TYPE_PERMUTATION( void, void )
- TYPE_PERMUTATION( float, float )
- TYPE_PERMUTATION( double, double )
- TYPE_PERMUTATION( long double, ldouble )
-} }
-
-namespace is_floating_point{
-namespace yes{
-
- TYPE_PERMUTATION( float, float )
- TYPE_PERMUTATION( double, double )
- TYPE_PERMUTATION( long double, ldouble )
-}
-namespace no{
- typedef some_struct_t some_struct_alias_t;
- typedef float* float_ptr_t;
- typedef float& float_ref_t;
- typedef const float& const_float_ref_t;
- typedef incomplete_type incomplete_type_alias;
- typedef void(*function_t)();
- typedef void (some_struct_t::*member_function_t)();
- TYPE_PERMUTATION( void, void )
- TYPE_PERMUTATION( bool, bool )
- TYPE_PERMUTATION( char, char )
- TYPE_PERMUTATION( unsigned char, uchar )
- TYPE_PERMUTATION( short, short )
- TYPE_PERMUTATION( unsigned short, ushort )
- TYPE_PERMUTATION( int, int )
- TYPE_PERMUTATION( unsigned int, uint )
- TYPE_PERMUTATION( long, long )
- TYPE_PERMUTATION( unsigned long, ulong )
- TYPE_PERMUTATION( long long int, llint )
- TYPE_PERMUTATION( long long unsigned int, ulli )
-} }
-
-namespace is_fundamental{
-namespace yes{
-
-#define FUNDAMENTAL_TYPE_PERMUTATION( BASE, NAME ) \
- typedef BASE NAME##_t; \
- typedef BASE const NAME##_const_t; \
- typedef BASE volatile NAME##_volatile_t;
-
- TYPE_PERMUTATION( void, void )
- TYPE_PERMUTATION( bool, bool )
- TYPE_PERMUTATION( char, char )
- TYPE_PERMUTATION( unsigned char, uchar )
- TYPE_PERMUTATION( short, short )
- TYPE_PERMUTATION( unsigned short, ushort )
- TYPE_PERMUTATION( int, int )
- TYPE_PERMUTATION( unsigned int, uint )
- TYPE_PERMUTATION( long, long )
- TYPE_PERMUTATION( unsigned long, ulong )
- TYPE_PERMUTATION( long long int, llint )
- TYPE_PERMUTATION( long long unsigned int, ulli )
- TYPE_PERMUTATION( float, float )
- TYPE_PERMUTATION( double, double )
- TYPE_PERMUTATION( long double, ldouble )
-}
-namespace no{
- typedef some_struct_t some_struct_alias_t;
- typedef float* float_ptr_t;
- typedef float& float_ref_t;
- typedef const float& const_float_ref_t;
- typedef incomplete_type incomplete_type_alias;
- typedef void(*function_t)();
- typedef void (some_struct_t::*member_function_t)();
-
-} }
-
-namespace is_pointer{
-namespace yes{
- typedef int* int_ptr_t;
- typedef const int* const_int_ptr_t;
- typedef volatile int* volatile_int_ptr_t;
- typedef some_struct_t* some_struct_ptr_t;
- typedef int* const int_const_ptr_t;
- typedef int* volatile int_volatile_ptr_t;
- typedef void(*function_t)();
- typedef void (some_struct_t::*member_function_t)();
-}
-
-namespace no{
- typedef int int_t;
- typedef int& int_ref_t;
- typedef some_struct_t some_struct_alias_t;
- typedef int*& int_ptr_ref_t;
-} }
-
-
-namespace remove_pointer{
-namespace before{
- typedef int* x1;
- typedef const int* x2;
- typedef volatile int* x3;
- typedef some_struct_t* x4;
- typedef int* const x5;
- typedef int* volatile x6;
- typedef void(*x7)();
- typedef void (some_struct_t::*x8)();
-}
-
-namespace after{
- typedef int x1;
- typedef const int x2;
- typedef volatile int x3;
- typedef some_struct_t x4;
- typedef int const x5;
- typedef int volatile x6;
- typedef void(*x7)();
- typedef void (some_struct_t::*x8)();
-} }
-
-
-namespace is_reference{
-namespace yes{
-
- typedef int& int_ref_t;
- typedef const int& const_int_ref_t;
- typedef int const& int_const_ref_t;
- typedef some_struct_t& some_struct_ref_t;
- typedef int*& int_ptr_ref_t;
-}
-
-namespace no{
- typedef int* int_ptr_t;
- typedef const int* const_int_ptr_t;
- typedef volatile int* volatile_int_ptr_t;
- typedef some_struct_t* some_struct_ptr_t;
- typedef int* const int_const_ptr_t;
- typedef int* volatile int_volatile_ptr_t;
- typedef void(*function_t)();
- typedef void (some_struct_t::*member_function_t)();
- typedef int int_t;
-} }
-
-namespace remove_reference{
-namespace before{
-
- typedef int& x1;
- typedef const int& x2;
- typedef some_struct_t& x3;
- typedef int*& x4;
- typedef void (some_struct_t::*x5)();
-}
-
-namespace after{
- typedef int x1;
- typedef const int x2;
- typedef some_struct_t x3;
- typedef int* x4;
- typedef void (some_struct_t::*x5)();
-} }
-
-namespace is_const{
-namespace yes{
-
- typedef const void const_void_t;
- typedef const incomplete_type const_incomplete_type_t;
- typedef int* const int_const_t;
- //TODO typedef const int& const_int_ref_t;
-}
-
-namespace no{
- typedef int* int_ptr_t;
- typedef const int* const_int_ptr_t;
- typedef volatile int* volatile_int_ptr_t;
- typedef some_struct_t* some_struct_ptr_t;
- typedef int* volatile int_volatile_ptr_t;
- typedef void(*function_t)();
- typedef void (some_struct_t::*member_function_t)();
- typedef int int_t;
-} }
-
-namespace remove_const{
-namespace before{
-
- typedef const void x1;
- typedef const incomplete_type x2;
- typedef int* const x3;
- typedef int* volatile x4;
-}
-
-namespace after{
- typedef void x1;
- typedef incomplete_type x2;
- typedef int* x3;
- typedef int* volatile x4;
-} }
-
-namespace is_volatile{
-namespace yes{
-
- typedef void * volatile vvoid_ptr_t;
- typedef volatile int volatile_int_t;
-}
-
-namespace no{
- typedef int* int_ptr_t;
- typedef const int* const_int_ptr_t;
- typedef int* volatile_int_ptr_t;
- typedef some_struct_t* some_struct_ptr_t;
- typedef int* int_volatile_ptr_t;
- typedef void(*function_t)();
- typedef void (some_struct_t::*member_function_t)();
- typedef int int_t;
-} }
-
-namespace remove_volatile{
-namespace before{
-
- typedef void * volatile x1;
- typedef volatile int x2;
- typedef int* x3;
-}
-
-namespace after{
- typedef void * x1;
- typedef int x2;
- typedef int* x3;
-} }
-
-
-namespace remove_cv{
-namespace before{
-
- typedef void * volatile x10;
- typedef void * const volatile x11;
- typedef void * const x12;
-
- typedef volatile int x20;
- typedef const volatile int x21;
- typedef const int x22;
-
- typedef int* volatile x30;
- typedef int* const volatile x31;
- typedef int* const x32;
-
- typedef void(*x40)();
-}
-
-namespace after{
- typedef void * x10;
- typedef void * x11;
- typedef void * x12;
-
- typedef int x20;
- typedef int x21;
- typedef int x22;
-
- typedef int* x30;
- typedef int* x31;
- typedef int* x32;
-
- typedef void(*x40)();
-} }
-
-
-namespace is_enum{
-
- enum color{ red, green, blue };
-
-namespace yes{
- typedef color COLOR;
-}
-
-namespace no{
- typedef int* int_ptr_t;
- typedef const int* const_int_ptr_t;
- typedef int* volatile_int_ptr_t;
- typedef some_struct_t* some_struct_ptr_t;
- typedef int* int_volatile_ptr_t;
- typedef void(*function_t)();
- typedef void (some_struct_t::*member_function_t)();
- typedef int int_t;
-} }
-
-namespace has_trivial_constructor{
-namespace yes{
- struct x{
- x(){}
- };
-}
-
-namespace no{
- class y{
- private:
- y(){}
- };
-} }
-
-namespace has_public_constructor{
-namespace yes{
- struct x{
- x(){}
- };
-}
-
-namespace no{
- class y{
- private:
- y(){}
- };
-} }
-
-namespace has_public_destructor{
-namespace yes{
- struct x{
- ~x(){}
- };
-}
-
-namespace no{
- class y{
- private:
- ~y(){}
- };
-} }
-
-namespace has_trivial_copy{
-namespace yes{
- struct x{
- x(const x&){}
- };
-}
-
-namespace no{
- class y{
- private:
- y(const y&){}
- };
-} }
-
-namespace is_base_and_derived{
-namespace yes{
- struct base{};
- struct derived : public base {};
-}
-
-namespace no{
- struct unrelated1{};
- struct unrelated2{};
-} }
-
-namespace has_any_non_copyconstructor{
-namespace yes{
- struct x{
- x(int){}
- };
-}
-
-namespace no{
- class y{
- private:
- y(){}
- };
-} }
-
-namespace is_unary_operator{
-
-struct dummy{
- bool operator!(){ return true; }
- int operator++(){ return 0; }
- int operator+(const dummy& ){ return 0; }
-};
-
-inline int operator++( dummy& ){ return 0; }
-inline int operator*( const dummy&, const dummy& ){ return 0; }
-
-dummy& operator+=( dummy& x, const dummy& ){
- return x;
-}
-
-}
-
-namespace is_array{
-
-namespace yes{
- int yes1[2];
- const int yes2[2] = {0};
- const volatile int yes3[2] = {0};
- int yes4[2][3];
-}
-
-namespace no{
- typedef int no1;
- typedef int* no2;
- typedef const int* no3;
- typedef const volatile int* no4;
- typedef int*const no5;
- typedef const int*volatile no6;
- typedef const volatile int*const no7;
- typedef void( * no8)( const int[2] );
-} }
-
-namespace is_convertible{
-
-template <class T>
-struct convertible_from{
- convertible_from(T);
-};
-
-template <class T>
-struct convertible_to{
- operator T ();
-
-};
-
-struct base{};
-
-struct other{};
-
-struct derived : base {};
-
-struct derived_protected : protected base {};
-
-struct derived_private : private base {};
-
-struct base2{};
-
-struct middle2 : virtual base2 {};
-
-struct derived2 : middle2 {};
-
-enum fruit{ apple };
-
-template < typename source_type_, typename target_type_, int value_ >
-struct tester_t{
- typedef source_type_ source_type;
- typedef target_type_ target_type;
- enum expected{ value=value_ };
-};
-
-template < typename source_type_, typename target_type_, int value_ >
-struct tester_source_t{
- typedef source_type_ source_type;
- typedef target_type_ target_type;
- enum expected{ value=value_ };
-
-private:
- enum { sizeof_source = sizeof( source_type ) };
-};
-
-template < typename source_type_, typename target_type_, int value_ >
-struct tester_target_t{
- typedef source_type_ source_type;
- typedef target_type_ target_type;
- enum expected{ value=value_ };
-
-private:
- enum { sizeof_target = sizeof( target_type ) };
-};
-
-template < typename source_type_, typename target_type_, int value_ >
-struct tester_both_t{
- typedef source_type_ source_type;
- typedef target_type_ target_type;
- enum expected{ value=value_ };
-
-private:
- enum { sizeof_source = sizeof( source_type ) };
- enum { sizeof_target = sizeof( target_type ) };
-};
-
-struct x1 : public tester_t< const int *, int*, false >{};
-struct x2 : public tester_t< int *, const int*, true >{};
-struct x3 : public tester_t< const int&, int&, false >{};
-struct x4 : public tester_t< const int&, int, true >{};
-struct x5 : public tester_t< const int&, char, true >{};
-struct x6 : public tester_t< const int&, char&, false >{};
-struct x7 : public tester_t< const int&, char*, false >{};
-struct x8 : public tester_t< int&, const int&, true >{};
-struct x9 : public tester_t< int *, const int*, true >{};
-struct x10 : public tester_t< int&, const int&, true >{};
-struct x11 : public tester_t< float, int, true >{};
-struct x12 : public tester_t< double, int, true >{};
-struct x13 : public tester_t< double, float, true >{};
-struct x14 : public tester_t< long, int, true >{};
-struct x15 : public tester_t< int, char, true >{};
-struct x16 : public tester_t< long long, int, true >{};
-struct x17 : public tester_t< long long, char, true >{};
-struct x18 : public tester_t< long long, float, true >{};
-struct x19 : public tester_t< float, int, true >{};
-struct x20 : public tester_t< float, void, false >{};
-struct x21 : public tester_t< void, void, true >{};
-struct x22 : public tester_t< double, void*, true >{};
-struct x23 : public tester_t< double, int*, false >{};
-struct x24 : public tester_t< int, int*, false >{};
-struct x25 : public tester_t< const int, int*, false >{};
-struct x26 : public tester_t< const int&, int*, false >{};
-struct x27 : public tester_t< double*, int*, false >{};
-struct x28 : public tester_source_t< convertible_to<int>, int, true >{};
-struct x29 : public tester_target_t< int, convertible_to<int>, false >{};
-struct x30 : public tester_source_t< convertible_to<float const&>, float, true >{};
-struct x31 : public tester_target_t< float, convertible_to<float const&>, false >{};
-struct x32 : public tester_source_t< convertible_to<float&>, float, true >{};
-struct x33 : public tester_target_t< float, convertible_to<float&>, false >{};
-struct x34 : public tester_source_t< convertible_to<char>, float, true >{};
-struct x35 : public tester_target_t< float, convertible_to<char>, false >{};
-struct x36 : public tester_source_t< convertible_to<char const&>, float, true >{};
-struct x37 : public tester_target_t< float, convertible_to<char const&>, false >{};
-struct x38 : public tester_source_t< convertible_to<char&>, float, true >{};
-struct x39 : public tester_target_t< float, convertible_to<char&>, false >{};
-struct x40 : public tester_source_t< convertible_to<char>, char, true >{};
-struct x41 : public tester_source_t< convertible_to<char const&>, char, true >{};
-struct x42 : public tester_source_t< convertible_to<char&>, char, true >{};
-struct x43 : public tester_source_t< convertible_to<float>, float&, true >{};
-struct x44 : public tester_source_t< convertible_to<float>, float const&, true >{};
-struct x45 : public tester_source_t< convertible_to<float&>, float&, true >{};
-struct x46 : public tester_source_t< convertible_to<float const&>, float const&, true >{};
-struct x47 : public tester_source_t< convertible_to<float const&>, float&, false >{};
-struct x48 : public tester_target_t< float, convertible_from<float>, true >{};
-struct x49 : public tester_target_t< float, convertible_from<float const&>, true >{};
-struct x50 : public tester_target_t< float, convertible_from<float&>, true >{};
-struct x51 : public tester_target_t< float, convertible_from<char>, true >{};
-struct x52 : public tester_target_t< float, convertible_from<char const&>, true >{};
-struct x53 : public tester_target_t< float, convertible_from<char&>, false >{};
-struct x54 : public tester_target_t< char, convertible_from<char>, true >{};
-struct x55 : public tester_target_t< char, convertible_from<char const&>, true >{};
-struct x56 : public tester_target_t< char, convertible_from<char&>, true >{};
-struct x57 : public tester_target_t< float&, convertible_from<float> , true >{};
-struct x58 : public tester_target_t< float const&, convertible_from<float> , true >{};
-struct x59 : public tester_target_t< float&, convertible_from<float&> , true >{};
-struct x60 : public tester_target_t< float const&, convertible_from<float const&>, true >{};
-struct x61 : public tester_target_t< float&, convertible_from<float const&>, true >{};
-struct x62 : public tester_target_t< int, convertible_from<int>, true >{};
-struct x63 : public tester_t< const int*, int[3], false >{};
-struct x64 : public tester_t< int(&)[4], const int*, true >{};
-struct x65 : public tester_t< int(&)(int), int(*)(int), true >{};
-struct x66 : public tester_t< int[2], int*, true >{};
-struct x67 : public tester_t< int[2], const int*, true >{};
-struct x68 : public tester_t< const int[2], int*, false >{};
-struct x69 : public tester_t< int*, int[3], false >{};
-struct x70 : public tester_t< float, int&, false >{};
-struct x71 : public tester_t< float, const int&, true >{};
-struct x72 : public tester_t< other, void*, true >{};
-struct x73 : public tester_t< int, void*, false >{};
-struct x74 : public tester_t< fruit, void*, false >{};
-struct x75 : public tester_t< other, int*, false >{};
-struct x76 : public tester_t< other*, int*, false >{};
-struct x77 : public tester_t< fruit, int, true >{};
-struct x78 : public tester_t< fruit, double, true >{};
-struct x79 : public tester_t< fruit, char, true >{};
-struct x80 : public tester_t< fruit, wchar_t, true >{};
-struct x81 : public tester_t< derived, base, true >{};
-struct x82 : public tester_t< derived, derived, true >{};
-struct x83 : public tester_t< base, base, true >{};
-struct x84 : public tester_t< base, derived, false >{};
-struct x85 : public tester_t< other, base, false >{};
-struct x86 : public tester_t< middle2, base2, true >{};
-struct x87 : public tester_t< derived2, base2, true >{};
-struct x88 : public tester_t< derived*, base*, true >{};
-struct x89 : public tester_t< base*, derived*, false >{};
-struct x90 : public tester_t< derived&, base&, true >{};
-struct x91 : public tester_t< base&, derived&, false >{};
-struct x92 : public tester_t< const derived*, const base*, true >{};
-struct x93 : public tester_t< const base*, const derived*, false >{};
-struct x94 : public tester_t< const derived&, const base&, true >{};
-struct x95 : public tester_t< const base&, const derived&, false >{};
-struct x96 : public tester_t< derived_private, base, false >{};
-struct x97 : public tester_t< derived_protected, base, true >{};
-struct x98 : public tester_t< derived_protected, derived_private, false >{};
-
-
-
-// : public tester_t< test_abc3, const test_abc1&, true >{};
-// : public tester_t< non_int_pointer, void*, true >{};
-// : public tester_t< test_abc1&, test_abc2&, false >{};
-// : public tester_t< test_abc1&, int_constructible, false >{};
-// : public tester_t< int_constructible, test_abc1&, false >{};
-// : public tester_t< test_abc1&, test_abc2, false >{};
-
-//~ : public tester_t< polymorphic_derived1,polymorphic_base, true >{};
-//~ : public tester_t< polymorphic_derived2,polymorphic_base, true >{};
-//~ : public tester_t< polymorphic_base,polymorphic_derived1, false >{};
-//~ : public tester_t< polymorphic_base,polymorphic_derived2, false >{};
-//~ #ifndef BOOST_NO_IS_ABSTRACT
-//~ : public tester_t< test_abc1,test_abc1, false >{};
-//~ : public tester_t< Base,test_abc1, false >{};
-//~ : public tester_t< polymorphic_derived2,test_abc1, false >{};
-//~ : public tester_t< int,test_abc1, false >{};
-//~ #endif
-
-
-}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+// 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)
+
+//Almost all test cases have been taken
+//from boost.type_traits (http://www.boost.org) library.
+
+#include <string>
+#include <iostream>
+
+#define TYPE_PERMUTATION( BASE, NAME ) \
+ typedef BASE NAME##_t; \
+ typedef BASE const NAME##_const_t; \
+ typedef BASE volatile NAME##_volatile_t;
+
+struct some_struct_t{
+ void do_smth();
+ int member;
+};
+
+namespace is_std_ostream{
+namespace yes{
+ typedef std::ostream ostream_type;
+}
+namespace no{
+ typedef int int__;
+}
+}
+
+namespace is_std_wostream{
+namespace yes{
+ typedef std::wostream wostream_type;
+}
+namespace no{
+ typedef int int__;
+}
+}
+
+
+struct incomplete_type;
+
+namespace is_void{
+namespace yes{
+ typedef void void_t;
+ typedef void const void_cont_t;
+ typedef void volatile void_volatile_t;
+}
+namespace no{
+ typedef void* void_ptr_t;
+ typedef int int_t;
+ typedef some_struct_t some_struct_alias_t;
+ typedef incomplete_type incomplete_type_alias_t;
+ typedef void(*function_t)();
+ typedef void (some_struct_t::*member_function_t)();
+} }
+
+namespace is_noncopyable{
+
+namespace detail{
+ struct x{
+ private:
+ x( const x& );
+ x& operator=(const x& );
+ };
+
+ struct y_type{
+ union {
+ struct {
+ float x, y, z;
+ };
+ float val[3];
+ };
+
+ static const y_type zero;
+ };
+}
+
+namespace yes{
+ typedef detail::x x;
+}
+namespace no{
+ typedef std::string string_type;
+ typedef detail::y_type y_type;
+}
+}
+
+namespace is_integral{
+namespace yes{
+
+ TYPE_PERMUTATION( bool, bool )
+ TYPE_PERMUTATION( char, char )
+ TYPE_PERMUTATION( unsigned char, uchar )
+ TYPE_PERMUTATION( short, short )
+ TYPE_PERMUTATION( unsigned short, ushort )
+ TYPE_PERMUTATION( int, int )
+ TYPE_PERMUTATION( unsigned int, uint )
+ TYPE_PERMUTATION( long, long )
+ TYPE_PERMUTATION( unsigned long, ulong )
+ TYPE_PERMUTATION( long long int, llint )
+ TYPE_PERMUTATION( long long unsigned int, ulli )
+}
+namespace no{
+ typedef some_struct_t some_struct_alias_t;
+ typedef float* float_ptr_t;
+ typedef float& float_ref_t;
+ typedef const float& const_float_ref_t;
+ typedef incomplete_type incomplete_type_alias;
+ typedef void(*function_t)();
+ typedef void (some_struct_t::*member_function_t)();
+ TYPE_PERMUTATION( void, void )
+ TYPE_PERMUTATION( float, float )
+ TYPE_PERMUTATION( double, double )
+ TYPE_PERMUTATION( long double, ldouble )
+} }
+
+namespace is_floating_point{
+namespace yes{
+
+ TYPE_PERMUTATION( float, float )
+ TYPE_PERMUTATION( double, double )
+ TYPE_PERMUTATION( long double, ldouble )
+}
+namespace no{
+ typedef some_struct_t some_struct_alias_t;
+ typedef float* float_ptr_t;
+ typedef float& float_ref_t;
+ typedef const float& const_float_ref_t;
+ typedef incomplete_type incomplete_type_alias;
+ typedef void(*function_t)();
+ typedef void (some_struct_t::*member_function_t)();
+ TYPE_PERMUTATION( void, void )
+ TYPE_PERMUTATION( bool, bool )
+ TYPE_PERMUTATION( char, char )
+ TYPE_PERMUTATION( unsigned char, uchar )
+ TYPE_PERMUTATION( short, short )
+ TYPE_PERMUTATION( unsigned short, ushort )
+ TYPE_PERMUTATION( int, int )
+ TYPE_PERMUTATION( unsigned int, uint )
+ TYPE_PERMUTATION( long, long )
+ TYPE_PERMUTATION( unsigned long, ulong )
+ TYPE_PERMUTATION( long long int, llint )
+ TYPE_PERMUTATION( long long unsigned int, ulli )
+} }
+
+namespace is_fundamental{
+namespace yes{
+
+#define FUNDAMENTAL_TYPE_PERMUTATION( BASE, NAME ) \
+ typedef BASE NAME##_t; \
+ typedef BASE const NAME##_const_t; \
+ typedef BASE volatile NAME##_volatile_t;
+
+ TYPE_PERMUTATION( void, void )
+ TYPE_PERMUTATION( bool, bool )
+ TYPE_PERMUTATION( char, char )
+ TYPE_PERMUTATION( unsigned char, uchar )
+ TYPE_PERMUTATION( short, short )
+ TYPE_PERMUTATION( unsigned short, ushort )
+ TYPE_PERMUTATION( int, int )
+ TYPE_PERMUTATION( unsigned int, uint )
+ TYPE_PERMUTATION( long, long )
+ TYPE_PERMUTATION( unsigned long, ulong )
+ TYPE_PERMUTATION( long long int, llint )
+ TYPE_PERMUTATION( long long unsigned int, ulli )
+ TYPE_PERMUTATION( float, float )
+ TYPE_PERMUTATION( double, double )
+ TYPE_PERMUTATION( long double, ldouble )
+}
+namespace no{
+ typedef some_struct_t some_struct_alias_t;
+ typedef float* float_ptr_t;
+ typedef float& float_ref_t;
+ typedef const float& const_float_ref_t;
+ typedef incomplete_type incomplete_type_alias;
+ typedef void(*function_t)();
+ typedef void (some_struct_t::*member_function_t)();
+
+} }
+
+namespace is_pointer{
+namespace yes{
+ typedef int* int_ptr_t;
+ typedef const int* const_int_ptr_t;
+ typedef volatile int* volatile_int_ptr_t;
+ typedef some_struct_t* some_struct_ptr_t;
+ typedef int* const int_const_ptr_t;
+ typedef int* volatile int_volatile_ptr_t;
+ typedef void(*function_t)();
+ typedef void (some_struct_t::*member_function_t)();
+}
+
+namespace no{
+ typedef int int_t;
+ typedef int& int_ref_t;
+ typedef some_struct_t some_struct_alias_t;
+ typedef int*& int_ptr_ref_t;
+} }
+
+
+namespace remove_pointer{
+namespace before{
+ typedef int* x1;
+ typedef const int* x2;
+ typedef volatile int* x3;
+ typedef some_struct_t* x4;
+ typedef int* const x5;
+ typedef int* volatile x6;
+ typedef void(*x7)();
+ typedef void (some_struct_t::*x8)();
+}
+
+namespace after{
+ typedef int x1;
+ typedef const int x2;
+ typedef volatile int x3;
+ typedef some_struct_t x4;
+ typedef int const x5;
+ typedef int volatile x6;
+ typedef void(*x7)();
+ typedef void (some_struct_t::*x8)();
+} }
+
+
+namespace is_reference{
+namespace yes{
+
+ typedef int& int_ref_t;
+ typedef const int& const_int_ref_t;
+ typedef int const& int_const_ref_t;
+ typedef some_struct_t& some_struct_ref_t;
+ typedef int*& int_ptr_ref_t;
+}
+
+namespace no{
+ typedef int* int_ptr_t;
+ typedef const int* const_int_ptr_t;
+ typedef volatile int* volatile_int_ptr_t;
+ typedef some_struct_t* some_struct_ptr_t;
+ typedef int* const int_const_ptr_t;
+ typedef int* volatile int_volatile_ptr_t;
+ typedef void(*function_t)();
+ typedef void (some_struct_t::*member_function_t)();
+ typedef int int_t;
+} }
+
+namespace remove_reference{
+namespace before{
+
+ typedef int& x1;
+ typedef const int& x2;
+ typedef some_struct_t& x3;
+ typedef int*& x4;
+ typedef void (some_struct_t::*x5)();
+}
+
+namespace after{
+ typedef int x1;
+ typedef const int x2;
+ typedef some_struct_t x3;
+ typedef int* x4;
+ typedef void (some_struct_t::*x5)();
+} }
+
+namespace is_const{
+namespace yes{
+
+ typedef const void const_void_t;
+ typedef const incomplete_type const_incomplete_type_t;
+ typedef int* const int_const_t;
+ //TODO typedef const int& const_int_ref_t;
+}
+
+namespace no{
+ typedef int* int_ptr_t;
+ typedef const int* const_int_ptr_t;
+ typedef volatile int* volatile_int_ptr_t;
+ typedef some_struct_t* some_struct_ptr_t;
+ typedef int* volatile int_volatile_ptr_t;
+ typedef void(*function_t)();
+ typedef void (some_struct_t::*member_function_t)();
+ typedef int int_t;
+} }
+
+namespace remove_const{
+namespace before{
+
+ typedef const void x1;
+ typedef const incomplete_type x2;
+ typedef int* const x3;
+ typedef int* volatile x4;
+}
+
+namespace after{
+ typedef void x1;
+ typedef incomplete_type x2;
+ typedef int* x3;
+ typedef int* volatile x4;
+} }
+
+namespace is_volatile{
+namespace yes{
+
+ typedef void * volatile vvoid_ptr_t;
+ typedef volatile int volatile_int_t;
+}
+
+namespace no{
+ typedef int* int_ptr_t;
+ typedef const int* const_int_ptr_t;
+ typedef int* volatile_int_ptr_t;
+ typedef some_struct_t* some_struct_ptr_t;
+ typedef int* int_volatile_ptr_t;
+ typedef void(*function_t)();
+ typedef void (some_struct_t::*member_function_t)();
+ typedef int int_t;
+} }
+
+namespace remove_volatile{
+namespace before{
+
+ typedef void * volatile x1;
+ typedef volatile int x2;
+ typedef int* x3;
+}
+
+namespace after{
+ typedef void * x1;
+ typedef int x2;
+ typedef int* x3;
+} }
+
+
+namespace remove_cv{
+namespace before{
+
+ typedef void * volatile x10;
+ typedef void * const volatile x11;
+ typedef void * const x12;
+
+ typedef volatile int x20;
+ typedef const volatile int x21;
+ typedef const int x22;
+
+ typedef int* volatile x30;
+ typedef int* const volatile x31;
+ typedef int* const x32;
+
+ typedef void(*x40)();
+}
+
+namespace after{
+ typedef void * x10;
+ typedef void * x11;
+ typedef void * x12;
+
+ typedef int x20;
+ typedef int x21;
+ typedef int x22;
+
+ typedef int* x30;
+ typedef int* x31;
+ typedef int* x32;
+
+ typedef void(*x40)();
+} }
+
+
+namespace is_enum{
+
+ enum color{ red, green, blue };
+
+namespace yes{
+ typedef color COLOR;
+}
+
+namespace no{
+ typedef int* int_ptr_t;
+ typedef const int* const_int_ptr_t;
+ typedef int* volatile_int_ptr_t;
+ typedef some_struct_t* some_struct_ptr_t;
+ typedef int* int_volatile_ptr_t;
+ typedef void(*function_t)();
+ typedef void (some_struct_t::*member_function_t)();
+ typedef int int_t;
+} }
+
+namespace has_trivial_constructor{
+namespace yes{
+ struct x{
+ x(){}
+ };
+}
+
+namespace no{
+ class y{
+ private:
+ y(){}
+ };
+} }
+
+namespace has_public_constructor{
+namespace yes{
+ struct x{
+ x(){}
+ };
+}
+
+namespace no{
+ class y{
+ private:
+ y(){}
+ };
+} }
+
+namespace has_public_destructor{
+namespace yes{
+ struct x{
+ ~x(){}
+ };
+}
+
+namespace no{
+ class y{
+ private:
+ ~y(){}
+ };
+} }
+
+namespace has_trivial_copy{
+namespace yes{
+ struct x{
+ x(const x&){}
+ };
+}
+
+namespace no{
+ class y{
+ private:
+ y(const y&){}
+ };
+} }
+
+namespace is_base_and_derived{
+namespace yes{
+ struct base{};
+ struct derived : public base {};
+}
+
+namespace no{
+ struct unrelated1{};
+ struct unrelated2{};
+} }
+
+namespace has_any_non_copyconstructor{
+namespace yes{
+ struct x{
+ x(int){}
+ };
+}
+
+namespace no{
+ class y{
+ private:
+ y(){}
+ };
+} }
+
+namespace is_unary_operator{
+
+struct dummy{
+ bool operator!(){ return true; }
+ int operator++(){ return 0; }
+ int operator+(const dummy& ){ return 0; }
+};
+
+inline int operator++( dummy& ){ return 0; }
+inline int operator*( const dummy&, const dummy& ){ return 0; }
+
+dummy& operator+=( dummy& x, const dummy& ){
+ return x;
+}
+
+}
+
+namespace is_array{
+
+namespace yes{
+ int yes1[2];
+ const int yes2[2] = {0};
+ const volatile int yes3[2] = {0};
+ int yes4[2][3];
+}
+
+namespace no{
+ typedef int no1;
+ typedef int* no2;
+ typedef const int* no3;
+ typedef const volatile int* no4;
+ typedef int*const no5;
+ typedef const int*volatile no6;
+ typedef const volatile int*const no7;
+ typedef void( * no8)( const int[2] );
+} }
+
+namespace is_convertible{
+
+template <class T>
+struct convertible_from{
+ convertible_from(T);
+};
+
+template <class T>
+struct convertible_to{
+ operator T ();
+
+};
+
+struct base{};
+
+struct other{};
+
+struct derived : base {};
+
+struct derived_protected : protected base {};
+
+struct derived_private : private base {};
+
+struct base2{};
+
+struct middle2 : virtual base2 {};
+
+struct derived2 : middle2 {};
+
+enum fruit{ apple };
+
+template < typename source_type_, typename target_type_, int value_ >
+struct tester_t{
+ typedef source_type_ source_type;
+ typedef target_type_ target_type;
+ enum expected{ value=value_ };
+};
+
+template < typename source_type_, typename target_type_, int value_ >
+struct tester_source_t{
+ typedef source_type_ source_type;
+ typedef target_type_ target_type;
+ enum expected{ value=value_ };
+
+private:
+ enum { sizeof_source = sizeof( source_type ) };
+};
+
+template < typename source_type_, typename target_type_, int value_ >
+struct tester_target_t{
+ typedef source_type_ source_type;
+ typedef target_type_ target_type;
+ enum expected{ value=value_ };
+
+private:
+ enum { sizeof_target = sizeof( target_type ) };
+};
+
+template < typename source_type_, typename target_type_, int value_ >
+struct tester_both_t{
+ typedef source_type_ source_type;
+ typedef target_type_ target_type;
+ enum expected{ value=value_ };
+
+private:
+ enum { sizeof_source = sizeof( source_type ) };
+ enum { sizeof_target = sizeof( target_type ) };
+};
+
+struct x1 : public tester_t< const int *, int*, false >{};
+struct x2 : public tester_t< int *, const int*, true >{};
+struct x3 : public tester_t< const int&, int&, false >{};
+struct x4 : public tester_t< const int&, int, true >{};
+struct x5 : public tester_t< const int&, char, true >{};
+struct x6 : public tester_t< const int&, char&, false >{};
+struct x7 : public tester_t< const int&, char*, false >{};
+struct x8 : public tester_t< int&, const int&, true >{};
+struct x9 : public tester_t< int *, const int*, true >{};
+struct x10 : public tester_t< int&, const int&, true >{};
+struct x11 : public tester_t< float, int, true >{};
+struct x12 : public tester_t< double, int, true >{};
+struct x13 : public tester_t< double, float, true >{};
+struct x14 : public tester_t< long, int, true >{};
+struct x15 : public tester_t< int, char, true >{};
+struct x16 : public tester_t< long long, int, true >{};
+struct x17 : public tester_t< long long, char, true >{};
+struct x18 : public tester_t< long long, float, true >{};
+struct x19 : public tester_t< float, int, true >{};
+struct x20 : public tester_t< float, void, false >{};
+struct x21 : public tester_t< void, void, true >{};
+struct x22 : public tester_t< double, void*, true >{};
+struct x23 : public tester_t< double, int*, false >{};
+struct x24 : public tester_t< int, int*, false >{};
+struct x25 : public tester_t< const int, int*, false >{};
+struct x26 : public tester_t< const int&, int*, false >{};
+struct x27 : public tester_t< double*, int*, false >{};
+struct x28 : public tester_source_t< convertible_to<int>, int, true >{};
+struct x29 : public tester_target_t< int, convertible_to<int>, false >{};
+struct x30 : public tester_source_t< convertible_to<float const&>, float, true >{};
+struct x31 : public tester_target_t< float, convertible_to<float const&>, false >{};
+struct x32 : public tester_source_t< convertible_to<float&>, float, true >{};
+struct x33 : public tester_target_t< float, convertible_to<float&>, false >{};
+struct x34 : public tester_source_t< convertible_to<char>, float, true >{};
+struct x35 : public tester_target_t< float, convertible_to<char>, false >{};
+struct x36 : public tester_source_t< convertible_to<char const&>, float, true >{};
+struct x37 : public tester_target_t< float, convertible_to<char const&>, false >{};
+struct x38 : public tester_source_t< convertible_to<char&>, float, true >{};
+struct x39 : public tester_target_t< float, convertible_to<char&>, false >{};
+struct x40 : public tester_source_t< convertible_to<char>, char, true >{};
+struct x41 : public tester_source_t< convertible_to<char const&>, char, true >{};
+struct x42 : public tester_source_t< convertible_to<char&>, char, true >{};
+struct x43 : public tester_source_t< convertible_to<float>, float&, true >{};
+struct x44 : public tester_source_t< convertible_to<float>, float const&, true >{};
+struct x45 : public tester_source_t< convertible_to<float&>, float&, true >{};
+struct x46 : public tester_source_t< convertible_to<float const&>, float const&, true >{};
+struct x47 : public tester_source_t< convertible_to<float const&>, float&, false >{};
+struct x48 : public tester_target_t< float, convertible_from<float>, true >{};
+struct x49 : public tester_target_t< float, convertible_from<float const&>, true >{};
+struct x50 : public tester_target_t< float, convertible_from<float&>, true >{};
+struct x51 : public tester_target_t< float, convertible_from<char>, true >{};
+struct x52 : public tester_target_t< float, convertible_from<char const&>, true >{};
+struct x53 : public tester_target_t< float, convertible_from<char&>, false >{};
+struct x54 : public tester_target_t< char, convertible_from<char>, true >{};
+struct x55 : public tester_target_t< char, convertible_from<char const&>, true >{};
+struct x56 : public tester_target_t< char, convertible_from<char&>, true >{};
+struct x57 : public tester_target_t< float&, convertible_from<float> , true >{};
+struct x58 : public tester_target_t< float const&, convertible_from<float> , true >{};
+struct x59 : public tester_target_t< float&, convertible_from<float&> , true >{};
+struct x60 : public tester_target_t< float const&, convertible_from<float const&>, true >{};
+struct x61 : public tester_target_t< float&, convertible_from<float const&>, true >{};
+struct x62 : public tester_target_t< int, convertible_from<int>, true >{};
+struct x63 : public tester_t< const int*, int[3], false >{};
+struct x64 : public tester_t< int(&)[4], const int*, true >{};
+struct x65 : public tester_t< int(&)(int), int(*)(int), true >{};
+struct x66 : public tester_t< int[2], int*, true >{};
+struct x67 : public tester_t< int[2], const int*, true >{};
+struct x68 : public tester_t< const int[2], int*, false >{};
+struct x69 : public tester_t< int*, int[3], false >{};
+struct x70 : public tester_t< float, int&, false >{};
+struct x71 : public tester_t< float, const int&, true >{};
+struct x72 : public tester_t< other, void*, true >{};
+struct x73 : public tester_t< int, void*, false >{};
+struct x74 : public tester_t< fruit, void*, false >{};
+struct x75 : public tester_t< other, int*, false >{};
+struct x76 : public tester_t< other*, int*, false >{};
+struct x77 : public tester_t< fruit, int, true >{};
+struct x78 : public tester_t< fruit, double, true >{};
+struct x79 : public tester_t< fruit, char, true >{};
+struct x80 : public tester_t< fruit, wchar_t, true >{};
+struct x81 : public tester_t< derived, base, true >{};
+struct x82 : public tester_t< derived, derived, true >{};
+struct x83 : public tester_t< base, base, true >{};
+struct x84 : public tester_t< base, derived, false >{};
+struct x85 : public tester_t< other, base, false >{};
+struct x86 : public tester_t< middle2, base2, true >{};
+struct x87 : public tester_t< derived2, base2, true >{};
+struct x88 : public tester_t< derived*, base*, true >{};
+struct x89 : public tester_t< base*, derived*, false >{};
+struct x90 : public tester_t< derived&, base&, true >{};
+struct x91 : public tester_t< base&, derived&, false >{};
+struct x92 : public tester_t< const derived*, const base*, true >{};
+struct x93 : public tester_t< const base*, const derived*, false >{};
+struct x94 : public tester_t< const derived&, const base&, true >{};
+struct x95 : public tester_t< const base&, const derived&, false >{};
+struct x96 : public tester_t< derived_private, base, false >{};
+struct x97 : public tester_t< derived_protected, base, true >{};
+struct x98 : public tester_t< derived_protected, derived_private, false >{};
+
+
+
+// : public tester_t< test_abc3, const test_abc1&, true >{};
+// : public tester_t< non_int_pointer, void*, true >{};
+// : public tester_t< test_abc1&, test_abc2&, false >{};
+// : public tester_t< test_abc1&, int_constructible, false >{};
+// : public tester_t< int_constructible, test_abc1&, false >{};
+// : public tester_t< test_abc1&, test_abc2, false >{};
+
+//~ : public tester_t< polymorphic_derived1,polymorphic_base, true >{};
+//~ : public tester_t< polymorphic_derived2,polymorphic_base, true >{};
+//~ : public tester_t< polymorphic_base,polymorphic_derived1, false >{};
+//~ : public tester_t< polymorphic_base,polymorphic_derived2, false >{};
+//~ #ifndef BOOST_NO_IS_ABSTRACT
+//~ : public tester_t< test_abc1,test_abc1, false >{};
+//~ : public tester_t< Base,test_abc1, false >{};
+//~ : public tester_t< polymorphic_derived2,test_abc1, false >{};
+//~ : public tester_t< int,test_abc1, false >{};
+//~ #endif
+
+
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rom...@us...> - 2007-04-09 19:22:52
|
Revision: 973
http://svn.sourceforge.net/pygccxml/?rev=973&view=rev
Author: roman_yakovenko
Date: 2007-04-09 12:22:53 -0700 (Mon, 09 Apr 2007)
Log Message:
-----------
small refactoring before implementing better control over included files
Modified Paths:
--------------
pyplusplus_dev/pyplusplus/decl_wrappers/indexing_suite1.py
pyplusplus_dev/pyplusplus/decl_wrappers/indexing_suite2.py
pyplusplus_dev/pyplusplus/module_creator/creator.py
Modified: pyplusplus_dev/pyplusplus/decl_wrappers/indexing_suite1.py
===================================================================
--- pyplusplus_dev/pyplusplus/decl_wrappers/indexing_suite1.py 2007-04-05 18:55:54 UTC (rev 972)
+++ pyplusplus_dev/pyplusplus/decl_wrappers/indexing_suite1.py 2007-04-09 19:22:53 UTC (rev 973)
@@ -12,10 +12,16 @@
#proxy. This can be disabled by supplying true in the NoProxy template parameter.
#We want to disable NoProxy when we deal with immutable objects.
+containers = {
+ 'vector' : "boost/python/suite/indexing/vector_indexing_suite.hpp"
+ , 'map' : "boost/python/suite/indexing/map_indexing_suite.hpp"
+}
+
+
class indexing_suite1_t( object ):
"""
- This class helps user to export STD containers, using Boost.Python
- indexing suite V2.
+ This class helps user to export STD containers, using built-in Boost.Python
+ indexing suite.
"""
def __init__( self, container_class, container_traits, no_proxy=None, derived_policies=None ):
@@ -24,6 +30,7 @@
self.__derived_policies = derived_policies
self.__container_class = container_class
self.__container_traits = container_traits
+ self.__include_files = None
def _get_container_class( self ):
return self.__container_class
@@ -55,3 +62,14 @@
derived_policies = property( _get_derived_policies, _set_derived_policies
, doc="This proprty contains DerivedPolicies string. "
+"It will be added as is to the generated code.")
+
+ @property
+ def include_files( self ):
+ """Return list of header files to be included in generated code"""
+ if self.__include_files is None:
+ name = self.container_class.name.split( '<' )[0]
+ if name not in containers:
+ self.__include_files = [] #not supported
+ else:
+ self.__include_files = [containers[ name ]]
+ return self.__include_files
Modified: pyplusplus_dev/pyplusplus/decl_wrappers/indexing_suite2.py
===================================================================
--- pyplusplus_dev/pyplusplus/decl_wrappers/indexing_suite2.py 2007-04-05 18:55:54 UTC (rev 972)
+++ pyplusplus_dev/pyplusplus/decl_wrappers/indexing_suite2.py 2007-04-09 19:22:53 UTC (rev 973)
@@ -33,6 +33,18 @@
"""
+containers = {
+ 'vector' : "boost/python/suite/indexing/vector.hpp"
+ , 'deque' : "boost/python/suite/indexing/deque.hpp"
+ , 'list' : "boost/python/suite/indexing/list.hpp"
+ , 'map' : "boost/python/suite/indexing/map.hpp"
+ , 'multimap' : "boost/python/suite/indexing/multimap.hpp"
+ , 'hash_map' : "boost/python/suite/indexing/map.hpp"
+ , 'set' : "boost/python/suite/indexing/set.hpp"
+ , 'hash_set' : "boost/python/suite/indexing/set.hpp"
+ #TODO: queue, priority, stack, multimap, hash_multimap, multiset, hash_multiset
+}
+
class indexing_suite2_t( object ):
"""
This class helps user to export STD containers, using Boost.Python
@@ -63,6 +75,7 @@
self._disabled_groups = set()
self._default_applied = False
self._use_container_suite = False
+ self.__include_files = None
def get_use_container_suite( self ):
return self._use_container_suite
@@ -153,3 +166,16 @@
return self._disabled_groups
disabled_methods_groups = property( _get_disabled_methods_groups
, doc="list of all disabled methods group")
+
+ @property
+ def include_files( self ):
+ """Return list of header files to be included in generated code"""
+ if self.__include_files is None:
+ name = self.container_class.name.split( '<' )[0]
+ if name not in containers:
+ self.__include_files = [] #not supported
+ else:
+ #impl details: the order of header files is IMPORTANT
+ self.__include_files = [ "boost/python/suite/indexing/container_suite.hpp"
+ , containers[ name ] ]
+ return self.__include_files
Modified: pyplusplus_dev/pyplusplus/module_creator/creator.py
===================================================================
--- pyplusplus_dev/pyplusplus/module_creator/creator.py 2007-04-05 18:55:54 UTC (rev 972)
+++ pyplusplus_dev/pyplusplus/module_creator/creator.py 2007-04-09 19:22:53 UTC (rev 973)
@@ -31,25 +31,6 @@
# };
# };
-INDEXING_SUITE_1_CONTAINERS = {
- 'vector<' : "boost/python/suite/indexing/vector_indexing_suite.hpp"
- , 'map<' : "boost/python/suite/indexing/map_indexing_suite.hpp"
-}
-
-INDEXING_SUITE_2_CONTAINERS = {
- 'vector<' : "boost/python/suite/indexing/vector.hpp"
- , 'deque<' : "boost/python/suite/indexing/deque.hpp"
- , 'list<' : "boost/python/suite/indexing/list.hpp"
- , 'map<' : "boost/python/suite/indexing/map.hpp"
- , 'multimap<' : "boost/python/suite/indexing/multimap.hpp"
- , 'hash_map<' : "boost/python/suite/indexing/map.hpp"
- , 'set<' : "boost/python/suite/indexing/set.hpp"
- , 'hash_set<' : "boost/python/suite/indexing/set.hpp"
- #TODO: queue, priority, stack, multimap, hash_multimap, multiset, hash_multiset
-}
-
-INDEXING_SUITE_2_MAIN_HEADER = "boost/python/suite/indexing/container_suite.hpp"
-
class creator_t( declarations.decl_visitor_t ):
"""Creating code creators.
@@ -267,10 +248,6 @@
cls_creator.associated_decl_creators.extend( uc_creators )
def _treat_indexing_suite( self ):
- global INDEXING_SUITE_1_CONTAINERS
- global INDEXING_SUITE_2_CONTAINERS
- global INDEXING_SUITE_2_MAIN_HEADER
-
def create_explanation(cls):
msg = '//WARNING: the next line of code will not compile, because "%s" does not have operator== !'
msg = msg % cls.indexing_suite.element_type.decl_string
@@ -285,33 +262,21 @@
if not self.__types_db.used_containers:
return
- used_headers = set()
-
creators = []
created_value_traits = set()
cmp_by_name = lambda cls1, cls2: cmp( cls1.decl_string, cls2.decl_string )
used_containers = list( self.__types_db.used_containers )
+ used_containers = filter( lambda cls: cls.indexing_suite.include_files
+ , used_containers )
used_containers.sort( cmp_by_name )
for cls in used_containers:
- container_name = cls.name.split( '<' )[0] + '<'
-
- if isinstance( cls.indexing_suite, decl_wrappers.indexing_suite1_t ):
- isuite = INDEXING_SUITE_1_CONTAINERS
- else:
- isuite = INDEXING_SUITE_2_CONTAINERS
-
- if not isuite.has_key( container_name ):
- continue #not supported
-
+ map( lambda header: self.__header_files_manager.include(header, system=True)
+ , cls.indexing_suite.include_files )
+
for msg in cls.readme():
self.decl_logger.warn( "%s;%s" % ( cls, msg ) )
- if isuite is INDEXING_SUITE_2_CONTAINERS:
- used_headers.add( INDEXING_SUITE_2_MAIN_HEADER )
-
- used_headers.add( isuite[ container_name ] )
-
cls_creator = create_cls_cc( cls )
self.__dependencies_manager.add_exported( cls )
creators.append( cls_creator )
@@ -319,7 +284,8 @@
element_type = cls.indexing_suite.element_type
except:
element_type = None
- if isuite is INDEXING_SUITE_1_CONTAINERS:
+
+ if isinstance( cls.indexing_suite, decl_wrappers.indexing_suite1_t ):
if not ( None is element_type ) \
and declarations.is_class( element_type ) \
and not declarations.has_public_equal( element_type ):
@@ -334,17 +300,7 @@
element_type_cc = code_creators.value_traits_t( value_cls )
self.__extmodule.adopt_declaration_creator( element_type_cc )
cls_creator.adopt_creator( code_creators.indexing_suite2_t(cls) )
-
- if INDEXING_SUITE_2_MAIN_HEADER in used_headers:
- #I want this header to be the first one.
- used_headers.remove( INDEXING_SUITE_2_MAIN_HEADER )
- self.__extmodule.add_system_header( INDEXING_SUITE_2_MAIN_HEADER )
- self.__extmodule.add_include( INDEXING_SUITE_2_MAIN_HEADER )
-
- for header in used_headers:
- self.__extmodule.add_system_header( header )
- self.__extmodule.add_include( header )
-
+
creators.reverse()
self.__module_body.adopt_creators( creators, 0 )
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rom...@us...> - 2007-04-05 18:55:54
|
Revision: 972
http://svn.sourceforge.net/pygccxml/?rev=972&view=rev
Author: roman_yakovenko
Date: 2007-04-05 11:55:54 -0700 (Thu, 05 Apr 2007)
Log Message:
-----------
updating docs
Modified Paths:
--------------
pyplusplus_dev/docs/troubleshooting_guide/exceptions/definition.rest
pyplusplus_dev/docs/troubleshooting_guide/exceptions/exceptions.cpp
pyplusplus_dev/docs/troubleshooting_guide/lessons_learned.rest
Modified: pyplusplus_dev/docs/troubleshooting_guide/exceptions/definition.rest
===================================================================
--- pyplusplus_dev/docs/troubleshooting_guide/exceptions/definition.rest 2007-04-05 17:57:40 UTC (rev 971)
+++ pyplusplus_dev/docs/troubleshooting_guide/exceptions/definition.rest 2007-04-05 18:55:54 UTC (rev 972)
@@ -1,4 +1,4 @@
-Boost.Python has a limitation: it does not allow to create classes, which derives
-from the classes defined in Python. It is impossible to solve the general use case,
-without changing the library, but it is pretty simple to create solution for
-"exception" classes.
+Boost.Python has a limitation: it does not allow to create class, which derives
+from the class defined in Python. In most use cases this should not bother you,
+except one - exceptions. The example will provide you with one of the possible
+solutions.
\ No newline at end of file
Modified: pyplusplus_dev/docs/troubleshooting_guide/exceptions/exceptions.cpp
===================================================================
--- pyplusplus_dev/docs/troubleshooting_guide/exceptions/exceptions.cpp 2007-04-05 17:57:40 UTC (rev 971)
+++ pyplusplus_dev/docs/troubleshooting_guide/exceptions/exceptions.cpp 2007-04-05 18:55:54 UTC (rev 972)
@@ -4,10 +4,14 @@
/**
* Content:
- * * example, which explain how to create custom exception class, which derives
- * from Python built-in exceptions
+ * * example, which explain how to create custom exception class, which gives
+ * expected behaviour to exceptions exposed using Boost.Python library.
+ *
+ * The example also allows you to map your exception classes to the Python
+ * built-in ones.
*
**/
+
class application_error : public std::exception{
public:
@@ -35,27 +39,32 @@
const std::string m_msg;
};
+//small dummy function that will conditionaly throws exception
void check_preconditions( bool raise_error ){
if( raise_error ){
throw application_error( "xyz" );
}
}
+//test function for custom r-value converter
std::string get_application_name( const application_error& err ){
return err.application_name();
}
namespace bpl = boost::python;
-struct exception_translator{
+struct exception_translator{
exception_translator(){
+
+ bpl::register_exception_translator<application_error>(&exception_translator::translate);
+
+ //Register custom r-value converter
+ //There are situations, where we have to pass the exception back to
+ //C++ library. This will do the trick
bpl::converter::registry::push_back( &exception_translator::convertible
, &exception_translator::construct
, bpl::type_id<application_error>() );
-
- bpl::register_exception_translator<application_error>(&exception_translator::translate);
-
}
static void
Modified: pyplusplus_dev/docs/troubleshooting_guide/lessons_learned.rest
===================================================================
--- pyplusplus_dev/docs/troubleshooting_guide/lessons_learned.rest 2007-04-05 17:57:40 UTC (rev 971)
+++ pyplusplus_dev/docs/troubleshooting_guide/lessons_learned.rest 2007-04-05 18:55:54 UTC (rev 972)
@@ -32,7 +32,12 @@
.. _`automatic conversion` : ./automatic_conversion/automatic_conversion.html
+`exceptions`_
+ .. include:: ./exceptions/definition.rest
+
+.. _`exceptions` : ./exceptions/exceptions.html
+
.. _`Py++` : ./../pyplusplus.html
.. _`pygccxml` : http://www.language-binding.net/pygccxml/pygccxml.html
.. _`SourceForge`: http://sourceforge.net/index.php
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rom...@us...> - 2007-04-05 17:57:39
|
Revision: 971
http://svn.sourceforge.net/pygccxml/?rev=971&view=rev
Author: roman_yakovenko
Date: 2007-04-05 10:57:40 -0700 (Thu, 05 Apr 2007)
Log Message:
-----------
changing exception implementation to be undependent on module location
Modified Paths:
--------------
pyplusplus_dev/docs/troubleshooting_guide/exceptions/exceptions.cpp
pyplusplus_dev/docs/troubleshooting_guide/exceptions/test.py
Modified: pyplusplus_dev/docs/troubleshooting_guide/exceptions/exceptions.cpp
===================================================================
--- pyplusplus_dev/docs/troubleshooting_guide/exceptions/exceptions.cpp 2007-04-05 15:55:43 UTC (rev 970)
+++ pyplusplus_dev/docs/troubleshooting_guide/exceptions/exceptions.cpp 2007-04-05 17:57:40 UTC (rev 971)
@@ -1,5 +1,6 @@
#include "boost/python.hpp"
#include <stdexcept>
+#include <iostream>
/**
* Content:
@@ -59,10 +60,10 @@
static void
translate( const application_error& err ){
- bpl::object this_module( bpl::handle<>( bpl::borrowed(PyImport_AddModule("my_exceptions"))));
- bpl::object app_exc_class = this_module.attr("application_error");
- bpl::object pyerr = app_exc_class( err );
- PyErr_SetObject( app_exc_class.ptr(), bpl::incref( pyerr.ptr() ) );
+ bpl::object pimpl_err( err );
+ bpl::object pyerr_class = pimpl_err.attr( "py_err_class" );
+ bpl::object pyerr = pyerr_class( pimpl_err );
+ PyErr_SetObject( pyerr_class.ptr(), bpl::incref( pyerr.ptr() ) );
}
//Sometimes, exceptions should be passed back to the library.
Modified: pyplusplus_dev/docs/troubleshooting_guide/exceptions/test.py
===================================================================
--- pyplusplus_dev/docs/troubleshooting_guide/exceptions/test.py 2007-04-05 15:55:43 UTC (rev 970)
+++ pyplusplus_dev/docs/troubleshooting_guide/exceptions/test.py 2007-04-05 17:57:40 UTC (rev 971)
@@ -17,6 +17,7 @@
return super(application_error,self).__getattribute__(attr)
my_exceptions.application_error = application_error
+my_exceptions._application_error_.py_err_class = application_error
class tester_t( unittest.TestCase ):
def __init__( self, *args ):
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rom...@us...> - 2007-04-05 15:55:42
|
Revision: 970
http://svn.sourceforge.net/pygccxml/?rev=970&view=rev
Author: roman_yakovenko
Date: 2007-04-05 08:55:43 -0700 (Thu, 05 Apr 2007)
Log Message:
-----------
fixing small bug
Modified Paths:
--------------
pyplusplus_dev/pyplusplus/module_creator/header_files_manager.py
Modified: pyplusplus_dev/pyplusplus/module_creator/header_files_manager.py
===================================================================
--- pyplusplus_dev/pyplusplus/module_creator/header_files_manager.py 2007-04-05 15:31:13 UTC (rev 969)
+++ pyplusplus_dev/pyplusplus/module_creator/header_files_manager.py 2007-04-05 15:55:43 UTC (rev 970)
@@ -17,16 +17,15 @@
self.__extmodule.add_system_header( "boost/python.hpp" )
self.__extmodule.adopt_creator( code_creators.include_t( header="boost/python.hpp" ) )
- def include( self, header, system=False, once=True, user_defined=False ):
- if once:
- normalized_header = self.normalize( header )
- if normalized_header in self.__already_included:
- return
- self.__extmodule.add_system_header( header )
+ def include( self, header, system=False, user_defined=False ):
+ normalized_header = self.normalize( header )
+ if normalized_header in self.__already_included:
+ return
+ else:
+ self.__already_included.add( normalized_header )
self.__extmodule.adopt_include( code_creators.include_t( header, user_defined=user_defined ) )
if system:
self.__extmodule.add_system_header( header )
-
def include_call_policy( self, call_policy ):
if not call_policy:
@@ -50,4 +49,4 @@
-
\ No newline at end of file
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ale...@us...> - 2007-04-05 15:31:17
|
Revision: 969
http://svn.sourceforge.net/pygccxml/?rev=969&view=rev
Author: alex_eisen
Date: 2007-04-05 08:31:13 -0700 (Thu, 05 Apr 2007)
Log Message:
-----------
- Restructured
- Added functionality
Modified Paths:
--------------
pyplusplus_dev/ide/ide.py
Added Paths:
-----------
pyplusplus_dev/ide/controllers/controller_main.py
pyplusplus_dev/ide/views/dialog_macro.py
pyplusplus_dev/ide/views/frame_main.py
Removed Paths:
-------------
pyplusplus_dev/ide/controllers/main.py
pyplusplus_dev/ide/views/main_frame.py
Added: pyplusplus_dev/ide/controllers/controller_main.py
===================================================================
--- pyplusplus_dev/ide/controllers/controller_main.py (rev 0)
+++ pyplusplus_dev/ide/controllers/controller_main.py 2007-04-05 15:31:13 UTC (rev 969)
@@ -0,0 +1,108 @@
+# -*- coding: utf-8 -*-
+# Copyright 2004 Roman Yakovenko.
+# 2007 Alexander Eisenhuth
+# 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 wx
+from views import dialog_macro
+
+""" Contoller class. Part of MVC
+Responsibility: Glue view and model code:
+- Handle all events from view (p.e. button) """
+class MainController:
+ def __init__(self, view):
+ self._view = view
+
+ # Give controller object to the view
+ self._view.set_controller(self)
+
+ def GenXmlCode(self):
+ """ Generate XML code"""
+ self._appendOutText("Generation of XML code staretd")
+
+ for i in range(0,5):
+ self._view.listIncludes.InsertStringItem(i, "First Element - this is a long")
+
+ def GenCppCode(self):
+ """ Generate Boost.Python code"""
+ self._appendOutText("Generation of C++ code for Boost.Python started")
+
+ def GenPyPPCode(self):
+ """ Generate Py++ code"""
+ self._appendOutText("Generation of Py++ code started")
+
+ def OpenDlgHeader(self):
+ """Open dialog to get header file"""
+ self._openFileDlgWithRelatedWxText( self._view.textHeader,
+ "Choose a Header file",
+ "Header (*.h)|*.h|All Files(*)|*")
+
+ def OpenDlgGccXml(self):
+ """Open dialog to get GccXml executable"""
+ self._openFileDlgWithRelatedWxText( self._view.textGccXml,
+ "Choose GccXml executable",
+ "All Files(*)|*")
+
+ def OpenDlgAddInclude(self):
+ """ """
+ self._appendOutText("Add inc")
+ dialog = wx.DirDialog(self._view, "Choose include directory", ".")
+ try:
+ if dialog.ShowModal() == wx.ID_OK:
+ cur_num = self._view.listIncludes.GetItemCount()
+ self._view.listIncludes.InsertStringItem(
+ cur_num, dialog.GetPath())
+ finally:
+ dialog.Destroy()
+
+ def OpenDlgAddMacro(self):
+ """ """
+ dialog = dialog_macro.MacroDialog(self._view)
+ if dialog.ShowModal() == wx.OK:
+ cur_num = self._view.listDefines.GetItemCount()
+ self._view.listDefines.InsertStringItem(
+ cur_num, dialog.textMacro.GetLineText(0))
+
+
+
+ def _openFileDlgWithRelatedWxText(self,
+ related_wx_text,
+ caption_txt="",
+ file_filter="All Files(*)|*",
+ dir_path="."):
+ """Open file open dialog and insert file in related wxText ctrl"""
+ dialog = wx.FileDialog(self._view, caption_txt,
+ dir_path, "", file_filter, wx.OPEN)
+ try:
+ if dialog.ShowModal() == wx.ID_OK:
+ related_wx_text.Clear()
+ related_wx_text.AppendText(dialog.GetPath())
+ finally:
+ dialog.Destroy()
+
+ def _appendOutText(self, text, type_of_text = 0):
+ """ append text with different error level"""
+ text_ctrl = self._view.textOutput
+ type_txt = "INFO"
+ # Error
+ if type_of_text == MainController._text_error:
+ type_txt = "ERROR"
+ text_ctrl.SetDefaultStyle(wx.TextAttr(wx.RED))
+ # Warning
+ elif type_of_text == MainController._text_warn:
+ type_txt = "WARN"
+ # Orange
+ text_ctrl.SetDefaultStyle(wx.TextAttr(wx.Color(255, 168, 7)))
+ # Info
+ else:
+ text_ctrl.SetDefaultStyle(wx.TextAttr(wx.BLACK))
+
+ text_ctrl.AppendText(type_txt + ": " + text + "\n")
+
+ _text_info = 0 # Text has informational character
+ _text_warn = 1 # Text has warning character
+ _text_error = 2 # Text has error character
+
+
\ No newline at end of file
Deleted: pyplusplus_dev/ide/controllers/main.py
===================================================================
--- pyplusplus_dev/ide/controllers/main.py 2007-04-04 21:05:12 UTC (rev 968)
+++ pyplusplus_dev/ide/controllers/main.py 2007-04-05 15:31:13 UTC (rev 969)
@@ -1,57 +0,0 @@
-# -*- coding: utf-8 -*-
-# Copyright 2004 Roman Yakovenko.
-# 2007 Alexander Eisenhuth
-# 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 wx
-
-""" Contoller class. Part of MVC
-Responsibility: Glue view and model code:
-- Handle all events from view (p.e. button) """
-class MainController:
- def __init__(self, view):
- self._view = view
-
- # Give controller object to the view
- self._view.set_controller(self)
-
- def GenXmlCode(self):
- """ Generate XML code"""
- self._appendOutText("Generation of XML code staretd")
-
- def GenCppCode(self):
- """ Generate Boost.Python code"""
- self._appendOutText("Generation of C++ code for Boost.Python started")
-
- def GenPyPPCode(self):
- """ Generate Py++ code"""
- self._appendOutText("Generation of Py++ code started")
-
- def OpenHeaderDlg(self):
- """ """
- dialog = wx.FileDialog(self._view, "Choose a Header file", ".", "",
- "Header (*.h)|*.h|All Files(*)|*", wx.OPEN)
- try:
- if dialog.ShowModal() == wx.ID_OK:
- self._view.textHeader.Clear()
- self._view.textHeader.AppendText(dialog.GetPath())
- finally:
- dialog.Destroy()
-
- def OpenGccXmlDlg(self):
- """ """
- dialog = wx.FileDialog(self._view, "Choose GccXml executable",
- ".", "", "All Files(*)|*", wx.OPEN)
- try:
- if dialog.ShowModal() == wx.ID_OK:
- self._view.textGccXml.Clear()
- self._view.textGccXml.AppendText(dialog.GetPath())
- finally:
- dialog.Destroy()
-
- def _appendOutText(self, text):
- self._view.textOutput.AppendText(text + "\n")
-
-
\ No newline at end of file
Modified: pyplusplus_dev/ide/ide.py
===================================================================
--- pyplusplus_dev/ide/ide.py 2007-04-04 21:05:12 UTC (rev 968)
+++ pyplusplus_dev/ide/ide.py 2007-04-05 15:31:13 UTC (rev 969)
@@ -10,10 +10,11 @@
import wx
-from views.main_frame import create as createMainFrame
-from controllers.main import MainController
+from views.frame_main import create as createMainFrame
+from controllers.controller_main import MainController
-modules ={u'main controller': [0, '', u'controllers/main.py'],
+modules ={u'dialog_macro': [0, '', u'views/dialog_macro.py'],
+ u'main controller': [0, '', u'controllers/main_controller.py'],
u'main view': [1, 'Main frame of ide', u'views/main_frame.py']}
class BoaApp(wx.App):
Added: pyplusplus_dev/ide/views/dialog_macro.py
===================================================================
--- pyplusplus_dev/ide/views/dialog_macro.py (rev 0)
+++ pyplusplus_dev/ide/views/dialog_macro.py 2007-04-05 15:31:13 UTC (rev 969)
@@ -0,0 +1,69 @@
+#Boa:Dialog:MacroDialog
+
+import wx
+
+def create(parent):
+ return MacroDialog(parent)
+
+[wxID_MACRODIALOG, wxID_MACRODIALOGBUTTONCANCEL, wxID_MACRODIALOGBUTTONOK,
+ wxID_MACRODIALOGPANELDOWN, wxID_MACRODIALOGPANELUP,
+ wxID_MACRODIALOGSTATICLINE1, wxID_MACRODIALOGSTATICTEXT1,
+ wxID_MACRODIALOGTEXTMACRO,
+] = [wx.NewId() for _init_ctrls in range(8)]
+
+class MacroDialog(wx.Dialog):
+ def _init_ctrls(self, prnt):
+ # generated method, don't edit
+ wx.Dialog.__init__(self, id=wxID_MACRODIALOG, name=u'MacroDialog',
+ parent=prnt, pos=wx.Point(127, 171), size=wx.Size(376, 231),
+ style=wx.DEFAULT_DIALOG_STYLE, title=u'Enter new Macro')
+ self.SetClientSize(wx.Size(368, 197))
+ self.SetMaxSize(wx.Size(376, 231))
+ self.SetMinSize(wx.Size(376, 231))
+
+ self.panelUp = wx.Panel(id=wxID_MACRODIALOGPANELUP, name=u'panelUp',
+ parent=self, pos=wx.Point(0, -8), size=wx.Size(368, 152),
+ style=wx.TAB_TRAVERSAL)
+
+ self.panelDown = wx.Panel(id=wxID_MACRODIALOGPANELDOWN,
+ name=u'panelDown', parent=self, pos=wx.Point(0, 144),
+ size=wx.Size(368, 74), style=wx.TAB_TRAVERSAL)
+
+ self.buttonOk = wx.Button(id=wxID_MACRODIALOGBUTTONOK, label=u'Ok',
+ name=u'buttonOk', parent=self.panelDown, pos=wx.Point(40, 17),
+ size=wx.Size(75, 23), style=0)
+ self.buttonOk.Bind(wx.EVT_BUTTON, self.OnButtonOk,
+ id=wxID_MACRODIALOGBUTTONOK)
+
+ self.buttonCancel = wx.Button(id=wxID_MACRODIALOGBUTTONCANCEL,
+ label=u'Cancel', name=u'buttonCancel', parent=self.panelDown,
+ pos=wx.Point(256, 16), size=wx.Size(75, 23), style=0)
+ self.buttonCancel.Bind(wx.EVT_BUTTON, self.OnButtonCancel,
+ id=wxID_MACRODIALOGBUTTONCANCEL)
+
+ self.staticLine1 = wx.StaticLine(id=wxID_MACRODIALOGSTATICLINE1,
+ name='staticLine1', parent=self.panelDown, pos=wx.Point(9, 0),
+ size=wx.Size(343, 2), style=0)
+
+ self.textMacro = wx.TextCtrl(id=wxID_MACRODIALOGTEXTMACRO,
+ name=u'textMacro', parent=self.panelUp, pos=wx.Point(32, 40),
+ size=wx.Size(304, 88), style=wx.TE_MULTILINE, value=u'')
+
+ self.staticText1 = wx.StaticText(id=wxID_MACRODIALOGSTATICTEXT1,
+ label=u'Definition of macro (ABS=12)', name='staticText1',
+ parent=self.panelUp, pos=wx.Point(32, 24), size=wx.Size(140, 13),
+ style=0)
+
+ def __init__(self, parent):
+ self._init_ctrls(parent)
+
+ def OnButtonOk(self, event):
+ """End modal dialog with True"""
+ self.EndModal(wx.OK)
+ event.Skip()
+
+ def OnButtonCancel(self, event):
+ """End modal dialog with False"""
+ self.EndModal(wx.CANCEL)
+ event.Skip()
+
Copied: pyplusplus_dev/ide/views/frame_main.py (from rev 962, pyplusplus_dev/ide/views/main_frame.py)
===================================================================
--- pyplusplus_dev/ide/views/frame_main.py (rev 0)
+++ pyplusplus_dev/ide/views/frame_main.py 2007-04-05 15:31:13 UTC (rev 969)
@@ -0,0 +1,534 @@
+#Boa:Frame:MainFrame
+
+# Copyright 2004 Roman Yakovenko.
+# 2007 Alexander Eisenhuth
+# 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)
+
+
+""" Contains the iplementation of the main frame of the application.
+Most of the code was build with BOA"""
+
+import wx
+
+def create(parent):
+ return MainFrame(parent)
+
+[wxID_MAINFRAMEMENUEFILEEXIT, wxID_MAINFRAMEMENUEFILENEW,
+ wxID_MAINFRAMEMENUEFILEOPEN, wxID_MAINFRAMEMENUEFILERECENT,
+ wxID_MAINFRAMEMENUEFILESAVE,
+] = [wx.NewId() for _init_coll_menueFile_Items in range(5)]
+
+[wxID_MAINFRAMEMENUINCLUDESADDINC, wxID_MAINFRAMEMENUINCLUDESITEMS1,
+] = [wx.NewId() for _init_coll_menuIncludes_Items in range(2)]
+
+[wxID_MAINFRAMEMENUDEFINESADDDEF, wxID_MAINFRAMEMENUDEFINESREMOVEDEF,
+] = [wx.NewId() for _init_coll_menuDefines_Items in range(2)]
+
+[wxID_MAINFRAME, wxID_MAINFRAMEBUTGCCXML, wxID_MAINFRAMEBUTGENCPP,
+ wxID_MAINFRAMEBUTGENPYPP, wxID_MAINFRAMEBUTGENXML, wxID_MAINFRAMEBUTHEADERS,
+ wxID_MAINFRAMELISTDEFINES, wxID_MAINFRAMELISTINCLUDES,
+ wxID_MAINFRAMENBSETTINGS, wxID_MAINFRAMENOTEBOOK1,
+ wxID_MAINFRAMEPANELBUTTONS, wxID_MAINFRAMEPANELCODE, wxID_MAINFRAMEPANELMAIN,
+ wxID_MAINFRAMEPANELNBSETTINGS, wxID_MAINFRAMEPANELSETTINGS,
+ wxID_MAINFRAMEPANELSHLOW, wxID_MAINFRAMEPANELSHUP,
+ wxID_MAINFRAMESPLITTERHORIZONTAL, wxID_MAINFRAMESPLITTERVERTICAL,
+ wxID_MAINFRAMESTATICTEXT1, wxID_MAINFRAMESTATICTEXT2,
+ wxID_MAINFRAMESTATICTEXT3, wxID_MAINFRAMESTATICTEXT4,
+ wxID_MAINFRAMESTATICTEXT5, wxID_MAINFRAMESTATUSBAR, wxID_MAINFRAMETEXTCTRL2,
+ wxID_MAINFRAMETEXTGCCXML, wxID_MAINFRAMETEXTHEADER, wxID_MAINFRAMETEXTOUTPUT,
+] = [wx.NewId() for _init_ctrls in range(29)]
+
+class MainFrame(wx.Frame):
+ """ Main frame class. Part of MVC """
+
+ def _init_coll_bsGccXml_Items(self, parent):
+ # generated method, don't edit
+
+ parent.AddWindow(self.staticText2, 0, border=5,
+ flag=wx.ALIGN_CENTER_VERTICAL | wx.LEFT)
+ parent.AddWindow(self.textGccXml, 1, border=10,
+ flag=wx.ALIGN_CENTER_VERTICAL | wx.TOP | wx.BOTTOM)
+ parent.AddWindow(self.butGccXml, 0, border=10,
+ flag=wx.LEFT | wx.RIGHT | wx.ALIGN_CENTER_VERTICAL)
+
+ def _init_coll_bsMURCompile_Items(self, parent):
+ # generated method, don't edit
+
+ parent.AddWindow(self.textCtrl2, 1, border=0, flag=wx.EXPAND)
+
+ def _init_coll_bsMain_Items(self, parent):
+ # generated method, don't edit
+
+ parent.AddWindow(self.splitterHorizontal, 1, border=5,
+ flag=wx.ALL | wx.EXPAND)
+
+ def _init_coll_bsIncPath_Items(self, parent):
+ # generated method, don't edit
+
+ parent.AddWindow(self.staticText3, 0, border=5,
+ flag=wx.ALIGN_CENTER_VERTICAL | wx.LEFT)
+ parent.AddWindow(self.listIncludes, 1, border=10,
+ flag=wx.RIGHT | wx.BOTTOM | wx.TOP | wx.EXPAND | wx.ALIGN_CENTER_VERTICAL)
+
+ def _init_coll_bsHeader_Items(self, parent):
+ # generated method, don't edit
+
+ parent.AddWindow(self.staticText1, 0, border=5,
+ flag=wx.LEFT | wx.ALIGN_CENTER_VERTICAL)
+ parent.AddWindow(self.textHeader, 1, border=10,
+ flag=wx.ALIGN_CENTER_VERTICAL | wx.BOTTOM | wx.TOP)
+ parent.AddWindow(self.butHeaders, 0, border=10,
+ flag=wx.LEFT | wx.RIGHT | wx.ALIGN_CENTER_VERTICAL)
+
+ def _init_coll_bsUpLeft_Items(self, parent):
+ # generated method, don't edit
+
+ parent.AddWindow(self.nbSettings, 1, border=0, flag=wx.ALL | wx.EXPAND)
+
+ def _init_coll_bsMURButtons_Items(self, parent):
+ # generated method, don't edit
+
+ parent.AddWindow(self.butGenXml, 0, border=10,
+ flag=wx.RIGHT | wx.LEFT | wx.ALIGN_CENTER_VERTICAL)
+ parent.AddWindow(self.butGenCpp, 0, border=10,
+ flag=wx.LEFT | wx.RIGHT | wx.ALIGN_CENTER | wx.ALIGN_CENTER_VERTICAL)
+ parent.AddWindow(self.butGenPyPP, 0, border=10,
+ flag=wx.RIGHT | wx.LEFT | wx.ALIGN_RIGHT | wx.ALIGN_CENTER_VERTICAL)
+
+ def _init_coll_bsMainUpper_Items(self, parent):
+ # generated method, don't edit
+
+ parent.AddWindow(self.splitterVertical, 1, border=5,
+ flag=wx.BOTTOM | wx.EXPAND)
+
+ def _init_coll_bsMainLow_Items(self, parent):
+ # generated method, don't edit
+
+ parent.AddWindow(self.notebook1, 1, border=0, flag=wx.EXPAND)
+
+ def _init_coll_bsUpRight_Items(self, parent):
+ # generated method, don't edit
+
+ parent.AddWindow(self.staticText5, 0, border=0, flag=0)
+ parent.AddSizer(self.bsMURCompile, 1, border=4, flag=wx.TOP | wx.EXPAND)
+ parent.AddWindow(self.panelButtons, 0, border=10,
+ flag=wx.ALIGN_CENTER_HORIZONTAL | wx.TOP)
+
+ def _init_coll_bsMULSettings_Items(self, parent):
+ # generated method, don't edit
+
+ parent.AddSpacer((10, 10), border=0, flag=0)
+ parent.AddSizer(self.bsHeader, 0, border=5, flag=wx.RIGHT | wx.EXPAND)
+ parent.AddSizer(self.bsGccXml, 0, border=5, flag=wx.RIGHT | wx.EXPAND)
+ parent.AddSizer(self.bsIncPath, 0, border=5, flag=wx.RIGHT | wx.EXPAND)
+ parent.AddSizer(self.bsDefines, 0, border=5, flag=wx.RIGHT | wx.EXPAND)
+
+ def _init_coll_bsDefines_Items(self, parent):
+ # generated method, don't edit
+
+ parent.AddWindow(self.staticText4, 0, border=5,
+ flag=wx.ALIGN_CENTER_VERTICAL | wx.LEFT)
+ parent.AddWindow(self.listDefines, 1, border=10,
+ flag=wx.RIGHT | wx.BOTTOM | wx.TOP | wx.ALIGN_CENTER_VERTICAL | wx.EXPAND)
+
+ def _init_coll_menuBar_Menus(self, parent):
+ # generated method, don't edit
+
+ parent.Append(menu=self.menueFile, title=u'&File')
+
+ def _init_coll_menuIncludes_Items(self, parent):
+ # generated method, don't edit
+
+ parent.Append(help=u'Add new include directory for gcc',
+ id=wxID_MAINFRAMEMENUINCLUDESADDINC, kind=wx.ITEM_NORMAL,
+ text=u'Add ...')
+ parent.Append(help=u'Remove selected include directory',
+ id=wxID_MAINFRAMEMENUINCLUDESITEMS1, kind=wx.ITEM_NORMAL,
+ text=u'Remove')
+ self.Bind(wx.EVT_MENU, self.OnMenueIncludesAdd,
+ id=wxID_MAINFRAMEMENUINCLUDESADDINC)
+ self.Bind(wx.EVT_MENU, self.OnMenueIncludesRemove,
+ id=wxID_MAINFRAMEMENUINCLUDESITEMS1)
+
+ def _init_coll_menueFile_Items(self, parent):
+ # generated method, don't edit
+
+ parent.Append(help=u'Create new Project', id=wxID_MAINFRAMEMENUEFILENEW,
+ kind=wx.ITEM_NORMAL, text=u'&New Project')
+ parent.Append(help=u'Open existing Project',
+ id=wxID_MAINFRAMEMENUEFILEOPEN, kind=wx.ITEM_NORMAL,
+ text=u'&Open Project')
+ parent.Append(help=u'Save current Project',
+ id=wxID_MAINFRAMEMENUEFILESAVE, kind=wx.ITEM_NORMAL,
+ text=u'&Save Project')
+ parent.AppendSeparator()
+ parent.AppendMenu(help=u'Open recently used Project',
+ id=wxID_MAINFRAMEMENUEFILERECENT, submenu=wx.Menu(),
+ text=u'Recent Projects')
+ parent.AppendSeparator()
+ parent.Append(help='', id=wxID_MAINFRAMEMENUEFILEEXIT,
+ kind=wx.ITEM_NORMAL, text=u'&Exit')
+ self.Bind(wx.EVT_MENU, self.OnMenueFileNewMenu,
+ id=wxID_MAINFRAMEMENUEFILENEW)
+ self.Bind(wx.EVT_MENU, self.OnMenueFileOpenMenu,
+ id=wxID_MAINFRAMEMENUEFILEOPEN)
+ self.Bind(wx.EVT_MENU, self.OnMenueFileSaveMenu,
+ id=wxID_MAINFRAMEMENUEFILESAVE)
+ self.Bind(wx.EVT_MENU, self.OnMenueFileExitMenu,
+ id=wxID_MAINFRAMEMENUEFILEEXIT)
+
+ def _init_coll_menuDefines_Items(self, parent):
+ # generated method, don't edit
+
+ parent.Append(help=u'Add new define for gcc',
+ id=wxID_MAINFRAMEMENUDEFINESADDDEF, kind=wx.ITEM_NORMAL,
+ text=u'Add ...')
+ parent.Append(help=u'Remove selected define',
+ id=wxID_MAINFRAMEMENUDEFINESREMOVEDEF, kind=wx.ITEM_NORMAL,
+ text=u'Remove')
+ self.Bind(wx.EVT_MENU, self.OnMenueDefinesAddDefine,
+ id=wxID_MAINFRAMEMENUDEFINESADDDEF)
+ self.Bind(wx.EVT_MENU, self.OnMenueDefinesRemoveDefine,
+ id=wxID_MAINFRAMEMENUDEFINESREMOVEDEF)
+
+ def _init_coll_nbSettings_Pages(self, parent):
+ # generated method, don't edit
+
+ parent.AddPage(imageId=-1, page=self.panelNbSettings, select=True,
+ text=u'Settings')
+
+ def _init_coll_notebook1_Pages(self, parent):
+ # generated method, don't edit
+
+ parent.AddPage(imageId=-1, page=self.textOutput, select=True,
+ text=u'Output')
+
+ def _init_coll_statusBar_Fields(self, parent):
+ # generated method, don't edit
+ parent.SetFieldsCount(3)
+
+ parent.SetStatusText(number=0, text=u'<helptextOrStatus>')
+ parent.SetStatusText(number=1, text=u'<parseTime>')
+ parent.SetStatusText(number=2, text=u'<compileTime>')
+
+ parent.SetStatusWidths([-1, -1, -1])
+
+ def _init_sizers(self):
+ # generated method, don't edit
+ self.bsMain = wx.BoxSizer(orient=wx.VERTICAL)
+
+ self.bsMainUpper = wx.BoxSizer(orient=wx.VERTICAL)
+
+ self.bsMainLow = wx.BoxSizer(orient=wx.VERTICAL)
+
+ self.bsUpLeft = wx.BoxSizer(orient=wx.VERTICAL)
+
+ self.bsUpRight = wx.BoxSizer(orient=wx.VERTICAL)
+
+ self.bsMULSettings = wx.BoxSizer(orient=wx.VERTICAL)
+
+ self.bsMURCompile = wx.BoxSizer(orient=wx.VERTICAL)
+
+ self.bsMURButtons = wx.BoxSizer(orient=wx.HORIZONTAL)
+
+ self.bsHeader = wx.BoxSizer(orient=wx.HORIZONTAL)
+
+ self.bsGccXml = wx.BoxSizer(orient=wx.HORIZONTAL)
+
+ self.bsIncPath = wx.BoxSizer(orient=wx.HORIZONTAL)
+
+ self.bsDefines = wx.BoxSizer(orient=wx.HORIZONTAL)
+
+ self._init_coll_bsMain_Items(self.bsMain)
+ self._init_coll_bsMainUpper_Items(self.bsMainUpper)
+ self._init_coll_bsMainLow_Items(self.bsMainLow)
+ self._init_coll_bsUpLeft_Items(self.bsUpLeft)
+ self._init_coll_bsUpRight_Items(self.bsUpRight)
+ self._init_coll_bsMULSettings_Items(self.bsMULSettings)
+ self._init_coll_bsMURCompile_Items(self.bsMURCompile)
+ self._init_coll_bsMURButtons_Items(self.bsMURButtons)
+ self._init_coll_bsHeader_Items(self.bsHeader)
+ self._init_coll_bsGccXml_Items(self.bsGccXml)
+ self._init_coll_bsIncPath_Items(self.bsIncPath)
+ self._init_coll_bsDefines_Items(self.bsDefines)
+
+ self.panelSHUp.SetSizer(self.bsMainUpper)
+ self.panelSettings.SetSizer(self.bsUpLeft)
+ self.panelButtons.SetSizer(self.bsMURButtons)
+ self.panelSHLow.SetSizer(self.bsMainLow)
+ self.panelMain.SetSizer(self.bsMain)
+ self.panelCode.SetSizer(self.bsUpRight)
+ self.panelNbSettings.SetSizer(self.bsMULSettings)
+
+ def _init_utils(self):
+ # generated method, don't edit
+ self.menueFile = wx.Menu(title='')
+
+ self.menuBar = wx.MenuBar()
+
+ self.menuIncludes = wx.Menu(title='')
+
+ self.menuDefines = wx.Menu(title='')
+
+ self._init_coll_menueFile_Items(self.menueFile)
+ self._init_coll_menuBar_Menus(self.menuBar)
+ self._init_coll_menuIncludes_Items(self.menuIncludes)
+ self._init_coll_menuDefines_Items(self.menuDefines)
+
+ def _init_ctrls(self, prnt):
+ # generated method, don't edit
+ wx.Frame.__init__(self, id=wxID_MAINFRAME, name=u'MainFrame',
+ parent=prnt, pos=wx.Point(0, -2), size=wx.Size(851, 620),
+ style=wx.DEFAULT_FRAME_STYLE, title=u'Py++ Code generator')
+ self._init_utils()
+ self.SetClientSize(wx.Size(843, 586))
+ self.SetMenuBar(self.menuBar)
+
+ self.statusBar = wx.StatusBar(id=wxID_MAINFRAMESTATUSBAR,
+ name=u'statusBar', parent=self, style=0)
+ self._init_coll_statusBar_Fields(self.statusBar)
+ self.SetStatusBar(self.statusBar)
+
+ self.panelMain = wx.Panel(id=wxID_MAINFRAMEPANELMAIN, name=u'panelMain',
+ parent=self, pos=wx.Point(0, 0), size=wx.Size(843, 543),
+ style=wx.TAB_TRAVERSAL)
+
+ self.splitterHorizontal = wx.SplitterWindow(id=wxID_MAINFRAMESPLITTERHORIZONTAL,
+ name=u'splitterHorizontal', parent=self.panelMain, pos=wx.Point(5,
+ 5), size=wx.Size(833, 533), style=0)
+ self.splitterHorizontal.SetNeedUpdating(False)
+ self.splitterHorizontal.SetMinimumPaneSize(0)
+
+ self.panelSHUp = wx.Panel(id=wxID_MAINFRAMEPANELSHUP, name=u'panelSHUp',
+ parent=self.splitterHorizontal, pos=wx.Point(0, 0),
+ size=wx.Size(833, 10), style=wx.TAB_TRAVERSAL)
+
+ self.panelSHLow = wx.Panel(id=wxID_MAINFRAMEPANELSHLOW,
+ name=u'panelSHLow', parent=self.splitterHorizontal,
+ pos=wx.Point(0, 14), size=wx.Size(833, 519),
+ style=wx.TAB_TRAVERSAL)
+ self.splitterHorizontal.SplitHorizontally(self.panelSHUp,
+ self.panelSHLow, 300)
+
+ self.notebook1 = wx.Notebook(id=wxID_MAINFRAMENOTEBOOK1,
+ name='notebook1', parent=self.panelSHLow, pos=wx.Point(0, 0),
+ size=wx.Size(833, 519), style=0)
+ self.notebook1.SetLabel(u'Label')
+
+ self.textOutput = wx.TextCtrl(id=wxID_MAINFRAMETEXTOUTPUT,
+ name=u'textOutput', parent=self.notebook1, pos=wx.Point(0, 0),
+ size=wx.Size(825, 493),
+ style=wx.TE_RICH | wx.TE_READONLY | wx.TE_MULTILINE, value=u'')
+
+ self.splitterVertical = wx.SplitterWindow(id=wxID_MAINFRAMESPLITTERVERTICAL,
+ name=u'splitterVertical', parent=self.panelSHUp, pos=wx.Point(0,
+ 0), size=wx.Size(833, 5), style=wx.SP_3D)
+ self.splitterVertical.SetNeedUpdating(True)
+ self.splitterVertical.SetMinimumPaneSize(0)
+
+ self.panelSettings = wx.Panel(id=wxID_MAINFRAMEPANELSETTINGS,
+ name=u'panelSettings', parent=self.splitterVertical,
+ pos=wx.Point(0, 0), size=wx.Size(10, 5), style=wx.TAB_TRAVERSAL)
+
+ self.panelCode = wx.Panel(id=wxID_MAINFRAMEPANELCODE, name=u'panelCode',
+ parent=self.splitterVertical, pos=wx.Point(14, 0),
+ size=wx.Size(819, 5), style=wx.TAB_TRAVERSAL)
+ self.splitterVertical.SplitVertically(self.panelSettings,
+ self.panelCode, 300)
+
+ self.nbSettings = wx.Notebook(id=wxID_MAINFRAMENBSETTINGS,
+ name=u'nbSettings', parent=self.panelSettings, pos=wx.Point(0, 0),
+ size=wx.Size(10, 5), style=0)
+ self.nbSettings.SetLabel(u'Label')
+ self.nbSettings.SetHelpText(u'')
+
+ self.panelNbSettings = wx.Panel(id=wxID_MAINFRAMEPANELNBSETTINGS,
+ name=u'panelNbSettings', parent=self.nbSettings, pos=wx.Point(0,
+ 0), size=wx.Size(2, 0), style=wx.TAB_TRAVERSAL)
+ self.panelNbSettings.Show(True)
+ self.panelNbSettings.SetMinSize(wx.Size(100, 100))
+
+ self.textCtrl2 = wx.TextCtrl(id=wxID_MAINFRAMETEXTCTRL2,
+ name='textCtrl2', parent=self.panelCode, pos=wx.Point(0, 17),
+ size=wx.Size(819, 0), style=wx.TE_MULTILINE, value=u'')
+
+ self.panelButtons = wx.Panel(id=wxID_MAINFRAMEPANELBUTTONS,
+ name=u'panelButtons', parent=self.panelCode, pos=wx.Point(166,
+ -18), size=wx.Size(486, 23), style=wx.TAB_TRAVERSAL)
+
+ self.butGenXml = wx.Button(id=wxID_MAINFRAMEBUTGENXML,
+ label=u'Generate XML code', name=u'butGenXml',
+ parent=self.panelButtons, pos=wx.Point(10, 0), size=wx.Size(140,
+ 23), style=0)
+ self.butGenXml.Bind(wx.EVT_BUTTON, self.OnButGenXmlButton,
+ id=wxID_MAINFRAMEBUTGENXML)
+
+ self.butGenCpp = wx.Button(id=wxID_MAINFRAMEBUTGENCPP,
+ label=u'Generate C++ code', name=u'butGenCpp',
+ parent=self.panelButtons, pos=wx.Point(170, 0), size=wx.Size(142,
+ 23), style=0)
+ self.butGenCpp.Bind(wx.EVT_BUTTON, self.OnButGenCppButton,
+ id=wxID_MAINFRAMEBUTGENCPP)
+
+ self.butGenPyPP = wx.Button(id=wxID_MAINFRAMEBUTGENPYPP,
+ label=u'Generate Py++ code', name=u'butGenPyPP',
+ parent=self.panelButtons, pos=wx.Point(332, 0), size=wx.Size(144,
+ 23), style=0)
+ self.butGenPyPP.Bind(wx.EVT_BUTTON, self.OnButGenPyPPButton,
+ id=wxID_MAINFRAMEBUTGENPYPP)
+
+ self.textHeader = wx.TextCtrl(id=wxID_MAINFRAMETEXTHEADER,
+ name=u'textHeader', parent=self.panelNbSettings, pos=wx.Point(56,
+ 20), size=wx.Size(0, 21), style=0, value=u'')
+
+ self.butHeaders = wx.Button(id=wxID_MAINFRAMEBUTHEADERS, label=u'...',
+ name=u'butHeaders', parent=self.panelNbSettings, pos=wx.Point(-38,
+ 19), size=wx.Size(28, 23), style=0)
+ self.butHeaders.Bind(wx.EVT_BUTTON, self.OnButHeadersButton,
+ id=wxID_MAINFRAMEBUTHEADERS)
+
+ self.staticText1 = wx.StaticText(id=wxID_MAINFRAMESTATICTEXT1,
+ label=u'Header\nFile', name='staticText1',
+ parent=self.panelNbSettings, pos=wx.Point(5, 15), size=wx.Size(51,
+ 30), style=wx.ALIGN_CENTRE)
+
+ self.staticText2 = wx.StaticText(id=wxID_MAINFRAMESTATICTEXT2,
+ label=u'GccXml', name='staticText2', parent=self.panelNbSettings,
+ pos=wx.Point(5, 60), size=wx.Size(51, 23), style=wx.ALIGN_CENTRE)
+
+ self.textGccXml = wx.TextCtrl(id=wxID_MAINFRAMETEXTGCCXML,
+ name=u'textGccXml', parent=self.panelNbSettings, pos=wx.Point(56,
+ 61), size=wx.Size(0, 21), style=0, value=u'')
+
+ self.butGccXml = wx.Button(id=wxID_MAINFRAMEBUTGCCXML, label=u'...',
+ name=u'butGccXml', parent=self.panelNbSettings, pos=wx.Point(-38,
+ 60), size=wx.Size(28, 23), style=0)
+ self.butGccXml.Bind(wx.EVT_BUTTON, self.OnButGccXmlButton,
+ id=wxID_MAINFRAMEBUTGCCXML)
+
+ self.staticText3 = wx.StaticText(id=wxID_MAINFRAMESTATICTEXT3,
+ label=u'Include\nPath', name='staticText3',
+ parent=self.panelNbSettings, pos=wx.Point(5, 116),
+ size=wx.Size(51, 37), style=wx.ALIGN_CENTRE)
+
+ self.listIncludes = wx.ListCtrl(id=wxID_MAINFRAMELISTINCLUDES,
+ name=u'listIncludes', parent=self.panelNbSettings,
+ pos=wx.Point(56, 102), size=wx.Size(0, 66),
+ style=wx.LC_HRULES | wx.LC_NO_HEADER | wx.LC_REPORT)
+ self.listIncludes.Bind(wx.EVT_RIGHT_DOWN, self.OnListIncludesRightDown)
+ self.listIncludes.Bind(wx.EVT_SIZE, self.OnListIncludesSize)
+
+ self.staticText4 = wx.StaticText(id=wxID_MAINFRAMESTATICTEXT4,
+ label=u'Defines', name='staticText4', parent=self.panelNbSettings,
+ pos=wx.Point(5, 209), size=wx.Size(51, 25),
+ style=wx.ALIGN_CENTRE)
+
+ self.listDefines = wx.ListCtrl(id=wxID_MAINFRAMELISTDEFINES,
+ name=u'listDefines', parent=self.panelNbSettings, pos=wx.Point(56,
+ 188), size=wx.Size(0, 68),
+ style=wx.LC_HRULES | wx.LC_NO_HEADER | wx.LC_REPORT)
+ self.listDefines.Bind(wx.EVT_RIGHT_DOWN, self.OnListDefinesRightDown)
+ self.listDefines.Bind(wx.EVT_SIZE, self.OnListDefinesSize)
+
+ self.staticText5 = wx.StaticText(id=wxID_MAINFRAMESTATICTEXT5,
+ label=u'Code', name='staticText5', parent=self.panelCode,
+ pos=wx.Point(0, 0), size=wx.Size(25, 13), style=0)
+
+ self._init_coll_notebook1_Pages(self.notebook1)
+ self._init_coll_nbSettings_Pages(self.nbSettings)
+
+ self._init_sizers()
+
+ def __init__(self, parent):
+ self._init_ctrls(parent)
+ self._setup_ide_ctrls()
+ self.SetSize((self.GetSize()[0]+1,self.GetSize()[1]+1))
+
+ def OnMenueFileNewMenu(self, event):
+ event.Skip()
+
+ def OnMenueFileOpenMenu(self, event):
+ event.Skip()
+
+ def OnMenueFileSaveMenu(self, event):
+ event.Skip()
+
+ def OnMenueFileRecentMenu(self, event):
+ event.Skip()
+
+ def OnMenueFileExitMenu(self, event):
+ event.Skip()
+
+ def OnTextGenCodeRightDown(self, event):
+ event.Skip()
+
+ def OnListIncludesRightDown(self, event):
+ self.PopupMenu(self.menuIncludes)
+
+ def OnListDefinesRightDown(self, event):
+ self.PopupMenu(self.menuDefines)
+
+ def OnButGenXmlButton(self, event):
+ self._controller.GenXmlCode()
+
+ def OnButGenCppButton(self, event):
+ self._controller.GenCppCode()
+
+ def OnButGenPyPPButton(self, event):
+ self._controller.GenPyPPCode()
+
+ def OnButHeadersButton(self, event):
+ """Callback for button event"""
+ self._controller.OpenDlgHeader()
+ event.Skip()
+
+ def OnButGccXmlButton(self, event):
+ """Callback for button event"""
+ self._controller.OpenDlgGccXml()
+ event.Skip()
+
+ def set_controller(self, controller):
+ """Set controller of MVC"""
+ self._controller = controller
+
+ def _setup_ide_ctrls(self):
+ """Do ide related settings in ctrls"""
+ list_inc = self.listIncludes
+ list_def = self.listDefines
+
+ # Init list controls
+ for list_ctrl in (list_inc, list_def):
+ list_ctrl.InsertColumn(0, "Path")
+
+ def OnListIncludesSize(self, event):
+ """Handle resize of listIncludes"""
+ list_ctrl = self.listIncludes
+ list_ctrl.SetColumnWidth(0, list_ctrl.GetSize().GetWidth() - 30 )
+ event.Skip()
+
+ def OnListDefinesSize(self, event):
+ """Handle resize of listDefines"""
+ list_ctrl = self.listDefines
+ list_ctrl.SetColumnWidth(0, list_ctrl.GetSize().GetWidth() - 30 )
+ event.Skip()
+
+ def OnMenueIncludesAdd(self, event):
+ self._controller.OpenDlgAddInclude()
+ event.Skip()
+
+ def OnMenueIncludesRemove(self, event):
+ event.Skip()
+
+ def OnMenueDefinesAddDefine(self, event):
+ self._controller.OpenDlgAddMacro()
+ event.Skip()
+
+ def OnMenueDefinesRemoveDefine(self, event):
+ event.Skip()
+
+
+
+
+
Deleted: pyplusplus_dev/ide/views/main_frame.py
===================================================================
--- pyplusplus_dev/ide/views/main_frame.py 2007-04-04 21:05:12 UTC (rev 968)
+++ pyplusplus_dev/ide/views/main_frame.py 2007-04-05 15:31:13 UTC (rev 969)
@@ -1,478 +0,0 @@
-#Boa:Frame:MainFrame
-from Dialog import Dialog
-
-# Copyright 2004 Roman Yakovenko.
-# 2007 Alexander Eisenhuth
-# 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)
-
-
-""" Contains the iplementation of the main frame of the application.
-Most of the code was build with BOA"""
-
-import wx
-
-def create(parent):
- return MainFrame(parent)
-
-[wxID_MAINFRAMEMENUEFILEEXIT, wxID_MAINFRAMEMENUEFILENEW,
- wxID_MAINFRAMEMENUEFILEOPEN, wxID_MAINFRAMEMENUEFILERECENT,
- wxID_MAINFRAMEMENUEFILESAVE,
-] = [wx.NewId() for _init_coll_menueFile_Items in range(5)]
-
-[wxID_MAINFRAMEMENUINCLUDESADDINC, wxID_MAINFRAMEMENUINCLUDESITEMS1,
-] = [wx.NewId() for _init_coll_menuIncludes_Items in range(2)]
-
-[wxID_MAINFRAMEMENUDEFINESADDDEF, wxID_MAINFRAMEMENUDEFINESREMOVEDEF,
-] = [wx.NewId() for _init_coll_menuDefines_Items in range(2)]
-
-[wxID_MAINFRAME, wxID_MAINFRAMEBUTGCCXML, wxID_MAINFRAMEBUTGENCPP,
- wxID_MAINFRAMEBUTGENPYPP, wxID_MAINFRAMEBUTGENXML, wxID_MAINFRAMEBUTHEADERS,
- wxID_MAINFRAMELISTDEFINES, wxID_MAINFRAMELISTINCLUDES,
- wxID_MAINFRAMENBSETTINGS, wxID_MAINFRAMENOTEBOOK1,
- wxID_MAINFRAMEPANELBUTTONS, wxID_MAINFRAMEPANELCODE, wxID_MAINFRAMEPANELMAIN,
- wxID_MAINFRAMEPANELNBSETTINGS, wxID_MAINFRAMEPANELSETTINGS,
- wxID_MAINFRAMEPANELSHLOW, wxID_MAINFRAMEPANELSHUP,
- wxID_MAINFRAMESPLITTERHORIZONTAL, wxID_MAINFRAMESPLITTERVERTICAL,
- wxID_MAINFRAMESTATICTEXT1, wxID_MAINFRAMESTATICTEXT2,
- wxID_MAINFRAMESTATICTEXT3, wxID_MAINFRAMESTATICTEXT4,
- wxID_MAINFRAMESTATICTEXT5, wxID_MAINFRAMESTATUSBAR, wxID_MAINFRAMETEXTCTRL2,
- wxID_MAINFRAMETEXTGCCXML, wxID_MAINFRAMETEXTHEADER, wxID_MAINFRAMETEXTOUTPUT,
-] = [wx.NewId() for _init_ctrls in range(29)]
-
-class MainFrame(wx.Frame):
- """ Main frame class. Part of MVC """
-
- def _init_coll_bsGccXml_Items(self, parent):
- # generated method, don't edit
-
- parent.AddWindow(self.staticText2, 0, border=5,
- flag=wx.ALIGN_CENTER_VERTICAL | wx.LEFT)
- parent.AddWindow(self.textGccXml, 1, border=10,
- flag=wx.ALIGN_CENTER_VERTICAL | wx.TOP | wx.BOTTOM)
- parent.AddWindow(self.butGccXml, 0, border=10,
- flag=wx.LEFT | wx.RIGHT | wx.ALIGN_CENTER_VERTICAL)
-
- def _init_coll_bsMURCompile_Items(self, parent):
- # generated method, don't edit
-
- parent.AddWindow(self.textCtrl2, 1, border=0, flag=wx.EXPAND)
-
- def _init_coll_bsMain_Items(self, parent):
- # generated method, don't edit
-
- parent.AddWindow(self.splitterHorizontal, 1, border=5,
- flag=wx.ALL | wx.EXPAND)
-
- def _init_coll_bsIncPath_Items(self, parent):
- # generated method, don't edit
-
- parent.AddWindow(self.staticText3, 0, border=5,
- flag=wx.ALIGN_CENTER_VERTICAL | wx.LEFT)
- parent.AddWindow(self.listIncludes, 1, border=10,
- flag=wx.RIGHT | wx.BOTTOM | wx.TOP | wx.EXPAND | wx.ALIGN_CENTER_VERTICAL)
-
- def _init_coll_bsHeader_Items(self, parent):
- # generated method, don't edit
-
- parent.AddWindow(self.staticText1, 0, border=5,
- flag=wx.LEFT | wx.ALIGN_CENTER_VERTICAL)
- parent.AddWindow(self.textHeader, 1, border=10,
- flag=wx.ALIGN_CENTER_VERTICAL | wx.BOTTOM | wx.TOP)
- parent.AddWindow(self.butHeaders, 0, border=10,
- flag=wx.LEFT | wx.RIGHT | wx.ALIGN_CENTER_VERTICAL)
-
- def _init_coll_bsUpLeft_Items(self, parent):
- # generated method, don't edit
-
- parent.AddWindow(self.nbSettings, 1, border=0, flag=wx.ALL | wx.EXPAND)
-
- def _init_coll_bsMURButtons_Items(self, parent):
- # generated method, don't edit
-
- parent.AddWindow(self.butGenXml, 0, border=10,
- flag=wx.RIGHT | wx.LEFT | wx.ALIGN_CENTER_VERTICAL)
- parent.AddWindow(self.butGenCpp, 0, border=10,
- flag=wx.LEFT | wx.RIGHT | wx.ALIGN_CENTER | wx.ALIGN_CENTER_VERTICAL)
- parent.AddWindow(self.butGenPyPP, 0, border=10,
- flag=wx.RIGHT | wx.LEFT | wx.ALIGN_RIGHT | wx.ALIGN_CENTER_VERTICAL)
-
- def _init_coll_bsMainUpper_Items(self, parent):
- # generated method, don't edit
-
- parent.AddWindow(self.splitterVertical, 1, border=5,
- flag=wx.BOTTOM | wx.EXPAND)
-
- def _init_coll_bsMainLow_Items(self, parent):
- # generated method, don't edit
-
- parent.AddWindow(self.notebook1, 1, border=0, flag=wx.EXPAND)
-
- def _init_coll_bsUpRight_Items(self, parent):
- # generated method, don't edit
-
- parent.AddWindow(self.staticText5, 0, border=0, flag=0)
- parent.AddSizer(self.bsMURCompile, 1, border=4, flag=wx.TOP | wx.EXPAND)
- parent.AddWindow(self.panelButtons, 0, border=10,
- flag=wx.ALIGN_CENTER_HORIZONTAL | wx.TOP)
-
- def _init_coll_bsMULSettings_Items(self, parent):
- # generated method, don't edit
-
- parent.AddSpacer((10, 10), border=0, flag=0)
- parent.AddSizer(self.bsHeader, 0, border=5, flag=wx.RIGHT | wx.EXPAND)
- parent.AddSizer(self.bsGccXml, 0, border=5, flag=wx.RIGHT | wx.EXPAND)
- parent.AddSizer(self.bsIncPath, 0, border=5, flag=wx.RIGHT | wx.EXPAND)
- parent.AddSizer(self.bsDefines, 0, border=5, flag=wx.RIGHT | wx.EXPAND)
-
- def _init_coll_bsDefines_Items(self, parent):
- # generated method, don't edit
-
- parent.AddWindow(self.staticText4, 0, border=5,
- flag=wx.ALIGN_CENTER_VERTICAL | wx.LEFT)
- parent.AddWindow(self.listDefines, 1, border=10,
- flag=wx.RIGHT | wx.BOTTOM | wx.TOP | wx.ALIGN_CENTER_VERTICAL | wx.EXPAND)
-
- def _init_coll_menuBar1_Menus(self, parent):
- # generated method, don't edit
-
- parent.Append(menu=self.menueFile, title=u'&File')
-
- def _init_coll_menuIncludes_Items(self, parent):
- # generated method, don't edit
-
- parent.Append(help='', id=wxID_MAINFRAMEMENUINCLUDESADDINC,
- kind=wx.ITEM_NORMAL, text=u'Add ...')
- parent.Append(help='', id=wxID_MAINFRAMEMENUINCLUDESITEMS1,
- kind=wx.ITEM_NORMAL, text=u'Remove')
-
- def _init_coll_menueFile_Items(self, parent):
- # generated method, don't edit
-
- parent.Append(help=u'Create new Project', id=wxID_MAINFRAMEMENUEFILENEW,
- kind=wx.ITEM_NORMAL, text=u'&New Project')
- parent.Append(help=u'Open existing Project',
- id=wxID_MAINFRAMEMENUEFILEOPEN, kind=wx.ITEM_NORMAL,
- text=u'&Open Project')
- parent.Append(help=u'Save current Project',
- id=wxID_MAINFRAMEMENUEFILESAVE, kind=wx.ITEM_NORMAL,
- text=u'&Save Project')
- parent.AppendSeparator()
- parent.AppendMenu(help=u'Open recently used Project',
- id=wxID_MAINFRAMEMENUEFILERECENT, submenu=wx.Menu(),
- text=u'Recent Projects')
- parent.AppendSeparator()
- parent.Append(help='', id=wxID_MAINFRAMEMENUEFILEEXIT,
- kind=wx.ITEM_NORMAL, text=u'&Exit')
- self.Bind(wx.EVT_MENU, self.OnMenueFileNewMenu,
- id=wxID_MAINFRAMEMENUEFILENEW)
- self.Bind(wx.EVT_MENU, self.OnMenueFileOpenMenu,
- id=wxID_MAINFRAMEMENUEFILEOPEN)
- self.Bind(wx.EVT_MENU, self.OnMenueFileSaveMenu,
- id=wxID_MAINFRAMEMENUEFILESAVE)
- self.Bind(wx.EVT_MENU, self.OnMenueFileExitMenu,
- id=wxID_MAINFRAMEMENUEFILEEXIT)
-
- def _init_coll_menuDefines_Items(self, parent):
- # generated method, don't edit
-
- parent.Append(help='', id=wxID_MAINFRAMEMENUDEFINESADDDEF,
- kind=wx.ITEM_NORMAL, text=u'Add ...')
- parent.Append(help='', id=wxID_MAINFRAMEMENUDEFINESREMOVEDEF,
- kind=wx.ITEM_NORMAL, text=u'Remove')
-
- def _init_coll_nbSettings_Pages(self, parent):
- # generated method, don't edit
-
- parent.AddPage(imageId=-1, page=self.panelNbSettings, select=True,
- text=u'Settings')
-
- def _init_coll_notebook1_Pages(self, parent):
- # generated method, don't edit
-
- parent.AddPage(imageId=-1, page=self.textOutput, select=True,
- text=u'Output')
-
- def _init_coll_statusBar_Fields(self, parent):
- # generated method, don't edit
- parent.SetFieldsCount(3)
-
- parent.SetStatusText(number=0, text=u'<helptextOrStatus>')
- parent.SetStatusText(number=1, text=u'<parseTime>')
- parent.SetStatusText(number=2, text=u'<compileTime>')
-
- parent.SetStatusWidths([-1, -1, -1])
-
- def _init_sizers(self):
- # generated method, don't edit
- self.bsMain = wx.BoxSizer(orient=wx.VERTICAL)
-
- self.bsMainUpper = wx.BoxSizer(orient=wx.VERTICAL)
-
- self.bsMainLow = wx.BoxSizer(orient=wx.VERTICAL)
-
- self.bsUpLeft = wx.BoxSizer(orient=wx.VERTICAL)
-
- self.bsUpRight = wx.BoxSizer(orient=wx.VERTICAL)
-
- self.bsMULSettings = wx.BoxSizer(orient=wx.VERTICAL)
-
- self.bsMURCompile = wx.BoxSizer(orient=wx.VERTICAL)
-
- self.bsMURButtons = wx.BoxSizer(orient=wx.HORIZONTAL)
-
- self.bsHeader = wx.BoxSizer(orient=wx.HORIZONTAL)
-
- self.bsGccXml = wx.BoxSizer(orient=wx.HORIZONTAL)
-
- self.bsIncPath = wx.BoxSizer(orient=wx.HORIZONTAL)
-
- self.bsDefines = wx.BoxSizer(orient=wx.HORIZONTAL)
-
- self._init_coll_bsMain_Items(self.bsMain)
- self._init_coll_bsMainUpper_Items(self.bsMainUpper)
- self._init_coll_bsMainLow_Items(self.bsMainLow)
- self._init_coll_bsUpLeft_Items(self.bsUpLeft)
- self._init_coll_bsUpRight_Items(self.bsUpRight)
- self._init_coll_bsMULSettings_Items(self.bsMULSettings)
- self._init_coll_bsMURCompile_Items(self.bsMURCompile)
- self._init_coll_bsMURButtons_Items(self.bsMURButtons)
- self._init_coll_bsHeader_Items(self.bsHeader)
- self._init_coll_bsGccXml_Items(self.bsGccXml)
- self._init_coll_bsIncPath_Items(self.bsIncPath)
- self._init_coll_bsDefines_Items(self.bsDefines)
-
- self.panelSHUp.SetSizer(self.bsMainUpper)
- self.panelSettings.SetSizer(self.bsUpLeft)
- self.panelButtons.SetSizer(self.bsMURButtons)
- self.panelSHLow.SetSizer(self.bsMainLow)
- self.panelMain.SetSizer(self.bsMain)
- self.panelCode.SetSizer(self.bsUpRight)
- self.panelNbSettings.SetSizer(self.bsMULSettings)
-
- def _init_utils(self):
- # generated method, don't edit
- self.menueFile = wx.Menu(title='')
-
- self.menuBar1 = wx.MenuBar()
-
- self.menuIncludes = wx.Menu(title='')
-
- self.menuDefines = wx.Menu(title='')
-
- self._init_coll_menueFile_Items(self.menueFile)
- self._init_coll_menuBar1_Menus(self.menuBar1)
- self._init_coll_menuIncludes_Items(self.menuIncludes)
- self._init_coll_menuDefines_Items(self.menuDefines)
-
- def _init_ctrls(self, prnt):
- # generated method, don't edit
- wx.Frame.__init__(self, id=wxID_MAINFRAME, name=u'MainFrame',
- parent=prnt, pos=wx.Point(0, -2), size=wx.Size(851, 620),
- style=wx.DEFAULT_FRAME_STYLE, title=u'Py++ Code generator')
- self._init_utils()
- self.SetClientSize(wx.Size(843, 586))
- self.SetMenuBar(self.menuBar1)
-
- self.statusBar = wx.StatusBar(id=wxID_MAINFRAMESTATUSBAR,
- name=u'statusBar', parent=self, style=0)
- self._init_coll_statusBar_Fields(self.statusBar)
- self.SetStatusBar(self.statusBar)
-
- self.panelMain = wx.Panel(id=wxID_MAINFRAMEPANELMAIN, name=u'panelMain',
- parent=self, pos=wx.Point(0, 0), size=wx.Size(843, 543),
- style=wx.TAB_TRAVERSAL)
-
- self.splitterHorizontal = wx.SplitterWindow(id=wxID_MAINFRAMESPLITTERHORIZONTAL,
- name=u'splitterHorizontal', parent=self.panelMain, pos=wx.Point(5,
- 5), size=wx.Size(833, 533), style=0)
- self.splitterHorizontal.SetNeedUpdating(False)
- self.splitterHorizontal.SetMinimumPaneSize(0)
-
- self.panelSHUp = wx.Panel(id=wxID_MAINFRAMEPANELSHUP, name=u'panelSHUp',
- parent=self.splitterHorizontal, pos=wx.Point(0, 0),
- size=wx.Size(833, 10), style=wx.TAB_TRAVERSAL)
-
- self.panelSHLow = wx.Panel(id=wxID_MAINFRAMEPANELSHLOW,
- name=u'panelSHLow', parent=self.splitterHorizontal,
- pos=wx.Point(0, 14), size=wx.Size(833, 519),
- style=wx.TAB_TRAVERSAL)
- self.splitterHorizontal.SplitHorizontally(self.panelSHUp,
- self.panelSHLow, 300)
-
- self.notebook1 = wx.Notebook(id=wxID_MAINFRAMENOTEBOOK1,
- name='notebook1', parent=self.panelSHLow, pos=wx.Point(0, 0),
- size=wx.Size(833, 519), style=0)
- self.notebook1.SetLabel(u'Label')
-
- self.textOutput = wx.TextCtrl(id=wxID_MAINFRAMETEXTOUTPUT,
- name=u'textOutput', parent=self.notebook1, pos=wx.Point(0, 0),
- size=wx.Size(825, 493), style=wx.TE_READONLY | wx.TE_MULTILINE,
- value=u'')
-
- self.splitterVertical = wx.SplitterWindow(id=wxID_MAINFRAMESPLITTERVERTICAL,
- name=u'splitterVertical', parent=self.panelSHUp, pos=wx.Point(0,
- 0), size=wx.Size(833, 5), style=wx.SP_3D)
- self.splitterVertical.SetNeedUpdating(True)
- self.splitterVertical.SetMinimumPaneSize(0)
-
- self.panelSettings = wx.Panel(id=wxID_MAINFRAMEPANELSETTINGS,
- name=u'panelSettings', parent=self.splitterVertical,
- pos=wx.Point(0, 0), size=wx.Size(10, 5), style=wx.TAB_TRAVERSAL)
-
- self.panelCode = wx.Panel(id=wxID_MAINFRAMEPANELCODE, name=u'panelCode',
- parent=self.splitterVertical, pos=wx.Point(14, 0),
- size=wx.Size(819, 5), style=wx.TAB_TRAVERSAL)
- self.splitterVertical.SplitVertically(self.panelSettings,
- self.panelCode, 300)
-
- self.nbSettings = wx.Notebook(id=wxID_MAINFRAMENBSETTINGS,
- name=u'nbSettings', parent=self.panelSettings, pos=wx.Point(0, 0),
- size=wx.Size(10, 5), style=0)
- self.nbSettings.SetLabel(u'Label')
- self.nbSettings.SetHelpText(u'')
-
- self.panelNbSettings = wx.Panel(id=wxID_MAINFRAMEPANELNBSETTINGS,
- name=u'panelNbSettings', parent=self.nbSettings, pos=wx.Point(0,
- 0), size=wx.Size(2, 0), style=wx.TAB_TRAVERSAL)
- self.panelNbSettings.Show(True)
- self.panelNbSettings.SetMinSize(wx.Size(100, 100))
-
- self.textCtrl2 = wx.TextCtrl(id=wxID_MAINFRAMETEXTCTRL2,
- name='textCtrl2', parent=self.panelCode, pos=wx.Point(0, 17),
- size=wx.Size(819, 0), style=wx.TE_MULTILINE, value=u'')
-
- self.panelButtons = wx.Panel(id=wxID_MAINFRAMEPANELBUTTONS,
- name=u'panelButtons', parent=self.panelCode, pos=wx.Point(166,
- -18), size=wx.Size(486, 23), style=wx.TAB_TRAVERSAL)
-
- self.butGenXml = wx.Button(id=wxID_MAINFRAMEBUTGENXML,
- label=u'Generate XML code', name=u'butGenXml',
- parent=self.panelButtons, pos=wx.Point(10, 0), size=wx.Size(140,
- 23), style=0)
- self.butGenXml.Bind(wx.EVT_BUTTON, self.OnButGenXmlButton,
- id=wxID_MAINFRAMEBUTGENXML)
-
- self.butGenCpp = wx.Button(id=wxID_MAINFRAMEBUTGENCPP,
- label=u'Generate C++ code', name=u'butGenCpp',
- parent=self.panelButtons, pos=wx.Point(170, 0), size=wx.Size(142,
- 23), style=0)
- self.butGenCpp.Bind(wx.EVT_BUTTON, self.OnButGenCppButton,
- id=wxID_MAINFRAMEBUTGENCPP)
-
- self.butGenPyPP = wx.Button(id=wxID_MAINFRAMEBUTGENPYPP,
- label=u'Generate Py++ code', name=u'butGenPyPP',
- parent=self.panelButtons, pos=wx.Point(332, 0), size=wx.Size(144,
- 23), style=0)
- self.butGenPyPP.Bind(wx.EVT_BUTTON, self.OnButGenPyPPButton,
- id=wxID_MAINFRAMEBUTGENPYPP)
-
- self.textHeader = wx.TextCtrl(id=wxID_MAINFRAMETEXTHEADER,
- name=u'textHeader', parent=self.panelNbSettings, pos=wx.Point(56,
- 20), size=wx.Size(0, 21), style=0, value=u'')
-
- self.butHeaders = wx.Button(id=wxID_MAINFRAMEBUTHEADERS, label=u'...',
- name=u'butHeaders', parent=self.panelNbSettings, pos=wx.Point(-38,
- 19), size=wx.Size(28, 23), style=0)
- self.butHeaders.Bind(wx.EVT_BUTTON, self.OnButHeadersButton,
- id=wxID_MAINFRAMEBUTHEADERS)
-
- self.staticText1 = wx.StaticText(id=wxID_MAINFRAMESTATICTEXT1,
- label=u'Header\nFile', name='staticText1',
- parent=self.panelNbSettings, pos=wx.Point(5, 15), size=wx.Size(51,
- 30), style=wx.ALIGN_CENTRE)
-
- self.staticText2 = wx.StaticText(id=wxID_MAINFRAMESTATICTEXT2,
- label=u'GccXml', name='staticText2', parent=self.panelNbSettings,
- pos=wx.Point(5, 60), size=wx.Size(51, 23), style=wx.ALIGN_CENTRE)
-
- self.textGccXml = wx.TextCtrl(id=wxID_MAINFRAMETEXTGCCXML,
- name=u'textGccXml', parent=self.panelNbSettings, pos=wx.Point(56,
- 61), size=wx.Size(0, 21), style=0, value=u'')
-
- self.butGccXml = wx.Button(id=wxID_MAINFRAMEBUTGCCXML, label=u'...',
- name=u'butGccXml', parent=self.panelNbSettings, pos=wx.Point(-38,
- 60), size=wx.Size(28, 23), style=0)
- self.butGccXml.Bind(wx.EVT_BUTTON, self.OnButGccXmlButton,
- id=wxID_MAINFRAMEBUTGCCXML)
-
- self.staticText3 = wx.StaticText(id=wxID_MAINFRAMESTATICTEXT3,
- label=u'Include\nPath', name='staticText3',
- parent=self.panelNbSettings, pos=wx.Point(5, 116),
- size=wx.Size(51, 37), style=wx.ALIGN_CENTRE)
-
- self.listIncludes = wx.ListCtrl(id=wxID_MAINFRAMELISTINCLUDES,
- name=u'listIncludes', parent=self.panelNbSettings,
- pos=wx.Point(56, 102), size=wx.Size(0, 66), style=wx.LC_ICON)
- self.listIncludes.Bind(wx.EVT_RIGHT_DOWN, self.OnListIncludesRightDown)
-
- self.staticText4 = wx.StaticText(id=wxID_MAINFRAMESTATICTEXT4,
- label=u'Defines', name='staticText4', parent=self.panelNbSettings,
- pos=wx.Point(5, 209), size=wx.Size(51, 25),
- style=wx.ALIGN_CENTRE)
-
- self.listDefines = wx.ListCtrl(id=wxID_MAINFRAMELISTDEFINES,
- name=u'listDefines', parent=self.panelNbSettings, pos=wx.Point(56,
- 188), size=wx.Size(0, 68), style=wx.LC_ICON)
- self.listDefines.Bind(wx.EVT_RIGHT_DOWN, self.OnListDefinesRightDown)
-
- self.staticText5 = wx.StaticText(id=wxID_MAINFRAMESTATICTEXT5,
- label=u'Code', name='staticText5', parent=self.panelCode,
- pos=wx.Point(0, 0), size=wx.Size(25, 13), style=0)
-
- self._init_coll_notebook1_Pages(self.notebook1)
- self._init_coll_nbSettings_Pages(self.nbSettings)
-
- self._init_sizers()
-
- def __init__(self, parent):
- self._init_ctrls(parent)
- self.SetSize((self.GetSize()[0]+1,self.GetSize()[1]+1))
-
- def OnMenueFileNewMenu(self, event):
- event.Skip()
-
- def OnMenueFileOpenMenu(self, event):
- event.Skip()
-
- def OnMenueFileSaveMenu(self, event):
- event.Skip()
-
- def OnMenueFileRecentMenu(self, event):
- event.Skip()
-
- def OnMenueFileExitMenu(self, event):
- event.Skip()
-
- def OnTextGenCodeRightDown(self, event):
- event.Skip()
-
- def OnListIncludesRightDown(self, event):
- self.PopupMenu(self.menuIncludes)
-
- def OnListDefinesRightDown(self, event):
- self.PopupMenu(self.menuDefines)
-
- def OnButGenXmlButton(self, event):
- self._controller.GenXmlCode()
-
- def OnButGenCppButton(self, event):
- self._controller.GenCppCode()
-
- def OnButGenPyPPButton(self, event):
- self._controller.GenPyPPCode()
-
- def OnButHeadersButton(self, event):
- """Callback for button event"""
- self._controller.OpenHeaderDlg()
- event.Skip()
-
- def OnButGccXmlButton(self, event):
- """Callback for button event"""
- self._controller.OpenGccXmlDlg()
- event.Skip()
-
- def set_controller(self, controller):
- """Set controller of MVC"""
- self._controller = controller
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rom...@us...> - 2007-04-04 21:05:13
|
Revision: 968
http://svn.sourceforge.net/pygccxml/?rev=968&view=rev
Author: roman_yakovenko
Date: 2007-04-04 14:05:12 -0700 (Wed, 04 Apr 2007)
Log Message:
-----------
This commit should introduced neccessary functionality to implement "transfer ownership"
Modified Paths:
--------------
pyplusplus_dev/pyplusplus/code_creators/class_declaration.py
pyplusplus_dev/pyplusplus/decl_wrappers/class_wrapper.py
pyplusplus_dev/unittests/data/transfer_ownership_to_be_exported.hpp
pyplusplus_dev/unittests/transfer_ownership_old_tester.py
Modified: pyplusplus_dev/pyplusplus/code_creators/class_declaration.py
===================================================================
--- pyplusplus_dev/pyplusplus/code_creators/class_declaration.py 2007-04-04 20:21:23 UTC (rev 967)
+++ pyplusplus_dev/pyplusplus/code_creators/class_declaration.py 2007-04-04 21:05:12 UTC (rev 968)
@@ -178,14 +178,17 @@
held_type = self._generated_held_type()
if self.wrapper:
- if not self.target_configuration.boost_python_has_wrapper_held_type \
- or self.declaration.require_self_reference:
- args.append( algorithm.create_identifier( self, self.declaration.decl_string ) )
- if self.declaration.require_self_reference:
- if not held_type:
+ if self.declaration.class_type == self.declaration.CLASS_TYPE.WRAPPER:
+ args.append( self.wrapper.full_name )
+ else:
+ if not self.target_configuration.boost_python_has_wrapper_held_type \
+ or self.declaration.require_self_reference:
+ args.append( algorithm.create_identifier( self, self.declaration.decl_string ) )
+ if self.declaration.require_self_reference:
+ if not held_type:
+ args.append( self.wrapper.full_name )
+ else:
args.append( self.wrapper.full_name )
- else:
- args.append( self.wrapper.full_name )
else:
args.append( algorithm.create_identifier( self, self.declaration.decl_string ) )
Modified: pyplusplus_dev/pyplusplus/decl_wrappers/class_wrapper.py
===================================================================
--- pyplusplus_dev/pyplusplus/decl_wrappers/class_wrapper.py 2007-04-04 20:21:23 UTC (rev 967)
+++ pyplusplus_dev/pyplusplus/decl_wrappers/class_wrapper.py 2007-04-04 21:05:12 UTC (rev 968)
@@ -177,6 +177,12 @@
class class_t( class_common_details_t
, scopedef_wrapper.scopedef_t
, declarations.class_t):
+
+ class CLASS_TYPE:
+ DEFAULT = 'default'
+ WRAPPER = 'wrapper'
+ ALL = ( DEFAULT, WRAPPER )
+
def __init__(self, *arguments, **keywords):
class_common_details_t.__init__( self )
declarations.class_t.__init__(self, *arguments, **keywords )
@@ -195,6 +201,7 @@
self._properties = []
self._redefined_funcs = None
self._require_self_reference = False
+ self._class_type = self.CLASS_TYPE.DEFAULT
def _get_redefine_operators( self ):
return self._redefine_operators
@@ -203,6 +210,14 @@
redefine_operators = property( _get_redefine_operators, _set_redefine_operators
, doc="tells Py++ to redefine operators from base class in this class, False by default")
+ def _get_class_type(self):
+ return self._class_type
+ def _set_class_type(self, class_type):
+ self._class_type = class_type
+ class_type = property( _get_class_type, _set_class_type
+ , doc="set this value to CLASS_TYPE.WRAPPER, if you need to transfer ownership of" \
+ "polymorphic class" )
+
def _get_held_type(self):
return self._held_type
def _set_held_type(self, held_type):
Modified: pyplusplus_dev/unittests/data/transfer_ownership_to_be_exported.hpp
===================================================================
--- pyplusplus_dev/unittests/data/transfer_ownership_to_be_exported.hpp 2007-04-04 20:21:23 UTC (rev 967)
+++ pyplusplus_dev/unittests/data/transfer_ownership_to_be_exported.hpp 2007-04-04 21:05:12 UTC (rev 968)
@@ -8,7 +8,7 @@
notify();
}
protected:
- virtual void notify(){};
+ virtual void notify() = 0;
};
struct do_nothing_t : event_t{
Modified: pyplusplus_dev/unittests/transfer_ownership_old_tester.py
===================================================================
--- pyplusplus_dev/unittests/transfer_ownership_old_tester.py 2007-04-04 20:21:23 UTC (rev 967)
+++ pyplusplus_dev/unittests/transfer_ownership_old_tester.py 2007-04-04 21:05:12 UTC (rev 968)
@@ -11,26 +11,7 @@
from pyplusplus.module_builder import call_policies
from pyplusplus import function_transformers as ft
-decref_code = \
-"""
-virtual ~%(cls)s(){
- Py_DECREF( boost::python::detail::wrapper_base_::get_owner(*this) );
-// if (this->m_pyobj) {
-// Py_DECREF(this->m_pyobj);
-// this->m_pyobj = 0;
-// }
-}
-"""
-incref_code = \
-"""
-//if( !this->m_pyobj) {
- //this->m_pyobj = boost::python::detail::wrapper_base_::get_owner(*this);
- std::cout << "py owner id: " << (int)(boost::python::detail::wrapper_base_::get_owner(*this));
- //Py_INCREF(this->m_pyobj);
-//}
-"""
-
impl_conv_code = \
"""
boost::python::implicitly_convertible< std::auto_ptr< %(from)s >, std::auto_ptr< %(to)s > >();
@@ -53,18 +34,9 @@
def customize( self, mb ):
event_clss = mb.classes( lambda cls: cls.name in ( 'event_t', 'do_nothing_t' ) )
for cls in event_clss:
- cls.require_self_reference = True
- cls.set_constructors_body( 'Py_INCREF(self); std::cout<< "self: " << (int)(self) << "\\n" << (int)( boost::python::detail::wrapper_base_::get_owner(*this));' )
- cls.add_wrapper_code( decref_code % { 'cls' : cls.wrapper_alias } )
- #~ cls.add_wrapper_code( 'PyObject* m_pyobj;' )
- #~ cls.set_constructors_body( 'm_pyobj=0;' )
- cls.mem_fun( 'notify' ).add_override_precall_code( incref_code )
- #~ cls.mem_fun( 'notify' ).add_default_precall_code( incref_code )
-
+ cls.class_type = cls.CLASS_TYPE.WRAPPER
cls.held_type = 'std::auto_ptr< %s >' % cls.wrapper_alias
cls.add_registration_code( register_sptr % 'std::auto_ptr< %s >' % cls.decl_string, False )
- cls.add_registration_code( register_sptr % 'std::auto_ptr< %s >' % cls.wrapper_alias, False )
- #~ cls.held_type = 'std::auto_ptr< %s >' % cls.decl_string
cls.add_registration_code( impl_conv_code % { 'from' : cls.wrapper_alias
, 'to' : cls.decl_string }
, False)
@@ -95,6 +67,7 @@
def notify( self ):
print 'notify'
self.container.append( 1 )
+ print '1 was append'
print 'test started'
notify_data = []
@@ -106,12 +79,12 @@
print 'event was shceduled'
print 'event refcount: ', sys.getrefcount( event )
print 'simulator refcount: ', sys.getrefcount( simulator )
- #del event
+ #~ del event
print 'event was deleted'
event = simulator.get_event()
print 'event was restored via saved reference in simulator: ', id( event )
print 'event refcount: ', sys.getrefcount( simulator.get_event() )
- #print 'call event.notify(): ', simulator.get_event().notify()
+ print 'call event.notify(): ', simulator.get_event().notify()
print 'call simulator.run()'
simulator.run()
self.failUnless( notify_data[0] == 1 )
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rom...@us...> - 2007-04-04 20:21:23
|
Revision: 967
http://svn.sourceforge.net/pygccxml/?rev=967&view=rev
Author: roman_yakovenko
Date: 2007-04-04 13:21:23 -0700 (Wed, 04 Apr 2007)
Log Message:
-----------
fixing a bug, which could cause duplicated include directives
Modified Paths:
--------------
pyplusplus_dev/pyplusplus/code_repository/call_policies.py
pyplusplus_dev/pyplusplus/code_repository/return_range.py
pyplusplus_dev/pyplusplus/decl_wrappers/call_policies.py
pyplusplus_dev/pyplusplus/module_creator/creator.py
Added Paths:
-----------
pyplusplus_dev/pyplusplus/module_creator/header_files_manager.py
Modified: pyplusplus_dev/pyplusplus/code_repository/call_policies.py
===================================================================
--- pyplusplus_dev/pyplusplus/code_repository/call_policies.py 2007-04-01 20:08:17 UTC (rev 966)
+++ pyplusplus_dev/pyplusplus/code_repository/call_policies.py 2007-04-04 20:21:23 UTC (rev 967)
@@ -7,10 +7,11 @@
This file contains C++ code - custom call policies
"""
+from pyplusplus.decl_wrappers import call_policies
namespace = "pyplusplus::call_policies"
-file_name = "__call_policies.pypp.hpp"
+file_name = call_policies.PYPP_CALL_POLICIES_HEADER_FILE
code = \
"""// Copyright 2004 Roman Yakovenko.
Modified: pyplusplus_dev/pyplusplus/code_repository/return_range.py
===================================================================
--- pyplusplus_dev/pyplusplus/code_repository/return_range.py 2007-04-01 20:08:17 UTC (rev 966)
+++ pyplusplus_dev/pyplusplus/code_repository/return_range.py 2007-04-04 20:21:23 UTC (rev 967)
@@ -7,9 +7,11 @@
This file contains C++ code - "return_range" call policies
"""
+from pyplusplus.decl_wrappers import call_policies
+
namespace = "pyplusplus::call_policies"
-file_name = "__return_range.pypp.hpp"
+file_name = call_policies.return_range_t.HEADER_FILE
code = \
"""// Copyright 2004 Roman Yakovenko.
Modified: pyplusplus_dev/pyplusplus/decl_wrappers/call_policies.py
===================================================================
--- pyplusplus_dev/pyplusplus/decl_wrappers/call_policies.py 2007-04-01 20:08:17 UTC (rev 966)
+++ pyplusplus_dev/pyplusplus/decl_wrappers/call_policies.py 2007-04-04 20:21:23 UTC (rev 967)
@@ -15,6 +15,8 @@
import python_traits
from pygccxml import declarations
+PYPP_CALL_POLICIES_HEADER_FILE = "__call_policies.pypp.hpp"
+
class CREATION_POLICY:
"""Implementation details"""
AS_INSTANCE = 'as instance'
@@ -57,6 +59,11 @@
def _create_impl( self, function_creator ):
raise NotImplementedError()
+ @property
+ def header_file(self):
+ """Return name of the header file to be included"""
+ return "boost/python.hpp"
+
class default_call_policies_t(call_policy_t):
"""implementation for ::boost::python::default_call_policies"""
def __init__( self ):
@@ -226,6 +233,13 @@
else:
return True
+ @property
+ def header_file(self):
+ """Return name of the header file to be included"""
+ if self.is_predefined():
+ return super( return_value_policy_t, self ).header_file
+ else:
+ return PYPP_CALL_POLICIES_HEADER_FILE
copy_const_reference = '::boost::python::copy_const_reference'
@@ -246,9 +260,10 @@
class custom_call_policies_t(call_policy_t):
"""implementation for user defined call policies"""
- def __init__( self, call_policies ):
+ def __init__( self, call_policies, header_file=None ):
call_policy_t.__init__( self )
self.__call_policies = call_policies
+ self.__header_file = header_file
def _create_impl(self, function_creator ):
return str( self.__call_policies )
@@ -256,9 +271,16 @@
def __str__(self):
return 'custom call policies'
-def custom_call_policies(call_policies):
+ def get_header_file( self ):
+ return self.__header_file
+ def set_header_file( self, header_file_name ):
+ self.__header_file = header_file_name
+ header_file = property( get_header_file, set_header_file
+ , doc="""Return name of the header file to be included""" )
+
+def custom_call_policies(call_policies, header_file=None):
"""create custom\\user defined call policies"""
- return custom_call_policies_t(call_policies)
+ return custom_call_policies_t(call_policies, header_file)
class memory_managers:
none = 'none'
@@ -282,7 +304,12 @@
def is_predefined( self ):
"""Returns True if call policy is defined in Boost.Python library, False otherwise"""
return False
-
+
+ @property
+ def header_file(self):
+ """Return name of the header file to be included"""
+ return PYPP_CALL_POLICIES_HEADER_FILE
+
def _get_array_size( self ):
return self._array_size
def _set_array_size( self, new_array_size):
@@ -321,6 +348,7 @@
return convert_array_to_tuple_t( array_size, memory_manager, make_object_call_policies, base )
class return_range_t( call_policy_t ):
+ HEADER_FILE = "__return_range.pypp.hpp"
def __init__( self, get_size_class, value_type, value_policies):
call_policy_t.__init__( self )
self._value_type = value_type
@@ -331,6 +359,11 @@
"""Returns True if call policy is defined in Boost.Python library, False otherwise"""
return False
+ @property
+ def header_file(self):
+ """Return name of the header file to be included"""
+ return self.HEADER_FILE
+
def _get_get_size_class( self ):
return self._get_size_class
def _set_get_size_class( self, new_get_size_class):
Modified: pyplusplus_dev/pyplusplus/module_creator/creator.py
===================================================================
--- pyplusplus_dev/pyplusplus/module_creator/creator.py 2007-04-01 20:08:17 UTC (rev 966)
+++ pyplusplus_dev/pyplusplus/module_creator/creator.py 2007-04-04 20:21:23 UTC (rev 967)
@@ -8,7 +8,9 @@
import sort_algorithms
import dependencies_manager
import opaque_types_manager
+import header_files_manager
import call_policies_resolver
+
from pygccxml import declarations
from pyplusplus import decl_wrappers
from pyplusplus import code_creators
@@ -107,8 +109,7 @@
self.__types_db = types_database.types_database_t()
self.__extmodule = code_creators.module_t()
- self.__extmodule.add_system_header( "boost/python.hpp" )
- self.__extmodule.adopt_creator( code_creators.include_t( header="boost/python.hpp" ) )
+ self.__header_files_manager = header_files_manager.manager_t( self.__extmodule )
if boost_python_ns_name:
bp_ns_alias = code_creators.namespace_alias_t( alias=boost_python_ns_name
, full_namespace_name='::boost::python' )
@@ -122,14 +123,10 @@
self.curr_code_creator = self.__module_body
self.curr_decl = None
- self.__cr_array_1_included = False
self.__array_1_registered = set() #(type.decl_string,size)
self.__free_operators = []
self.__exposed_free_fun_overloads = set()
self.__opaque_types_manager = opaque_types_manager.manager_t( self.__extmodule )
- self.__custom_call_policies_included = False
- self.__return_range_call_policies_included = False
-
self.__dependencies_manager = dependencies_manager.manager_t(self.decl_logger)
def _prepare_decls( self, decls, doc_extractor ):
@@ -351,25 +348,6 @@
creators.reverse()
self.__module_body.adopt_creators( creators, 0 )
- def __on_demand_include_call_policies( self, call_policy ):
- if self.__custom_call_policies_included and self.__return_range_call_policies_included:
- return
-
- if not call_policy:
- return
-
- if call_policy.is_predefined():
- return
-
- if isinstance( call_policy, decl_wrappers.call_policies.return_range_t ):
- self.__return_range_call_policies_included = True
- self.__extmodule.add_include( code_repository.return_range.file_name )
- self.__extmodule.add_system_header( code_repository.return_range.file_name )
- else:
- self.__custom_call_policies_included = True
- self.__extmodule.add_include( code_repository.call_policies.file_name )
- self.__extmodule.add_system_header( code_repository.call_policies.file_name )
-
def create(self, decl_headers=None):
"""Create and return the module for the extension.
@@ -379,10 +357,11 @@
@rtype: L{module_t<code_creators.module_t>}
"""
if decl_headers is None:
- self._create_includes()
- else:
- for h in decl_headers:
- self.__extmodule.adopt_include(code_creators.include_t(header=h))
+ decl_headers = declarations.declaration_files( self.__decls )
+
+ map( lambda header: self.__header_files_manager.include( header )
+ , decl_headers )
+
# Invoke the appropriate visit_*() method on all decls
for decl in self.__decls:
self.curr_decl = decl
@@ -399,18 +378,13 @@
self.__dependencies_manager.inform_user()
return self.__extmodule
- def _create_includes(self):
- for fn in declarations.declaration_files( self.__decls ):
- include = code_creators.include_t( header=fn )
- self.__extmodule.adopt_include(include)
-
def visit_member_function( self ):
fwrapper = None
self.__types_db.update( self.curr_decl )
self.__dependencies_manager.add_exported( self.curr_decl )
if None is self.curr_decl.call_policies:
self.curr_decl.call_policies = self.__call_policies_resolver( self.curr_decl )
- self.__on_demand_include_call_policies( self.curr_decl.call_policies )
+ self.__header_files_manager.include_call_policy( self.curr_decl.call_policies )
maker_cls, fwrapper_cls = creators_wizard.find_out_mem_fun_creator_classes( self.curr_decl )
@@ -437,23 +411,10 @@
self.curr_code_creator.adopt_creator( maker )
self.__opaque_types_manager.register_opaque( maker, self.curr_decl )
- if self.curr_decl.transformations:
+ if self.curr_decl.transformations:
required_headers = self.curr_decl.transformations[0].required_headers()
- for header in required_headers:
- # Check whether the header is already included
- included = filter( lambda cc: isinstance(cc, code_creators.include_t) and cc.header==header
- , self.__extmodule.creators)
- if not included:
- self.__extmodule.adopt_include(
- code_creators.include_t( header=header, user_defined=True ) )
-
- # Check if it is a header from the code repository
- if header in code_repository.headers:
- self.__extmodule.add_system_header( header )
+ self.__header_files_manager.include_ft( required_headers )
- if not self.__extmodule.is_system_header( code_repository.named_tuple.file_name ):
- self.__extmodule.add_system_header( code_repository.named_tuple.file_name )
-
if self.curr_decl.has_static:
#static_method should be created only once.
found = filter( lambda creator: isinstance( creator, code_creators.static_method_t )
@@ -479,7 +440,7 @@
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 )
- self.__on_demand_include_call_policies( self.curr_decl.call_policies )
+ self.__header_files_manager.include_call_policy( self.curr_decl.call_policies )
self.curr_code_creator.adopt_creator( maker )
def visit_destructor( self ):
@@ -498,7 +459,7 @@
self.__dependencies_manager.add_exported( self.curr_decl )
if None is self.curr_decl.call_policies:
self.curr_decl.call_policies = self.__call_policies_resolver( self.curr_decl )
- self.__on_demand_include_call_policies( self.curr_decl.call_policies )
+ self.__header_files_manager.include_call_policy( self.curr_decl.call_policies )
self.__types_db.update( self.curr_decl )
if not self.curr_decl.parent.is_abstract and not declarations.is_reference( self.curr_decl.return_type ):
@@ -530,7 +491,7 @@
self.__dependencies_manager.add_exported( f )
if None is f.call_policies:
f.call_policies = self.__call_policies_resolver( f )
- self.__on_demand_include_call_policies( f.call_policies )
+ self.__header_files_manager.include_call_policy( f.call_policies )
overloads_cls_creator = code_creators.free_fun_overloads_class_t( overloads )
self.__extmodule.adopt_declaration_creator( overloads_cls_creator )
@@ -551,10 +512,13 @@
self.__dependencies_manager.add_exported( self.curr_decl )
if None is self.curr_decl.call_policies:
self.curr_decl.call_policies = self.__call_policies_resolver( self.curr_decl )
- self.__on_demand_include_call_policies( self.curr_decl.call_policies )
+ self.__header_files_manager.include_call_policy( self.curr_decl.call_policies )
maker = None
if self.curr_decl.transformations:
+ required_headers = self.curr_decl.transformations[0].required_headers()
+ self.__header_files_manager.include_ft( required_headers )
+
wrapper = code_creators.free_fun_transformed_wrapper_t( self.curr_decl )
self.__extmodule.adopt_declaration_creator( wrapper )
maker = code_creators.free_fun_transformed_t( self.curr_decl, wrapper )
@@ -595,7 +559,7 @@
self.__dependencies_manager.add_exported( f )
if None is f.call_policies:
f.call_policies = self.__call_policies_resolver( f )
- self.__on_demand_include_call_policies( f.call_policies )
+ self.__header_files_manager.include_call_policy( f.call_policies )
overloads_cls_creator = code_creators.mem_fun_overloads_class_t( overloads )
self.__extmodule.adopt_declaration_creator( overloads_cls_creator )
@@ -707,11 +671,7 @@
self.__dependencies_manager.add_exported( self.curr_decl )
if declarations.is_array( self.curr_decl.type ):
- if not self.__cr_array_1_included:
- self.__extmodule.add_system_header( code_repository.array_1.file_name )
- self.__extmodule.adopt_creator( code_creators.include_t( code_repository.array_1.file_name )
- , self.__extmodule.first_include_index() + 1)
- self.__cr_array_1_included = True
+ self.__header_files_manager.include(code_repository.array_1.file_name, system=True )
if self._register_array_1( self.curr_decl.type ):
array_1_registrator = code_creators.array_1_registrator_t( array_type=self.curr_decl.type )
self.curr_code_creator.adopt_creator( array_1_registrator )
@@ -741,10 +701,10 @@
elif declarations.is_reference( self.curr_decl.type ):
if None is self.curr_decl.getter_call_policies:
self.curr_decl.getter_call_policies = self.__call_policies_resolver( self.curr_decl, 'get' )
- self.__on_demand_include_call_policies( self.curr_decl.getter_call_policies )
+ self.__header_files_manager.include_call_policy( self.curr_decl.getter_call_policies )
if None is self.curr_decl.setter_call_policies:
self.curr_decl.setter_call_policies = self.__call_policies_resolver( self.curr_decl, 'set' )
- self.__on_demand_include_call_policies( self.curr_decl.setter_call_policies )
+ self.__header_files_manager.include_call_policy( self.curr_decl.setter_call_policies )
wrapper = code_creators.mem_var_ref_wrapper_t( variable=self.curr_decl )
maker = code_creators.mem_var_ref_t( variable=self.curr_decl, wrapper=wrapper )
self.__opaque_types_manager.register_opaque( maker, self.curr_decl )
Added: pyplusplus_dev/pyplusplus/module_creator/header_files_manager.py
===================================================================
--- pyplusplus_dev/pyplusplus/module_creator/header_files_manager.py (rev 0)
+++ pyplusplus_dev/pyplusplus/module_creator/header_files_manager.py 2007-04-04 20:21:23 UTC (rev 967)
@@ -0,0 +1,53 @@
+# 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)
+
+from pygccxml import declarations
+from pyplusplus import code_creators
+from pyplusplus import code_repository
+
+class manager_t( object ):
+ def __init__( self, extmodule ):
+ object.__init__( self )
+ self.__extmodule = extmodule
+ self.__already_included = set()
+ self.normalize = code_creators.include_directories_t.normalize
+
+ self.__extmodule.add_system_header( "boost/python.hpp" )
+ self.__extmodule.adopt_creator( code_creators.include_t( header="boost/python.hpp" ) )
+
+ def include( self, header, system=False, once=True, user_defined=False ):
+ if once:
+ normalized_header = self.normalize( header )
+ if normalized_header in self.__already_included:
+ return
+ self.__extmodule.add_system_header( header )
+ self.__extmodule.adopt_include( code_creators.include_t( header, user_defined=user_defined ) )
+ if system:
+ self.__extmodule.add_system_header( header )
+
+
+ def include_call_policy( self, call_policy ):
+ if not call_policy:
+ return
+ if call_policy.is_predefined():
+ #boost/python.hpp is already included
+ return
+ self.include( call_policy.header_file, system=True )
+
+ def include_ft( self, required_headers ): #include function transformation headers
+ for header in required_headers:
+ # Check whether the header is already included
+ system = bool( header in code_repository.headers )
+ self.include( header, system=system, user_defined=True )
+
+ if not self.__extmodule.is_system_header( code_repository.named_tuple.file_name ):
+ self.__extmodule.add_system_header( code_repository.named_tuple.file_name )
+
+
+
+
+
+
+
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rom...@us...> - 2007-04-01 20:08:16
|
Revision: 966
http://svn.sourceforge.net/pygccxml/?rev=966&view=rev
Author: roman_yakovenko
Date: 2007-04-01 13:08:17 -0700 (Sun, 01 Apr 2007)
Log Message:
-----------
implementing custom exception support
Modified Paths:
--------------
pyplusplus_dev/docs/troubleshooting_guide/exceptions/exceptions.cpp
pyplusplus_dev/docs/troubleshooting_guide/exceptions/test.py
Modified: pyplusplus_dev/docs/troubleshooting_guide/exceptions/exceptions.cpp
===================================================================
--- pyplusplus_dev/docs/troubleshooting_guide/exceptions/exceptions.cpp 2007-03-31 18:27:37 UTC (rev 965)
+++ pyplusplus_dev/docs/troubleshooting_guide/exceptions/exceptions.cpp 2007-04-01 20:08:17 UTC (rev 966)
@@ -108,6 +108,7 @@
bpl::class_< application_error >( "_application_error_" )
.def( bpl::init<const std::string&>() )
.def( bpl::init<const application_error&>() )
+ .def( "application_name", &application_error::application_name)
.def( "message", &application_error::message, return_copy_const_ref() )
.def( "__str__", &application_error::message, return_copy_const_ref() );
Modified: pyplusplus_dev/docs/troubleshooting_guide/exceptions/test.py
===================================================================
--- pyplusplus_dev/docs/troubleshooting_guide/exceptions/test.py 2007-03-31 18:27:37 UTC (rev 965)
+++ pyplusplus_dev/docs/troubleshooting_guide/exceptions/test.py 2007-04-01 20:08:17 UTC (rev 966)
@@ -8,7 +8,14 @@
def __str__( self ):
return self._pimpl.message()
-
+
+ def __getattribute__(self, attr):
+ my_pimpl = super(application_error, self).__getattribute__("_pimpl")
+ try:
+ return getattr(my_pimpl, attr)
+ except AttributeError:
+ return super(application_error,self).__getattribute__(attr)
+
my_exceptions.application_error = application_error
class tester_t( unittest.TestCase ):
@@ -34,7 +41,7 @@
try:
my_exceptions.check_preconditions( True )
except Exception, err:
- self.failUnless( err.application_name() == "xyz" )
+ self.failUnless( err.application_name() == "my_exceptions module" )
def test_converter( self ):
try:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rom...@us...> - 2007-03-31 18:28:05
|
Revision: 965
http://svn.sourceforge.net/pygccxml/?rev=965&view=rev
Author: roman_yakovenko
Date: 2007-03-31 11:27:37 -0700 (Sat, 31 Mar 2007)
Log Message:
-----------
separating indexing suite v2 dependent call policies from the others
Modified Paths:
--------------
pyplusplus_dev/examples/pyboost_dev/dev/date_time/include/date_time.pypp.xml
pyplusplus_dev/examples/pyboost_dev/dev/date_time/sconscript
pyplusplus_dev/examples/pyboost_dev/sconstruct
pyplusplus_dev/pyplusplus/code_repository/__init__.py
pyplusplus_dev/pyplusplus/code_repository/call_policies.py
pyplusplus_dev/pyplusplus/module_creator/creator.py
Added Paths:
-----------
pyplusplus_dev/pyplusplus/code_repository/return_range.py
Modified: pyplusplus_dev/examples/pyboost_dev/dev/date_time/include/date_time.pypp.xml
===================================================================
--- pyplusplus_dev/examples/pyboost_dev/dev/date_time/include/date_time.pypp.xml 2007-03-31 17:13:57 UTC (rev 964)
+++ pyplusplus_dev/examples/pyboost_dev/dev/date_time/include/date_time.pypp.xml 2007-03-31 18:27:37 UTC (rev 965)
@@ -1,1808 +1,1831 @@
<?xml version="1.0"?>
-<GCC_XML cvs_revision="1.113">
- <Namespace id="_1" name="::" members="_3 _4 _5 _6 _7 _8 _9 _10 _11 _12 _13 _14 _15 _16 _17 _18 _19 _20 _21 _22 _23 _24 _25 _26 _27 _28 _29 _30 _31 _32 _33 _34 _35 _36 _37 _38 _39 _40 _41 _42 _43 _44 _45 _46 _47 _48 _49 _50 _51 _52 _53 _54 _55 _56 _57 _58 _59 _60 _61 _62 _63 _64 _65 _66 _67 _68 _69 _70 _71 _72 _73 _74 _75 _76 _77 _78 _79 _80 _81 _82 _83 _84 _85 _86 _87 _88 _89 _90 _91 _92 _93 _94 _95 _96 _97 _98 _99 _100 _101 _102 _103 _104 _105 _106 _107 _108 _109 _110 _111 _112 _113 _114 _115 _116 _117 _118 _119 _120 _121 _122 _123 _124 _125 _126 _127 _128 _129 _130 _131 _132 _133 _134 _135 _136 _137 _138 _139 _140 _141 _142 _143 _144 _145 _146 _147 _148 _149 _150 _151 _152 _153 _154 _155 _156 _157 _158 _159 _160 _161 _162 _163 _164 _165 _166 _167 _168 _169 _170 _171 _172 _173 _174 _175 _176 _177 _178 _179 _180 _181 _182 _183 _184 _185 _186 _187 _188 _189 _190 _191 _192 _193 _194 _195 _196 _197 _198 _199 _200 _201 _202 _203 _204 _205 _206 _207 _208 _209 _210 _211 _212 _213 _214 _215 _216 _217 _218 _219 _220 _221 _222 _223 _224 _225 _226 _227 _228 _229 _230 _231 _232 _233 _234 _235 _236 _237 _238 _239 _240 _241 _242 _243 _244 _245 _246 _247 _248 _249 _250 _251 _252 _253 _254 _255 _256 _257 _258 _259 _260 _261 _262 _263 _264 _265 _266 _267 _268 _269 _270 _271 _272 _273 _274 _275 _276 _277 _278 _279 _280 _281 _282 _283 _284 _285 _286 _287 _288 _289 _290 _291 _292 _293 _294 _295 _296 _297 _298 _299 _300 _301 _302 _303 _304 _305 _306 _307 _308 _309 _310 _311 _312 _313 _314 _315 _316 _317 _318 _319 _320 _321 _322 _323 _324 _325 _326 _327 _328 _329 _330 _331 _332 _333 _334 _335 _336 _337 _338 _339 _340 _341 _342 _343 _344 _345 _346 _347 _348 _349 _350 _351 _352 _353 _354 _355 _356 _357 _358 _359 _360 _361 _362 _363 _364 _365 _366 _367 _368 _369 _370 _371 _372 _373 _374 _375 _376 _377 _378 _379 _380 _381 _382 _383 _384 _385 _386 _387 _388 _389 _390 _391 _392 _393 _394 _395 _396 _397 _398 _399 _400 _401 _402 _403 _404 _405 _406 _407 _408 _409 _410 _411 _412 _413 _414 _415 _416 _417 _418 _419 _420 _421 _422 _423 _424 _425 _426 _427 _428 _429 _430 _431 _432 _433 _434 _435 _436 _437 _438 _439 _440 _441 _442 _443 _444 _445 _446 _447 _448 _449 _450 _451 _452 _453 _454 _455 _456 _457 _458 _459 _460 _461 _462 _463 _464 _465 _466 _467 _468 _469 _470 _471 _472 _473 _474 _475 _476 _477 _478 _479 _480 _481 _483 _484 _485 _486 _487 _488 _489 _490 _491 _492 _493 _494 _495 _496 _497 _498 _499 _500 _502 _503 _504 _505 _506 _507 _509 _510 _511 _512 _513 _514 _515 _516 _517 _518 _519 _520 _521 _522 _523 _524 _525 _526 _527 _528 _529 _530 _531 _532 _533 _534 _535 _536 _537 _538 _539 _540 _541 _542 _543 _544 _545 _546 _547 _548 _549 _550 _551 _552 _553 _554 _555 _556 _557 _558 _559 _560 _561 _562 _563 _564 _565 _566 _567 _568 _569 _570 _571 _572 _573 _574 _575 _576 _577 _578 _579 _580 _581 _582 _583 _584 _585 _586 _587 _588 _589 _590 _591 _592 _593 _594 _595 _596 _597 _598 _599 _600 _601 _602 _603 _604 _605 _606 _607 _608 _609 _610 _611 _612 _613 _614 _615 _616 _617 _618 _619 _620 _622 _623 _624 _625 _626 _627 _628 _629 _630 _631 _632 _633 _634 _635 _636 _637 _639 _640 _641 _642 _643 _644 _645 _646 _647 _648 _649 _650 _651 _652 _653 _654 _655 _656 _657 _658 _659 _660 _661 _662 _663 _664 _665 _666 _667 _668 _669 _670 _671 _672 _673 _674 _675 _676 _677 _678 _679 _680 _681 _682 _683 _684 _685 _686 _687 _688 _689 _690 _691 _692 _693 _694 _695 _696 _697 _698 _699 _700 _701 _702 _703 _704 _705 _706 _707 _708 _709 _710 _711 _712 _713 _714 _715 _716 _717 _718 _719 _720 _721 _722 _723 _724 _725 _726 _727 _728 _729 _730 _731 _732 _733 _734 _735 _736 _737 _738 _739 _740 _741 _742 _743 _744 _745 _746 _747 _748 _749 _750 _751 _752 _753 _754 _755 _756 _757 _758 _759 _760 _761 _762 _763 _764 _765 _767 _768 _769 _770 _771 _772 _773 _774 _775 _776 _777 _778 _779 _780 _781 _782 _783 _784 _785 _786 _787 _788 _789 _790 _791 _792 _793 _794 _795 _796 _797 _798 _799 _800 _801 _802 _803 _804 _805 _806 _807 _808 _809 _810 _811 _812 _813 _814 _815 _816 _817 _818 _820 _821 _822 _824 _825 _826 _827 _828 _829 _830 _831 _832 _833 _834 _835 _836 _837 _838 _839 _840 _841 _842 _843 _844 _845 _846 _847 _848 _849 _850 _851 _852 _853 _854 _855 _856 _857 _858 _859 _860 _861 _862 _863 _864 _865 _866 _867 _868 _869 _870 _871 _872 _873 _874 _875 _876 _877 _878 _879 _880 _881 _882 _883 _884 _885 _886 _887 _888 _889 _890 _891 _892 _893 _894 _895 _896 _897 _898 _899 _900 _901 _902 _903 _904 _905 _906 _907 _908 _909 _910 _911 _912 _913 _914 _915 _916 _917 _918 _919 _920 _921 _922 _923 _924 _925 _926 _927 _928 _929 _930 _931 _932 _933 _934 _935 _936 _937 _938 _939 _940 _941 _942 _943 _944 _945 _946 _947 _948 _949 _950 _951 _952 _953 _954 _955 _956 _957 _958 _959 _960 _961 _962 _963 _964 _965 _966 _967 _968 _969 _970 _971 _972 _973 _974 _975 _976 _977 _978 _979 _980 _981 _982 _983 _984 _985 _986 _987 _988 _989 _990 _991 _992 _993 _994 _995 _996 _997 _998 _999 _1000 _1001 _1002 _1003 _1004 _1006 _1007 _1008 _1009 _1010 _1011 _1012 _1013 _1014 _1015 _1016 _1017 _1018 _1019 _1020 _1021 _1022 _1023 _1024 _1025 _1026 _1027 _1028 _1029 _1030 _1031 _1032 _1033 _1034 _1035 _1036 _1037 _1038 _1039 _1040 _1041 _1042 _1043 _1044 _1045 _1046 _1047 _1048 _1049 _1050 _1051 _1052 _1053 _1054 _1055 _1056 _1057 _1058 _1059 _1060 _1061 _1062 _1063 _1064 _1065 _1066 _1067 _1068 _1069 _1070 _1071 _1072 _1073 _1074 _1075 _1076 _1077 _1078 _1079 _1080 _1081 _1082 _1083 _1084 _1085 _1086 _1087 _1088 _1089 _1090 _1091 _1092 _1093 _1094 _1095 _1096 _1097 _1098 _1099 _1100 _1101 _1102 _1103 _1104 _1105 _1107 _1109 _1111 _1112 _1113 _1114 _1115 _1116 _1117 _1118 _1119 _1120 _1121 _1122 _1123 _1124 _1125 _1126 _1127 _1128 _1129 _1130 _1131 _1132 _1133 _1134 _1136 _1135 _1138 _1140 _1142 _1144 _1145 _1146 _1147 _1148 _1149 _1150 _1151 _1152 _1153 _1154 _1156 _1157 _1158 _1159 _1161 _1162 _1164 _1165 _1167 _1168 _1170 _1172 _1174 _1176 _1178 _1180 _1182 _1184 _1186 _1187 _1188 _1189 _1190 _1191 _1192 _1106 _1108 _766 _1193 _1195 _1196 _1194 _1197 _1198 _1199 _1200 _1201 _1202 _1203 _1204 _1205 _1206 _1207 _1208 _1209 _1210 _1211 _1212 _1213 _1214 _1215 _1216 _1217 _1218 _1219 _1220 _1221 _1222 _1223 _1224 _1225 _1226 _1227 _1228 _1229 _1230 _1231 _1232 _1233 _1234 _1235 _1236 _1237 _1238 _1239 _1240 _1242 _1243 _1244 _1245 _1246 _1248 _1250 _1251 _1252 _1253 _1254 _1256 _1257 _1258 _1259 _1261 _1262 _1263 _1264 _1265 _1266 _1267 _1268 _1269 _1270 _1271 _1272 _1273 _1274 _1275 _1276 _1277 _1278 _1279 _1280 _1281 _1282 _1283 _1284 _1285 _1286 _1287 _1288 _1289 _1290 _1291 _1292 _1293 _1294 _1295 _1296 _1297 _1298 _1299 _1300 _1301 _1302 _1303 _1304 _1305 _1306 _1307 _1308 _1309 _1310 _1311 _1312 _1313 _1314 _1315 _1316 _1317 _1318 _1319 _1320 _1321 _1322 _1323 _1324 _1325 _1326 _1327 _1328 _1329 _1330 _1331 _1332 _1333 _1334 _1335 _1336 _1337 _1338 _1339 _1340 _1341 _1342 _1343 _1344 _1345 _1346 _1347 _1348 _1349 _1350 _1351 _1352 _1353 _1354 _1355 _1356 _1357 _1358 _1359 _1360 _1361 _1362 _1363 _1364 _1365 _1366 _1367 _1368 _1369 _1370 _1371 _1372 _1373 _1374 _1375 _1376 _1377 _1378 _1379 _1380 _1381 _1382 _1383 _1384 _1385 _1386 _1387 _1388 _1389 _1390 _1391 _1392 _1393 _1394 _1395 _1396 _1397 _1398 _1399 _1400 _1401 _1402 _1403 _1404 _1405 _1406 _1407 _1408 _1409 _1410 _1411 _1412 _1413 _1414 _1415 _1416 _1417 _1418 _1419 _1420 _1421 _1422 _1423 _1424 _1425 _1426 _1427 _1428 _1429 _1431 _1432 _1433 _1434 _1435 _1436 _1437 _1438 _1439 _1440 _1441 _1442 _1443 _1444 _1445 _1446 _1447 _1448 _1449 _1450 _1451 _1452 _1453 _1454 _1455 _1456 _1457 _1458 _1459 _1460 _1461 _1462 _1463 _1464 _1465 _1466 _1467 _1468 _1469 _1470 _1471 _1472 _1473 _1474 _1475 _1476 _1477 _1478 _1479 _1480 _1481 _1482 _1483 _1484 _1485 _1486 _1487 _1488 _1489 _1490 _1492 _1491 _1493 _1494 _819 _1495 _1496 _1497 _1498 _1500 _1499 _1502 _1503 _1504 _1505 _1506 _1507 _1508 _1509 _1510 _1511 _1513 _1514 _1515 _1516 _1517 _1518 _1519 _1520 _1521 _1522 _1523 _1524 _1526 _1525 _1527 _1528 _1529 _1530 _1531 _1532 _1533 _1534 _1535 _1536 _1537 _1538 _1539 _1540 _1541 _1542 _1543 _1544 _1545 _1546 _1547 _1548 _1549 _1550 _1551 _1552 _1553 _1554 _1555 _1556 _1557 _1558 _1559 _1560 _1561 _1563 _1564 _1565 _1566 _1567 _1568 _1569 _1570 _1571 _1572 _1574 _1575 _1576 _1577 _1578 _1579 _1580 _1581 _1582 _1583 _1584 _1585 _1586 _1587 _1588 _1589 _1590 _1591 _1592 _1593 _1594 _1595 _1562 _1596 _1597 _1598 _1599 _1600 _1601 _1602 _1603 _1604 _1605 _1606 _1607 _1608 _1609 _1610 _1611 _1612 _1613 _1614 _1615 _1616 _1617 _1618 _1619 _1620 _1621 _1622 _1623 _1624 _1625 _1626 _1627 _1628 _1629 _1630 _1631 _1632 _1633 _1634 _1635 _1636 _1637 _1638 _1639 _1640 _1641 _1642 _1643 _1644 _1645 _1646 _1647 _1648 _1649 _1650 _1651 _1652 _1653 _1654 _1655 _1656 _1657 _1658 _1659 _1660 _1661 _1662 _1663 _1664 _1665 _1666 _1667 _1668 _1669 _1670 _1671 _1672 _1673 _1674 _1675 _1676 _1677 _1678 _1679 _1680 _1681 _1682 _1683 _1684 _1685 _1686 _1687 _1688 _1689 _1690 _1691 _1692 _1693 _1694 _1695 _1696 _1697 _1698 _1699 _1700 _1701 _1702 _1703 _1704 _1705 _1706 _1707 _1708 _1709 _1710 _1711 _1712 _1713 _1714 _1715 _1716 _1717 _1718 _1719 _1720 _1721 _1722 _1723 _1724 _1725 _1726 _1727 _1728 _1729 _1730 _1731 _1732 _1733 _1734 _1735 _1736 _1737 _1738 _1739 _1740 _1741 _1742 _1743 _1744 _1745 _1746 _1747 _1748 _1749 _1750 _1751 _1752 _1753 _1754 _1755 _1756 _1757 _1758 _1759 _1760 _1761 _1762 _1763 _1764 _1765 _1766 _1767 _1768 _1769 _1770 _1771 _1772 _1773 _1774 _1775 _1776 _1777 _1778 _1779 _1780 _1781 _1782 _1783 _1784 _1785 _1786 _1787 _1788 _1789 _1790 _1791 _1792 _1793 _1794 _1795 _1796 _1797 _1798 _1799 _1800 _1801 _1802 _1803 _1804 _1805 _1806 _1807 _1808 _1809 _1810 _1811 _1812 _1813 _1814 _1815 _1816 _1817 _1818 _1819 _1820 _1821 _1822 _1823 _1824 _1825 _1826 _1827 _1828 _1829 _1830 _1831 _1832 _1833 _1834 _1835 _1836 _1837 _1838 _1839 _1840 _1841 _1842 _1843 _1844 _1845 _1846 _1847 _1848 _1849 _1850 _1851 " mangled="_Z2::" demangled="::"/>
- <Namespace id="_2" name="std" context="_1" members="_1853 _1854 _1855 _1856 _1857 _1858 _1859 _1860 _1861 _1862 _1863 _1864 _1865 _1866 _1867 _1868 _1869 _1870 _1871 _1872 _1873 _1874 _1875 _1876 _1877 _1878 _1879 _1880 _1881 _1882 _1883 _1884 _1885 _1886 _1887 _1888 _1889 _1890 _1891 _1892 _1893 _1894 _1895 _1896 _1897 _1898 _1899 _1900 _1901 _1902 _1907 _1908 _1913 _1914 _1927 _1928 _1933 _1934 _1939 _1940 _1941 _1942 _1943 _1944 _1945 _1946 _1947 _1948 _1949 _1963 _1964 _1965 _1966 _1967 _1968 _1969 _1970 _1971 _1972 _1975 _1980 _1981 _1982 _1983 _1988 _1989 _1990 _1991 _1994 _1995 _1996 _1997 _1998 _1999 _2000 _2001 _2002 _2003 _2004 _2013 _2014 _2015 _2046 _2055 _2056 _2057 _2058 _2059 _2060 _2061 _2062 _2063 _2064 _2065 _2066 _2067 _2068 _2069 _2070 _2071 _2072 _2073 _2074 _2075 _2076 _2077 _2078 _2079 _2080 _2081 _2082 _2083 _2084 _2085 _2086 _2087 _2088 _2089 _2090 _2091 _2092 _2093 _2094 _2095 _2096 _2097 _2098 _2099 _2100 _2101 _2107 _2108 _2148 _2149 _2150 _2168 _2169 _2209 _2211 _2212 _2213 _2274 _2287 _2296 _2313 _2314 _2319 _2321 _2322 _2323 _2330 _2331 _2332 _2455 _2456 _2457 _2458 _2459 _2460 _2461 _2462 _2463 _2465 _2467 _2469 _2471 _2473 _2475 _2477 _2479 _2481 _2483 _2485 _2487 _2489 _2491 _2493 _2495 _2497 _2499 _2501 _2503 _2505 _2507 _2509 _2511 _2513 _2515 _2516 _2521 _2522 _2523 _2524 _2525 _2526 _2527 _2528 _2529 _2530 _2531 _2532 _2533 _2534 _2536 _2537 _2538 _2539 _2540 _2541 _2542 _2543 _2544 _2546 _2548 _2567 _2568 _2569 _2570 _2571 _2572 _2573 _2574 _2575 _2638 _2639 _2640 _2641 _2642 _2643 _2644 _2653 _2654 _2655 " mangled="_Z3std" demangled="std"/>
- <Function id="_3" name="_GLOBAL__D__home_roman_pygccxml_sources_sources_pyplusplus_dev_examples_pyboost_dev_dev_date_time_include_date_time.pypp.hppstnHfb" returns="_1155" context="_1" location="f0:131" file="f0" line="131" endline="131"/>
- <Function id="_4" name="_GLOBAL__I__home_roman_pygccxml_sources_sources_pyplusplus_dev_examples_pyboost_dev_dev_date_time_include_date_time.pypp.hppstnHfb" returns="_1155" context="_1" location="f0:131" file="f0" line="131" endline="131"/>
- <Variable id="_5" name="_ZGVN5boost9date_time10date_facetINS_9gregorian4dateEcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE2idE" type="_1249" context="_1" location="f1:372" file="f1" line="372" artificial="1"/>
- <Function id="_6" name="__static_initialization_and_destruction_0" returns="_1155" context="_1" mangled="_Z41__static_initialization_and_destruction_0ii" demangled="__static_initialization_and_destruction_0(int, int)" location="f0:131" file="f0" line="131" endline="76">
- <Argument name="__initialize_p" type="_501" location="f0:131" file="f0" line="131"/>
- <Argument name="__priority" type="_501" location="f0:131" file="f0" line="131"/>
+<GCC_XML cvs_revision="1.114">
+ <Namespace id="_1" name="::" members="_3 _4 _5 _6 _7 _8 _9 _10 _11 _12 _13 _14 _15 _16 _17 _18 _19 _20 _21 _22 _23 _24 _25 _26 _27 _28 _29 _30 _31 _32 _33 _34 _35 _36 _37 _38 _39 _40 _41 _42 _43 _44 _45 _46 _47 _48 _49 _50 _51 _52 _53 _54 _55 _56 _57 _58 _59 _60 _61 _62 _63 _64 _65 _66 _67 _68 _69 _70 _71 _72 _73 _74 _75 _76 _77 _78 _79 _80 _81 _82 _83 _84 _85 _86 _87 _88 _89 _90 _91 _92 _93 _94 _95 _96 _97 _98 _99 _100 _101 _102 _103 _104 _105 _106 _107 _108 _109 _110 _111 _112 _113 _114 _115 _116 _117 _118 _119 _120 _121 _122 _123 _124 _125 _126 _127 _128 _129 _130 _131 _132 _133 _134 _135 _136 _137 _138 _139 _140 _141 _142 _143 _144 _145 _146 _147 _148 _149 _150 _151 _152 _153 _154 _155 _156 _157 _158 _159 _160 _161 _162 _163 _164 _165 _166 _167 _168 _169 _170 _171 _172 _173 _174 _175 _176 _177 _178 _179 _180 _181 _182 _183 _184 _185 _186 _187 _188 _189 _190 _191 _192 _193 _194 _195 _196 _197 _198 _199 _200 _201 _202 _203 _204 _205 _206 _207 _208 _209 _210 _211 _212 _213 _214 _215 _216 _217 _218 _219 _220 _221 _222 _223 _224 _225 _226 _227 _228 _229 _230 _231 _232 _233 _234 _235 _236 _237 _238 _239 _240 _241 _242 _243 _244 _245 _246 _247 _248 _249 _250 _251 _252 _253 _254 _255 _256 _257 _258 _259 _260 _261 _262 _263 _264 _265 _266 _267 _268 _269 _270 _271 _272 _273 _274 _275 _276 _277 _278 _279 _280 _281 _282 _283 _284 _285 _286 _287 _288 _289 _290 _291 _292 _293 _294 _295 _296 _297 _298 _299 _300 _301 _302 _303 _304 _305 _306 _307 _308 _309 _310 _311 _312 _313 _314 _315 _316 _317 _318 _319 _320 _321 _322 _323 _324 _325 _326 _327 _328 _329 _330 _331 _332 _333 _334 _335 _336 _337 _338 _339 _340 _341 _342 _343 _344 _345 _346 _347 _348 _349 _350 _351 _352 _353 _354 _355 _356 _357 _358 _359 _360 _361 _362 _363 _364 _365 _366 _367 _368 _369 _370 _371 _372 _373 _374 _375 _376 _377 _378 _379 _380 _381 _382 _383 _384 _385 _386 _387 _388 _389 _390 _391 _392 _393 _394 _395 _396 _397 _398 _399 _400 _401 _402 _403 _404 _405 _406 _407 _408 _409 _410 _411 _412 _413 _414 _415 _416 _417 _418 _419 _420 _421 _422 _423 _424 _425 _426 _427 _428 _429 _430 _431 _432 _433 _434 _435 _436 _437 _438 _439 _440 _441 _442 _443 _444 _445 _446 _447 _448 _449 _450 _451 _452 _453 _454 _455 _456 _457 _458 _459 _460 _461 _462 _463 _464 _465 _466 _467 _468 _469 _470 _471 _472 _473 _474 _475 _476 _477 _478 _479 _480 _481 _482 _484 _485 _486 _487 _488 _489 _490 _491 _492 _493 _494 _495 _496 _497 _498 _499 _500 _501 _502 _504 _505 _506 _507 _508 _509 _511 _512 _513 _514 _515 _516 _517 _518 _519 _520 _521 _522 _523 _524 _525 _526 _527 _528 _529 _530 _531 _532 _533 _534 _535 _536 _537 _538 _539 _540 _541 _542 _543 _544 _545 _546 _547 _548 _549 _550 _551 _552 _553 _554 _555 _556 _557 _558 _559 _560 _561 _562 _563 _564 _565 _566 _567 _568 _569 _570 _571 _572 _573 _574 _575 _576 _577 _578 _579 _580 _581 _582 _583 _584 _585 _586 _587 _588 _589 _590 _591 _592 _593 _594 _595 _596 _597 _598 _599 _600 _601 _602 _603 _604 _605 _606 _607 _608 _609 _610 _611 _612 _613 _614 _615 _616 _617 _618 _619 _620 _621 _622 _623 _624 _625 _627 _628 _629 _630 _631 _632 _633 _634 _635 _636 _637 _638 _639 _640 _641 _642 _644 _645 _646 _647 _648 _649 _650 _651 _652 _653 _654 _655 _656 _657 _658 _659 _660 _661 _662 _663 _664 _665 _666 _667 _668 _669 _670 _671 _672 _673 _674 _675 _676 _677 _678 _679 _680 _681 _682 _683 _684 _685 _686 _687 _688 _689 _690 _691 _692 _693 _694 _695 _696 _697 _698 _699 _700 _701 _702 _703 _704 _705 _706 _707 _708 _709 _710 _711 _712 _713 _714 _715 _716 _717 _718 _719 _720 _721 _722 _723 _724 _725 _726 _727 _728 _729 _730 _731 _732 _733 _734 _735 _736 _737 _738 _739 _740 _741 _742 _743 _744 _745 _746 _747 _748 _749 _750 _751 _752 _753 _754 _755 _756 _757 _758 _759 _760 _761 _762 _763 _764 _765 _767 _768 _769 _770 _771 _772 _773 _774 _775 _776 _777 _778 _779 _780 _781 _782 _783 _784 _785 _786 _787 _788 _789 _790 _791 _792 _793 _794 _795 _796 _797 _798 _799 _800 _801 _802 _803 _804 _805 _806 _807 _808 _809 _810 _811 _812 _813 _814 _815 _816 _817 _818 _819 _820 _821 _822 _823 _824 _825 _826 _827 _828 _829 _830 _831 _832 _834 _835 _836 _838 _839 _840 _841 _842 _843 _844 _845 _846 _847 _848 _849 _850 _851 _852 _853 _854 _855 _856 _857 _858 _859 _860 _861 _862 _863 _864 _865 _866 _867 _868 _869 _870 _871 _872 _873 _874 _875 _876 _877 _878 _879 _880 _881 _882 _883 _884 _885 _886 _887 _888 _889 _890 _891 _892 _893 _894 _895 _896 _897 _898 _899 _900 _901 _902 _903 _904 _905 _906 _907 _908 _910 _909 _911 _912 _913 _914 _915 _916 _917 _918 _919 _920 _921 _922 _923 _924 _925 _926 _927 _928 _929 _930 _931 _932 _933 _934 _935 _936 _937 _938 _939 _940 _941 _942 _943 _944 _945 _946 _947 _948 _949 _950 _951 _952 _953 _954 _955 _956 _957 _958 _959 _960 _961 _962 _963 _964 _965 _967 _968 _969 _970 _971 _972 _973 _974 _975 _976 _977 _978 _979 _980 _981 _982 _983 _984 _985 _986 _987 _988 _989 _990 _991 _992 _993 _994 _995 _996 _997 _998 _999 _1000 _1001 _1002 _1003 _1004 _1005 _1006 _1007 _1008 _1009 _1010 _1011 _1012 _1013 _1014 _1015 _1016 _1017 _1018 _1019 _1020 _1021 _1022 _1023 _1024 _1025 _1026 _1027 _1028 _1029 _1030 _1031 _1032 _1033 _1034 _1035 _1036 _1037 _1038 _1039 _1040 _1041 _1043 _1044 _1045 _1046 _1047 _1048 _1049 _1050 _1051 _1052 _1053 _1054 _1055 _1056 _1057 _1058 _1059 _1060 _1061 _1062 _1063 _1064 _1065 _1066 _1067 _1068 _1069 _1070 _1071 _1072 _1073 _1074 _1075 _1076 _1077 _1078 _1079 _1080 _1081 _1082 _1083 _1084 _1085 _1086 _1087 _1088 _1089 _1090 _1091 _1092 _1093 _1094 _1095 _1096 _1097 _1098 _1099 _1100 _1101 _1102 _1103 _1104 _1105 _1106 _1107 _1108 _1109 _1110 _1111 _1112 _1113 _1114 _1115 _1116 _1117 _1118 _1119 _1120 _1121 _1122 _1123 _1124 _1125 _1126 _1127 _1128 _1129 _1130 _1131 _1132 _1133 _1134 _1135 _1136 _1137 _1138 _1139 _1140 _1141 _1142 _1143 _1144 _1146 _1148 _1150 _1151 _1152 _1153 _1154 _1155 _1156 _1157 _1158 _1159 _1160 _1161 _1162 _1163 _1164 _1165 _1166 _1167 _1168 _1169 _1170 _1171 _1172 _1173 _1175 _1174 _1177 _1179 _1181 _1183 _1184 _1185 _1186 _1187 _1188 _1189 _1190 _1191 _1192 _1193 _1195 _1196 _1197 _1198 _1200 _1201 _1203 _1204 _1206 _1207 _1209 _1211 _1213 _1215 _1217 _1219 _1221 _1223 _1225 _1226 _1227 _1228 _1229 _1230 _1231 _1145 _1147 _766 _1232 _1234 _1235 _1233 _1236 _1237 _1238 _1239 _1240 _1241 _1242 _1243 _1244 _1245 _1246 _1247 _1248 _1249 _1250 _1251 _1252 _1253 _1254 _1255 _1256 _1257 _1258 _1259 _1260 _1261 _1262 _1263 _1264 _1265 _1266 _1267 _1268 _1269 _1270 _1271 _1272 _1273 _1274 _1275 _1276 _1277 _1278 _1279 _1281 _1282 _1283 _1284 _1285 _1286 _1287 _1289 _1291 _1292 _1293 _1294 _1295 _1297 _1298 _1299 _1300 _1302 _1303 _1304 _1305 _1306 _1307 _1308 _1309 _1310 _1311 _1312 _1313 _1314 _1315 _1316 _1317 _1318 _1319 _1320 _1321 _1322 _1323 _1324 _1325 _1326 _1327 _1328 _1329 _1330 _1331 _1332 _1333 _1334 _1335 _1336 _1337 _1338 _1339 _1340 _1341 _1342 _1343 _1344 _1345 _1346 _1347 _1348 _1349 _1350 _1351 _1352 _1353 _1354 _1355 _1356 _1357 _1358 _1359 _1360 _1361 _1362 _1363 _1364 _1365 _1366 _1367 _1368 _1369 _1370 _1371 _1372 _1373 _1374 _1375 _1376 _1377 _1378 _1379 _1380 _1381 _1382 _1383 _1384 _1385 _1386 _1387 _1388 _1389 _1390 _1391 _1392 _1393 _1394 _1395 _1396 _1397 _1398 _1399 _1400 _1401 _1402 _1403 _1404 _1405 _1406 _1407 _1408 _1409 _1410 _1411 _1412 _1413 _1414 _1415 _1416 _1417 _1418 _1419 _1420 _1421 _1422 _1423 _1424 _1425 _1426 _1427 _1428 _1429 _1430 _1431 _1432 _1433 _1434 _1435 _1436 _1437 _1438 _1439 _1440 _1441 _1442 _1443 _1444 _1445 _1446 _1447 _1448 _1449 _1450 _1451 _1452 _1453 _1454 _1455 _1456 _1457 _1458 _1459 _1460 _1461 _1462 _1463 _1464 _1465 _1466 _1467 _1468 _1469 _1470 _1471 _1472 _1473 _1474 _1475 _1476 _1477 _1479 _1480 _1481 _1482 _1483 _1484 _1485 _1486 _1487 _1488 _1489 _1490 _1491 _1492 _1493 _1494 _1495 _1496 _1497 _1498 _1499 _1500 _1501 _1502 _1503 _1504 _1505 _1506 _1507 _1508 _1509 _1510 _1511 _1512 _1513 _1514 _1515 _1516 _1517 _1518 _1519 _1520 _1521 _1522 _1523 _1524 _1525 _1526 _1527 _1528 _1529 _1530 _1531 _1532 _1533 _1534 _1535 _1536 _1537 _1538 _1539 _1540 _1541 _1542 _1543 _833 _1545 _1544 _1546 _1547 _1548 _1549 _1550 _1551 _1552 _1554 _1555 _1556 _1557 _1558 _1559 _1560 _1561 _1562 _1563 _1564 _1565 _1567 _1566 _1568 _1569 _1570 _1571 _1572 _1573 _1574 _1575 _1576 _1577 _1578 _1579 _1580 _1581 _1582 _1583 _1584 _1585 _1586 _1587 _1588 _1589 _1590 _1591 _1592 _1593 _1594 _1595 _1596 _1597 _1598 _1599 _1600 _1601 _1602 _1604 _1605 _1606 _1607 _1608 _1609 _1610 _1611 _1612 _1613 _1615 _1616 _1617 _1618 _1619 _1620 _1621 _1622 _1623 _1624 _1625 _1626 _1627 _1628 _1629 _1630 _1631 _1632 _1633 _1634 _1635 _1636 _1603 _1637 _1638 _1639 _1640 _1641 _1642 _1643 _1644 _1645 _1646 _1647 _1648 _1649 _1650 _1651 _1652 _1653 _1654 _1655 _1656 _1657 _1658 _1659 _1660 _1661 _1662 _1663 _1664 _1665 _1666 _1667 _1668 _1669 _1670 _1671 _1672 _1673 _1674 _1675 _1676 _1677 _1678 _1679 _1680 _1681 _1682 _1683 _1684 _1685 _1686 _1687 _1688 _1689 _1690 _1691 _1692 _1693 _1694 _1695 _1696 _1697 _1698 _1699 _1700 _1701 _1702 _1703 _1704 _1705 _1706 _1707 _1708 _1709 _1710 _1711 _1712 _1713 _1714 _1715 _1716 _1717 _1718 _1719 _1720 _1721 _1722 _1723 _1724 _1725 _1726 _1727 _1728 _1729 _1730 _1731 _1732 _1733 _1734 _1735 _1736 _1737 _1738 _1739 _1740 _1741 _1742 _1743 _1744 _1745 _1746 _1747 _1748 _1749 _1750 _1751 _1752 _1753 _1754 _1755 _1756 _1757 _1758 _1759 _1760 _1761 _1762 _1763 _1764 _1765 _1766 _1767 _1768 _1769 _1770 _1771 _1772 _1773 _1774 _1775 _1776 _1777 _1778 _1779 _1780 _1781 _1782 _1783 _1784 _1785 _1786 _1787 _1788 _1789 _1790 _1791 _1792 _1793 _1794 _1795 _1796 _1797 _1798 _1799 _1800 _1801 _1802 _1803 _1804 _1805 _1806 _1807 _1808 _1809 _1810 _1811 _1812 _1813 _1814 _1815 _1816 _1817 _1818 _1819 _1820 _1821 _1822 _1823 _1824 _1825 _1826 _1827 _1828 _1829 _1830 _1831 _1832 _1833 _1834 _1835 _1836 _1837 _1838 _1839 _1840 _1841 _1842 _1843 _1844 _1845 _1846 _1847 _1848 _1849 _1850 _1851 _1852 _1853 _1854 _1855 _1856 _1857 _1858 _1859 _1860 _1861 _1862 _1863 _1864 _1865 _1866 _1867 _1868 _1869 _1870 _1871 _1872 _1873 _1874 _1875 _1876 _1877 _1878 _1879 _1880 _1881 _1882 _1883 _1884 _1885 _1886 _1887 _1888 _1889 _1890 _1891 _1892 _1893 _1894 _1895 " mangled="_Z2::" demangled="::"/>
+ <Namespace id="_2" name="std" context="_1" members="_1897 _1898 _1899 _1900 _1901 _1902 _1903 _1904 _1905 _1906 _1907 _1908 _1909 _1910 _1911 _1912 _1913 _1914 _1915 _1916 _1917 _1918 _1919 _1920 _1921 _1922 _1923 _1924 _1925 _1926 _1927 _1928 _1929 _1930 _1931 _1932 _1933 _1934 _1935 _1936 _1937 _1938 _1939 _1940 _1941 _1942 _1943 _1944 _1945 _1946 _1951 _1952 _1957 _1958 _1971 _1972 _1977 _1978 _1983 _1984 _1985 _1986 _1987 _1988 _1989 _1990 _1991 _1992 _1993 _2007 _2008 _2009 _2010 _2011 _2012 _2013 _2014 _2015 _2016 _2019 _2024 _2025 _2026 _2027 _2032 _2033 _2034 _2035 _2038 _2039 _2040 _2041 _2042 _2043 _2044 _2045 _2046 _2047 _2048 _2057 _2058 _2059 _2090 _2099 _2100 _2101 _2102 _2103 _2104 _2105 _2106 _2107 _2108 _2109 _2110 _2111 _2112 _2113 _2114 _2115 _2116 _2117 _2118 _2119 _2120 _2121 _2122 _2123 _2124 _2125 _2126 _2127 _2128 _2129 _2130 _2131 _2132 _2133 _2134 _2135 _2136 _2137 _2138 _2139 _2140 _2141 _2142 _2143 _2144 _2145 _2151 _2152 _2192 _2193 _2194 _2212 _2213 _2253 _2255 _2256 _2257 _2318 _2331 _2340 _2357 _2358 _2363 _2365 _2366 _2367 _2374 _2375 _2376 _2416 _2417 _2418 _2419 _2420 _2421 _2422 _2423 _2424 _2426 _2428 _2430 _2432 _2434 _2436 _2438 _2440 _2442 _2444 _2446 _2448 _2450 _2452 _2454 _2456 _2458 _2460 _2462 _2464 _2466 _2468 _2470 _2472 _2474 _2476 _2477 _2482 _2483 _2484 _2485 _2486 _2487 _2488 _2489 _2490 _2491 _2492 _2493 _2494 _2495 _2497 _2498 _2499 _2500 _2501 _2502 _2503 _2504 _2505 _2507 _2509 _2532 _2533 _2534 _2535 _2536 _2537 _2538 _2539 _2700 _2701 _2702 _2703 _2704 _2705 _2706 _2715 _2716 _2717 " mangled="_Z3std" demangled="std"/>
+ <Function id="_3" name="_GLOBAL__D__home_roman_language_binding_sources_pyplusplus_dev_examples_pyboost_dev_dev_date_time_include_date_time.pypp.hppStu8kb" returns="_1194" context="_1" location="f0:131" file="f0" line="131" endline="131"/>
+ <Function id="_4" name="_GLOBAL__I__home_roman_language_binding_sources_pyplusplus_dev_examples_pyboost_dev_dev_date_time_include_date_time.pypp.hppStu8kb" returns="_1194" context="_1" location="f0:131" file="f0" line="131" endline="131"/>
+ <Variable id="_5" name="_ZGVN5boost9date_time10date_facetINS_9gregorian4dateEcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE2idE" type="_1290" context="_1" location="f1:372" file="f1" line="372" artificial="1"/>
+ <Function id="_6" name="__static_initialization_and_destruction_0" returns="_1194" context="_1" mangled="_Z41__static_initialization_and_destruction_0ii" demangled="__static_initialization_and_destruction_0(int, int)" location="f0:131" file="f0" line="131" endline="76">
+ <Argument name="__initialize_p" type="_503" location="f0:131" file="f0" line="131"/>
+ <Argument name="__priority" type="_503" location="f0:131" file="f0" line="131"/>
</Function>
- <Variable id="_7" name="_ZTSSt12out_of_range" type="_2656c" init=""St12out_of_range"" context="_1" location="f0:131" file="f0" line="131" artificial="1"/>
- <Variable id="_8" name="_ZTSN5boost9gregorian11bad_weekdayE" type="_2658c" init=""N5boost9gregorian11bad_weekdayE"" context="_1" location="f0:131" file="f0" line="131" artificial="1"/>
- <Variable id="_9" name="_ZTSN5boost9gregorian15bad_day_of_yearE" type="_2660c" init=""N5boost9gregorian15bad_day_of_yearE"" context="_1" location="f0:131" file="f0" line="131" artificial="1"/>
- <Variable id="_10" name="_ZTSN5boost9gregorian16bad_day_of_monthE" type="_2662c" init=""N5boost9gregorian16bad_day_of_monthE"" context="_1" location="f0:131" file="f0" line="131" artificial="1"/>
- <Variable id="_11" name="_ZTSN5boost9gregorian8bad_yearE" type="_2664c" init=""N5boost9gregorian8bad_yearE"" context="_1" location="f0:131" file="f0" line="131" artificial="1"/>
- <Variable id="_12" name="_ZTSN5boost12bad_weak_ptrE" type="_2666c" init=""N5boost12bad_weak_ptrE"" context="_1" location="f0:131" file="f0" line="131" artificial="1"/>
- <Variable id="_13" name="_ZTSN5boost9gregorian9bad_monthE" type="_2668c" init=""N5boost9gregorian9bad_monthE"" context="_1" location="f0:131" file="f0" line="131" artificial="1"/>
- <Variable id="_14" name="_ZTSN5boost16bad_lexical_castE" type="_2670c" init=""N5boost16bad_lexical_castE"" context="_1" location="f0:131" file="f0" line="131" artificial="1"/>
- <Variable id="_15" name="_ZTIs" type="_2672c" context="_1" location="f2:856" file="f2" line="856" extern="1" artificial="1"/>
- <Variable id="_16" name="_ZTIx" type="_2672c" context="_1" location="f2:856" file="f2" line="856" extern="1" artificial="1"/>
- <Variable id="_17" name="_ZTIi" type="_2672c" context="_1" location="f2:856" file="f2" line="856" extern="1" artificial="1"/>
- <Variable id="_18" name="_ZTIt" type="_2672c" context="_1" location="f2:856" file="f2" line="856" extern="1" artificial="1"/>
- <Variable id="_19" name="_ZTISs" type="_2674c" context="_1" location="f2:856" file="f2" line="856" extern="1" artificial="1"/>
- <Variable id="_20" name="_ZTIN5boost6detail17lexical_streambufIcEE" type="_2676c" context="_1" location="f2:336" file="f2" line="336" extern="1" artificial="1"/>
- <Function id="_21" name="__cxa_rethrow" returns="_1155" context="_1" location="f3:575" file="f3" line="575" extern="1"/>
- <Variable id="_22" name="_ZTIN5boost9date_time10date_facetINS_9gregorian4dateEcSt19ostreambuf_iteratorIcSt11char_traitsIcEEEE" type="_2676c" context="_1" location="f1:45" file="f1" line="45" extern="1" artificial="1"/>
- <Variable id="_23" name="_ZTIN5boost10local_time21custom_time_zone_baseIcEE" type="_2676c" context="_1" location="f4:29" file="f4" line="29" extern="1" artificial="1"/>
- <Variable id="_24" name="_ZTIN5boost10local_time20posix_time_zone_baseIcEE" type="_2676c" context="_1" location="f5:64" file="f5" line="64" extern="1" artificial="1"/>
- <Variable id="_25" name="_ZTIN5boost9date_time17day_calc_dst_ruleINS_10local_time18nth_kday_rule_specEEE" type="_2676c" context="_1" location="f6:38" file="f6" line="38" extern="1" artificial="1"/>
- <Variable id="_26" name="_ZTIN5boost9date_time17day_calc_dst_ruleINS_10local_time19last_last_rule_specEEE" type="_2676c" context="_1" location="f6:38" file="f6" line="38" extern="1" artificial="1"/>
- <Variable id="_27" name="_ZTIN5boost9date_time17day_calc_dst_ruleINS_10local_time20first_last_rule_specEEE" type="_2676c" context="_1" location="f6:38" file="f6" line="38" extern="1" artificial="1"/>
- <Variable id="_28" name="_ZTIN5boost9date_time14time_zone_baseINS_10posix_time5ptimeEcEE" type="_2674c" context="_1" location="f7:33" file="f7" line="33" extern="1" artificial="1"/>
- <Variable id="_29" name="_ZTIN5boost9date_time15bad_field_countE" type="_2676c" context="_1" location="f8:40" file="f8" line="40" extern="1" artificial="1"/>
- <Variable id="_30" name="_ZTIN5boost9date_time19data_not_accessibleE" type="_2676c" context="_1" location="f8:28" file="f8" line="28" extern="1" artificial="1"/>
- <Variable id="_31" name="_ZTISt13basic_fstreamIwSt11char_traitsIwEE" type="_2676c" context="_1" location="f9:95" file="f9" line="95" extern="1" artificial="1"/>
- <Variable id="_32" name="_ZTISt14basic_ofstreamIwSt11char_traitsIwEE" type="_2676c" context="_1" location="f9:92" file="f9" line="92" extern="1" artificial="1"/>
- <Variable id="_33" name="_ZTISt14basic_ifstreamIwSt11char_traitsIwEE" type="_2676c" context="_1" location="f9:89" file="f9" line="89" extern="1" artificial="1"/>
- <Variable id="_34" name="_ZTISt13basic_filebufIwSt11char_traitsIwEE" type="_2676c" context="_1" location="f9:86" file="f9" line="86" extern="1" artificial="1"/>
- <Variable id="_35" name="_ZTISt13basic_fstreamIcSt11char_traitsIcEE" type="_2676c" context="_1" location="f9:95" file="f9" line="95" extern="1" artificial="1"/>
- <Variable id="_36" name="_ZTISt14basic_ofstreamIcSt11char_traitsIcEE" type="_2676c" context="_1" location="f9:92" file="f9" line="92" extern="1" artificial="1"/>
- <Variable id="_37" name="_ZTISt14basic_ifstreamIcSt11char_traitsIcEE" type="_2676c" context="_1" location="f9:89" file="f9" line="89" extern="1" artificial="1"/>
- <Variable id="_38" name="_ZTISt13basic_filebufIcSt11char_traitsIcEE" type="_2676c" context="_1" location="f9:86" file="f9" line="86" extern="1" artificial="1"/>
- <Variable id="_39" name="_ZTIN5boost9date_time17day_calc_dst_ruleINS_10local_time22partial_date_rule_specEEE" type="_2676c" context="_1" location="f6:38" file="f6" line="38" extern="1" artificial="1"/>
- <Variable id="_40" name="_ZTIN5boost9date_time17day_calc_dst_ruleINS_10local_time18nth_last_rule_specEEE" type="_2676c" context="_1" location="f6:38" file="f6" line="38" extern="1" artificial="1"/>
- <Variable id="_41" name="_ZTIN5boost9date_time17dst_day_calc_ruleINS_9gregorian4dateEEE" type="_2674c" context="_1" location="f6:18" file="f6" line="18" extern="1" artificial="1"/>
- <Variable id="_42" name="_ZTIN5boost10local_time14bad_adjustmentE" type="_2676c" context="_1" location="f5:33" file="f5" line="33" extern="1" artificial="1"/>
- <Variable id="_43" name="_ZTIN5boost10local_time10bad_offsetE" type="_2676c" context="_1" location="f5:28" file="f5" line="28" extern="1" artificial="1"/>
- <Variable id="_44" name="_ZTIN5boost10local_time13dst_not_validE" type="_2676c" context="_1" location="f10:37" file="f10" line="37" extern="1" artificial="1"/>
- <Variable id="_45" name="_ZTIN5boost10local_time18time_label_invalidE" type="_2676c" context="_1" location="f10:32" file="f10" line="32" extern="1" artificial="1"/>
- <Variable id="_46" name="_ZTIN5boost10local_time16ambiguous_resultE" type="_2676c" context="_1" location="f10:26" file="f10" line="26" extern="1" artificial="1"/>
- <Function id="_47" name="matherr" returns="_501" throw="" context="_1" location="f11:293" file="f11" line="293" extern="1">
- <Argument name="__exc" type="_2678" location="f11:293" file="f11" line="293"/>
+ <Variable id="_7" name="_ZTSSt12out_of_range" type="_2718c" init=""St12out_of_range"" context="_1" location="f0:131" file="f0" line="131" artificial="1"/>
+ <Variable id="_8" name="_ZTSN5boost9gregorian11bad_weekdayE" type="_2720c" init=""N5boost9gregorian11bad_weekdayE"" context="_1" location="f0:131" file="f0" line="131" artificial="1"/>
+ <Variable id="_9" name="_ZTSN5boost9gregorian15bad_day_of_yearE" type="_2722c" init=""N5boost9gregorian15bad_day_of_yearE"" context="_1" location="f0:131" file="f0" line="131" artificial="1"/>
+ <Variable id="_10" name="_ZTSN5boost9gregorian16bad_day_of_monthE" type="_2724c" init=""N5boost9gregorian16bad_day_of_monthE"" context="_1" location="f0:131" file="f0" line="131" artificial="1"/>
+ <Variable id="_11" name="_ZTSN5boost9gregorian8bad_yearE" type="_2726c" init=""N5boost9gregorian8bad_yearE"" context="_1" location="f0:131" file="f0" line="131" artificial="1"/>
+ <Variable id="_12" name="_ZTSN5boost12bad_weak_ptrE" type="_2728c" init=""N5boost12bad_weak_ptrE"" context="_1" location="f0:131" file="f0" line="131" artificial="1"/>
+ <Variable id="_13" name="_ZTSN5boost9gregorian9bad_monthE" type="_2730c" init=""N5boost9gregorian9bad_monthE"" context="_1" location="f0:131" file="f0" line="131" artificial="1"/>
+ <Variable id="_14" name="_ZTSN5boost16bad_lexical_castE" type="_2732c" init=""N5boost16bad_lexical_castE"" context="_1" location="f0:131" file="f0" line="131" artificial="1"/>
+ <Variable id="_15" name="_ZTIs" type="_2734c" context="_1" location="f2:1054" file="f2" line="1054" extern="1" artificial="1"/>
+ <Function id="_16" name="__cxa_rethrow" returns="_1194" context="_1" location="f3:575" file="f3" line="575" extern="1"/>
+ <Variable id="_17" name="_ZTIx" type="_2734c" context="_1" location="f2:1054" file="f2" line="1054" extern="1" artificial="1"/>
+ <Variable id="_18" name="_ZTIi" type="_2734c" context="_1" location="f2:1054" file="f2" line="1054" extern="1" artificial="1"/>
+ <Variable id="_19" name="_ZTIt" type="_2734c" context="_1" location="f2:1054" file="f2" line="1054" extern="1" artificial="1"/>
+ <Variable id="_20" name="_ZTISs" type="_2736c" context="_1" location="f2:1054" file="f2" line="1054" extern="1" artificial="1"/>
+ <Variable id="_21" name="_ZTIN5boost6detail26lexical_stream_limited_srcIcNS0_17lexical_streambufIcEEEE" type="_2738c" context="_1" location="f2:593" file="f2" line="593" extern="1" artificial="1"/>
+ <Variable id="_22" name="_ZTIN5boost6detail17lexical_streambufIcEE" type="_2738c" context="_1" location="f2:407" file="f2" line="407" extern="1" artificial="1"/>
+ <Variable id="_23" name="_ZTIN5boost9date_time10date_facetINS_9gregorian4dateEcSt19ostreambuf_iteratorIcSt11char_traitsIcEEEE" type="_2738c" context="_1" location="f1:45" file="f1" line="45" extern="1" artificial="1"/>
+ <Variable id="_24" name="_ZTIN5boost10local_time21custom_time_zone_baseIcEE" type="_2738c" context="_1" location="f4:29" file="f4" line="29" extern="1" artificial="1"/>
+ <Variable id="_25" name="_ZTIN5boost10local_time20posix_time_zone_baseIcEE" type="_2738c" context="_1" location="f5:64" file="f5" line="64" extern="1" artificial="1"/>
+ <Variable id="_26" name="_ZTIN5boost9date_time17day_calc_dst_ruleINS_10local_time18nth_kday_rule_specEEE" type="_2738c" context="_1" location="f6:38" file="f6" line="38" extern="1" artificial="1"/>
+ <Variable id="_27" name="_ZTIN5boost9date_time17day_calc_dst_ruleINS_10local_time19last_last_rule_specEEE" type="_2738c" context="_1" location="f6:38" file="f6" line="38" extern="1" artificial="1"/>
+ <Variable id="_28" name="_ZTIN5boost9date_time17day_calc_dst_ruleINS_10local_time20first_last_rule_specEEE" type="_2738c" context="_1" location="f6:38" file="f6" line="38" extern="1" artificial="1"/>
+ <Variable id="_29" name="_ZTIN5boost9date_time14time_zone_baseINS_10posix_time5ptimeEcEE" type="_2736c" context="_1" location="f7:34" file="f7" line="34" extern="1" artificial="1"/>
+ <Variable id="_30" name="_ZTIN5boost9date_time15bad_field_countE" type="_2738c" context="_1" location="f8:40" file="f8" line="40" extern="1" artificial="1"/>
+ <Variable id="_31" name="_ZTIN5boost9date_time19data_not_accessibleE" type="_2738c" context="_1" location="f8:28" file="f8" line="28" extern="1" artificial="1"/>
+ <Variable id="_32" name="_ZTISt13basic_fstreamIwSt11char_traitsIwEE" type="_2738c" context="_1" location="f9:95" file="f9" line="95" extern="1" artificial="1"/>
+ <Variable id="_33" name="_ZTISt14basic_ofstreamIwSt11char_traitsIwEE" type="_2738c" context="_1" location="f9:92" file="f9" line="92" extern="1" artificial="1"/>
+ <Variable id="_34" name="_ZTISt14basic_ifstreamIwSt11char_traitsIwEE" type="_2738c" context="_1" location="f9:89" file="f9" line="89" extern="1" artificial="1"/>
+ <Variable id="_35" name="_ZTISt13basic_filebufIwSt11char_traitsIwEE" type="_2738c" context="_1" location="f9:86" file="f9" line="86" extern="1" artificial="1"/>
+ <Variable id="_36" name="_ZTISt13basic_fstreamIcSt11char_traitsIcEE" type="_2738c" context="_1" location="f9:95" file="f9" line="95" extern="1" artificial="1"/>
+ <Variable id="_37" name="_ZTISt14basic_ofstreamIcSt11char_traitsIcEE" type="_2738c" context="_1" location="f9:92" file="f9" line="92" extern="1" artificial="1"/>
+ <Variable id="_38" name="_ZTISt14basic_ifstreamIcSt11char_traitsIcEE" type="_2738c" context="_1" location="f9:89" file="f9" line="89" extern="1" artificial="1"/>
+ <Variable id="_39" name="_ZTISt13basic_filebufIcSt11char_traitsIcEE" type="_2738c" context="_1" location="f9:86" file="f9" line="86" extern="1" artificial="1"/>
+ <Variable id="_40" name="_ZTIN5boost9date_time17day_calc_dst_ruleINS_10local_time22partial_date_rule_specEEE" type="_2738c" context="_1" location="f6:38" file="f6" line="38" extern="1" artificial="1"/>
+ <Variable id="_41" name="_ZTIN5boost9date_time17day_calc_dst_ruleINS_10local_time18nth_last_rule_specEEE" type="_2738c" context="_1" location="f6:38" file="f6" line="38" extern="1" artificial="1"/>
+ <Variable id="_42" name="_ZTIN5boost9date_time17dst_day_calc_ruleINS_9gregorian4dateEEE" type="_2736c" context="_1" location="f6:18" file="f6" line="18" extern="1" artificial="1"/>
+ <Variable id="_43" name="_ZTIN5boost10local_time14bad_adjustmentE" type="_2738c" context="_1" location="f5:33" file="f5" line="33" extern="1" artificial="1"/>
+ <Variable id="_44" name="_ZTIN5boost10local_time10bad_offsetE" type="_2738c" context="_1" location="f5:28" file="f5" line="28" extern="1" artificial="1"/>
+ <Variable id="_45" name="_ZTIN5boost10local_time13dst_not_validE" type="_2738c" context="_1" location="f10:37" file="f10" line="37" extern="1" artificial="1"/>
+ <Variable id="_46" name="_ZTIN5boost10local_time18time_label_invalidE" type="_2738c" context="_1" location="f10:32" file="f10" line="32" extern="1" artificial="1"/>
+ <Variable id="_47" name="_ZTIN5boost10local_time16ambiguous_resultE" type="_2738c" context="_1" location="f10:26" file="f10" line="26" extern="1" artificial="1"/>
+ <Function id="_48" name="matherr" returns="_503" throw="" context="_1" location="f11:320" file="f11" line="320" extern="1">
+ <Argument name="__exc" type="_2740" location="f11:320" file="f11" line="320"/>
</Function>
- <Struct id="_48" name="__exception" context="_1" mangled="11__exception" demangled="__exception" location="f11:284" file="f11" line="284" artificial="1" size="256" align="32" members="_2679 _2680 _2681 _2682 _2683 _2684 _2685 " bases=""/>
- <Variable id="_49" name="_LIB_VERSION" type="_50" context="_1" location="f11:269" file="f11" line="269" extern="1"/>
- <Enumeration id="_50" name="_LIB_VERSION_TYPE" context="_1" location="f11:264" file="f11" line="264" size="32" align="32">
+ <Struct id="_49" name="__exception" context="_1" mangled="11__exception" demangled="__exception" location="f11:311" file="f11" line="311" artificial="1" size="256" align="32" members="_2741 _2742 _2743 _2744 _2745 _2746 _2747 " bases=""/>
+ <Variable id="_50" name="_LIB_VERSION" type="_51" context="_1" location="f11:296" file="f11" line="296" extern="1"/>
+ <Enumeration id="_51" name="_LIB_VERSION_TYPE" context="_1" location="f11:291" file="f11" line="291" size="32" align="32">
<EnumValue name="_IEEE_" init="-1"/>
<EnumValue name="_SVID_" init="0"/>
<EnumValue name="_XOPEN_" init="1"/>
<EnumValue name="_POSIX_" init="2"/>
<EnumValue name="_ISOC_" init="3"/>
</Enumeration>
- <Enumeration id="_51" name="._92" context="_1" location="f11:172" file="f11" line="172" artificial="1" size="32" align="32">
+ <Enumeration id="_52" name="._104" context="_1" location="f11:199" file="f11" line="199" artificial="1" size="32" align="32">
<EnumValue name="FP_NAN" init="0"/>
<EnumValue name="FP_INFINITE" init="1"/>
<EnumValue name="FP_ZERO" init="2"/>
<EnumValue name="FP_SUBNORMAL" init="3"/>
<EnumValue name="FP_NORMAL" init="4"/>
</Enumeration>
- <Variable id="_52" name="signgam" type="_501" context="_1" location="f11:130" file="f11" line="130" extern="1"/>
- <Function id="_53" name="__scalbl" returns="_482" throw="" context="_1" location="f12:360" file="f12" line="360" extern="1">
- <Argument name="__x" type="_482" location="f12:360" file="f12" line="360"/>
- <Argument name="__n" type="_482" location="f12:360" file="f12" line="360"/>
+ <Variable id="_53" name="signgam" type="_503" context="_1" location="f11:157" file="f11" line="157" extern="1"/>
+ <Function id="_54" name="__scalbl" returns="_483" throw="" context="_1" location="f12:364" file="f12" line="364" extern="1">
+ <Argument name="__x" type="_483" location="f12:364" file="f12" line="364"/>
+ <Argument name="__n" type="_483" location="f12:364" file="f12" line="364"/>
</Function>
- <Function id="_54" name="scalbl" returns="_482" throw="" context="_1" location="f12:360" file="f12" line="360" extern="1">
- <Argument name="__x" type="_482" location="f12:360" file="f12" line="360"/>
- <Argument name="__n" type="_482" location="f12:360" file="f12" line="360"/>
+ <Function id="_55" name="scalbl" returns="_483" throw="" context="_1" location="f12:364" file="f12" line="364" extern="1">
+ <Argument name="__x" type="_483" location="f12:364" file="f12" line="364"/>
+ <Argument name="__n" type="_483" location="f12:364" file="f12" line="364"/>
</Function>
- <Function id="_55" name="__fmal" returns="_482" throw="" context="_1" location="f12:355" file="f12" line="355" extern="1">
- <Argument name="__x" type="_482" location="f12:355" file="f12" line="355"/>
- <Argument name="__y" type="_482" location="f12:355" file="f12" line="355"/>
- <Argument name="__z" type="_482" location="f12:355" file="f12" line="355"/>
+ <Function id="_56" name="__fmal" returns="_483" throw="" context="_1" location="f12:355" file="f12" line="355" extern="1">
+ <Argument name="__x" type="_483" location="f12:355" file="f12" line="355"/>
+ <Argument name="__y" type="_483" location="f12:355" file="f12" line="355"/>
+ <Argument name="__z" type="_483" location="f12:355" file="f12" line="355"/>
</Function>
- <Function id="_56" name="fmal" returns="_482" throw="" context="_1" location="f12:355" file="f12" line="355" extern="1">
- <Argument name="__x" type="_482" location="f12:355" file="f12" line="355"/>
- <Argument name="__y" type="_482" location="f12:355" file="f12" line="355"/>
- <Argument name="__z" type="_482" location="f12:355" file="f12" line="355"/>
+ <Function id="_57" name="fmal" returns="_483" throw="" context="_1" location="f12:355" file="f12" line="355" extern="1">
+ <Argument name="__x" type="_483" location="f12:355" file="f12" line="355"/>
+ <Argument name="__y" type="_483" location="f12:355" file="f12" line="355"/>
+ <Argument name="__z" type="_483" location="f12:355" file="f12" line="355"/>
</Function>
- <Function id="_57" name="__signbitl" returns="_501" throw="" context="_1" location="f12:351" file="f12" line="351" extern="1" attributes="const">
- <Argument name="__value" type="_482" location="f12:351" file="f12" line="351"/>
+ <Function id="_58" name="__signbitl" returns="_503" throw="" context="_1" location="f12:351" file="f12" line="351" extern="1" attributes="const">
+ <Argument name="__value" type="_483" location="f12:351" file="f12" line="351"/>
</Function>
- <Function id="_58" name="__fpclassifyl" returns="_501" throw="" context="_1" location="f12:347" file="f12" line="347" extern="1" attributes="const">
- <Argument name="__value" type="_482" location="f12:347" file="f12" line="347"/>
+ <Function id="_59" name="__fpclassifyl" returns="_503" throw="" context="_1" location="f12:347" file="f12" line="347" extern="1" attributes="const">
+ <Argument name="__value" type="_483" location="f12:347" file="f12" line="347"/>
</Function>
- <Function id="_59" name="__fminl" returns="_482" throw="" context="_1" location="f12:342" file="f12" line="342" extern="1">
- <Argument name="__x" type="_482" location="f12:342" file="f12" line="342"/>
- <Argument name="__y" type="_482" location="f12:342" file="f12" line="342"/>
+ <Function id="_60" name="__fminl" returns="_483" throw="" context="_1" location="f12:342" file="f12" line="342" extern="1">
+ <Argument name="__x" type="_483" location="f12:342" file="f12" line="342"/>
+ <Argument name="__y" type="_483" location="f12:342" file="f12" line="342"/>
</Function>
- <Function id="_60" name="fminl" returns="_482" throw="" context="_1" location="f12:342" file="f12" line="342" extern="1">
- <Argument name="__x" type="_482" location="f12:342" file="f12" line="342"/>
- <Argument name="__y" type="_482" location="f12:342" file="f12" line="342"/>
+ <Function id="_61" name="fminl" returns="_483" throw="" context="_1" location="f12:342" file="f12" line="342" extern="1">
+ <Argument name="__x" type="_483" location="f12:342" file="f12" line="342"/>
+ <Argument name="__y" type="_483" location="f12:342" file="f12" line="342"/>
</Function>
- <Function id="_61" name="__fmaxl" returns="_482" throw="" context="_1" location="f12:339" file="f12" line="339" extern="1">
- <Argument name="__x" type="_482" location="f12:339" file="f12" line="339"/>
- <Argument name="__y" type="_482" location="f12:339" file="f12" line="339"/>
+ <Function id="_62" name="__fmaxl" returns="_483" throw="" context="_1" location="f12:339" file="f12" line="339" extern="1">
+ <Argument name="__x" type="_483" location="f12:339" file="f12" line="339"/>
+ <Argument name="__y" type="_483" location="f12:339" file="f12" line="339"/>
</Function>
- <Function id="_62" name="fmaxl" returns="_482" throw="" context="_1" location="f12:339" file="f12" line="339" extern="1">
- <Argument name="__x" type="_482" location="f12:339" file="f12" line="339"/>
- <Argument name="__y" type="_482" location="f12:339" file="f12" line="339"/>
+ <Function id="_63" name="fmaxl" returns="_483" throw="" context="_1" location="f12:339" file="f12" line="339" extern="1">
+ <Argument name="__x" type="_483" location="f12:339" file="f12" line="339"/>
+ <Argument name="__y" type="_483" location="f12:339" file="f12" line="339"/>
</Function>
- <Function id="_63" name="__fdiml" returns="_482" throw="" context="_1" location="f12:336" file="f12" line="336" extern="1">
- <Argument name="__x" type="_482" location="f12:336" file="f12" line="336"/>
- <Argument name="__y" type="_482" location="f12:336" file="f12" line="336"/>
+ <Function id="_64" name="__fdiml" returns="_483" throw="" context="_1" location="f12:336" file="f12" line="336" extern="1">
+ <Argument name="__x" type="_483" location="f12:336" file="f12" line="336"/>
+ <Argument name="__y" type="_483" location="f12:336" file="f12" line="336"/>
</Function>
- <Function id="_64" name="fdiml" returns="_482" throw="" context="_1" location="f12:336" file="f12" line="336" extern="1">
- <Argument name="__x" type="_482" location="f12:336" file="f12" line="336"/>
- <Argument name="__y" type="_482" location="f12:336" file="f12" line="336"/>
+ <Function id="_65" name="fdiml" returns="_483" throw="" context="_1" location="f12:336" file="f12" line="336" extern="1">
+ <Argument name="__x" type="_483" location="f12:336" file="f12" line="336"/>
+ <Argument name="__y" type="_483" location="f12:336" file="f12" line="336"/>
</Function>
- <Function id="_65" name="__llroundl" returns="_1249" throw="" context="_1" location="f12:332" file="f12" line="332" extern="1">
- <Argument name="__x" type="_482" location="f12:332" file="f12" line="332"/>
+ <Function id="_66" name="__llroundl" returns="_1290" throw="" context="_1" location="f12:332" file="f12" line="332" extern="1">
+ <Argument name="__x" type="_483" location="f12:332" file="f12" line="332"/>
</Function>
- <Function id="_66" name="llroundl" returns="_1249" throw="" context="_1" location="f12:332" file="f12" line="332" extern="1">
- <Argument name="__x" type="_482" location="f12:332" file="f12" line="332"/>
+ <Function id="_67" name="llroundl" returns="_1290" throw="" context="_1" location="f12:332" file="f12" line="332" extern="1">
+ <Argument name="__x" type="_483" location="f12:332" file="f12" line="332"/>
</Function>
- <Function id="_67" name="__lroundl" returns="_1512" throw="" context="_1" location="f12:331" file="f12" line="331" extern="1">
- <Argument name="__x" type="_482" location="f12:331" file="f12" line="331"/>
+ <Function id="_68" name="__lroundl" returns="_1553" throw="" context="_1" location="f12:331" file="f12" line="331" extern="1">
+ <Argument name="__x" type="_483" location="f12:331" file="f12" line="331"/>
</Function>
- <Function id="_68" name="lroundl" returns="_1512" throw="" context="_1" location="f12:331" file="f12" line="331" extern="1">
- <Argument name="__x" type="_482" location="f12:331" file="f12" line="331"/>
+ <Function id="_69" name="lroundl" returns="_1553" throw="" context="_1" location="f12:331" file="f12" line="331" extern="1">
+ <Argument name="__x" type="_483" location="f12:331" file="f12" line="331"/>
</Function>
- <Function id="_69" name="__llrintl" returns="_1249" throw="" context="_1" location="f12:327" file="f12" line="327" extern="1">
- <Argument name="__x" type="_482" location="f12:327" file="f12" line="327"/>
+ <Function id="_70" name="__llrintl" returns="_1290" throw="" context="_1" location="f12:327" file="f12" line="327" extern="1">
+ <Argument name="__x" type="_483" location="f12:327" file="f12" line="327"/>
</Function>
- <Function id="_70" name="llrintl" returns="_1249" throw="" context="_1" location="f12:327" file="f12" line="327" extern="1">
- <Argument name="__x" type="_482" location="f12:327" file="f12" line="327"/>
+ <Function id="_71" name="llrintl" returns="_1290" throw="" context="_1" location="f12:327" file="f12" line="327" extern="1">
+ <Argument name="__x" type="_483" location="f12:327" file="f12" line="327"/>
</Function>
- <Function id="_71" name="__lrintl" returns="_1512" throw="" context="_1" location="f12:326" file="f12" line="326" extern="1">
- <Argument name="__x" type="_482" location="f12:326" file="f12" line="326"/>
+ <Function id="_72" name="__lrintl" returns="_1553" throw="" context="_1" location="f12:326" file="f12" line="326" extern="1">
+ <Argument name="__x" type="_483" location="f12:326" file="f12" line="326"/>
</Function>
- <Function id="_72" name="lrintl" returns="_1512" throw="" context="_1" location="f12:326" file="f12" line="326" extern="1">
- <Argument name="__x" type="_482" location="f12:326" file="f12" line="326"/>
+ <Function id="_73" name="lrintl" returns="_1553" throw="" context="_1" location="f12:326" file="f12" line="326" extern="1">
+ <Argument name="__x" type="_483" location="f12:326" file="f12" line="326"/>
</Function>
- <Function id="_73" name="__remquol" returns="_482" throw="" context="_1" location="f12:319" file="f12" line="319" extern="1">
- <Argument name="__x" type="_482" location="f12:319" file="f12" line="319"/>
- <Argument name="__y" type="_482" location="f12:319" file="f12" line="319"/>
- <Argument name="__quo" type="_2686" location="f12:319" file="f12" line="319"/>
+ <Function id="_74" name="__remquol" returns="_483" throw="" context="_1" location="f12:319" file="f12" line="319" extern="1">
+ <Argument name="__x" type="_483" location="f12:319" file="f12" line="319"/>
+ <Argument name="__y" type="_483" location="f12:319" file="f12" line="319"/>
+ <Argument name="__quo" type="_2748" location="f12:319" file="f12" line="319"/>
</Function>
- <Function id="_74" name="remquol" returns="_482" throw="" context="_1" location="f12:319" file="f12" line="319" extern="1">
- <Argument name="__x" type="_482" location="f12:319" file="f12" line="319"/>
- <Argument name="__y" type="_482" location="f12:319" file="f12" line="319"/>
- <Argument name="__quo" type="_2686" location="f12:319" file="f12" line="319"/>
+ <Function id="_75" name="remquol" returns="_483" throw="" context="_1" location="f12:319" file="f12" line="319" extern="1">
+ <Argument name="__x" type="_483" location="f12:319" file="f12" line="319"/>
+ <Argument name="__y" type="_483" location="f12:319" file="f12" line="319"/>
+ <Argument name="__quo" type="_2748" location="f12:319" file="f12" line="319"/>
</Function>
- <Function id="_75" name="__truncl" returns="_482" throw="" context="_1" location="f12:314" file="f12" line="314" extern="1" attributes="const">
- <Argument name="__x" type="_482" location="f12:314" file="f12" line="314"/>
+ <Function id="_76" name="__truncl" returns="_483" throw="" context="_1" location="f12:314" file="f12" line="314" extern="1" attributes="const">
+ <Argument name="__x" type="_483" location="f12:314" file="f12" line="314"/>
</Function>
- <Function id="_76" name="truncl" returns="_482" throw="" context="_1" location="f12:314" file="f12" line="314" extern="1" attributes="const">
- <Argument name="__x" type="_482" location="f12:314" file="f12" line="314"/>
+ <Function id="_77" name="truncl" returns="_483" throw="" context="_1" location="f12:314" file="f12" line="314" extern="1" attributes="const">
+ <Argument name="__x" type="_483" location="f12:314" file="f12" line="314"/>
</Function>
- <Function id="_77" name="__roundl" returns="_482" throw="" context="_1" location="f12:310" file="f12" line="310" extern="1" attributes="const">
- <Argument name="__x" type="_482" location="f12:310" file="f12" line="310"/>
+ <Function id="_78" name="__roundl" returns="_483" throw="" context="_1" location="f12:310" file="f12" line="310" extern="1" attributes="const">
+ <Argument name="__x" type="_483" location="f12:310" file="f12" line="310"/>
</Function>
- <Function id="_78" name="roundl" returns="_482" throw="" context="_1" location="f12:310" file="f12" line="310" extern="1" attributes="const">
- <Argument name="__x" type="_482" location="f12:310" file="f12" line="310"/>
+ <Function id="_79" name="roundl" returns="_483" throw="" context="_1" location="f12:310" file="f12" line="310" extern="1" attributes="const">
+ <Argument name="__x" type="_483" location="f12:310" file="f12" line="310"/>
</Function>
- <Function id="_79" name="__nearbyintl" returns="_482" throw="" context="_1" location="f12:306" file="f12" line="306" extern="1">
- <Argument name="__x" type="_482" location="f12:306" file="f12" line="306"/>
+ <Function id="_80" name="__nearbyintl" returns="_483" throw="" context="_1" location="f12:306" file="f12" line="306" extern="1">
+ <Argument name="__x" type="_483" location="f12:306" file="f12" line="306"/>
</Function>
- <Function id="_80" name="nearbyintl" returns="_482" throw="" context="_1" location="f12:306" file="f12" line="306" extern="1">
- <Argument name="__x" type="_482" location="f12:306" file="f12" line="306"/>
+ <Function id="_81" name="nearbyintl" returns="_483" throw="" context="_1" location="f12:306" file="f12" line="306" extern="1">
+ <Argument name="__x" type="_483" location="f12:306" file="f12" line="306"/>
</Function>
- <Function id="_81" name="__scalblnl" returns="_482" throw="" context="_1" location="f12:302" file="f12" line="302" extern="1">
- <Argument name="__x" type="_482" location="f12:302" file="f12" line="302"/>
- <Argument name="__n" type="_1512" location="f12:302" file="f12" line="302"/>
+ <Function id="_82" name="__scalblnl" returns="_483" throw="" context="_1" location="f12:302" file="f12" line="302" extern="1">
+ <Argument name="__x" type="_483" location="f12:302" file="f12" line="302"/>
+ <Argument name="__n" type="_1553" location="f12:302" file="f12" line="302"/>
</Function>
- <Function id="_82" name="scalblnl" returns="_482" throw="" context="_1" location="f12:302" file="f12" line="302" extern="1">
- <Argument name="__x" type="_482" location="f12:302" file="f12" line="302"/>
- <Argument name="__n" type="_1512" location="f12:302" file="f12" line="302"/>
+ <Function id="_83" name="scalblnl" returns="_483" throw="" context="_1" location="f12:302" file="f12" line="302" extern="1">
+ <Argument name="__x" type="_483" location="f12:302" file="f12" line="302"/>
+ <Argument name="__n" type="_1553" location="f12:302" file="f12" line="302"/>
</Function>
- <Function id="_83" name="__ilogbl" returns="_501" throw="" context="_1" location="f12:297" file="f12" line="297" extern="1">
- <Argument name="__x" type="_482" location="f12:297" file="f12" line="297"/>
+ <Function id="_84" name="__ilogbl" returns="_503" throw="" context="_1" location="f12:297" file="f12" line="297" extern="1">
+ <Argument name="__x" type="_483" location="f12:297" file="f12" line="297"/>
</Function>
- <Function id="_84" name="ilogbl" returns="_501" throw="" context="_1" location="f12:297" file="f12" line="297" extern="1">
- <Argument name="__x" type="_482" location="f12:297" file="f12" line="297"/>
+ <Function id="_85" name="ilogbl" returns="_503" throw="" context="_1" location="f12:297" file="f12" line="297" extern="1">
+ <Argument name="__x" type="_483" location="f12:297" file="f12" line="297"/>
</Function>
- <Function id="_85" name="__scalbnl" returns="_482" throw="" context="_1" location="f12:293" file="f12" line="293" extern="1">
- <Argument name="__x" type="_482" location="f12:293" file="f12" line="293"/>
- <Argument name="__n" type="_501" location="f12:293" file="f12" line="293"/>
+ <Function id="_86" name="__scalbnl" returns="_483" throw="" context="_1" location="f12:293" file="f12" line="293" extern="1">
+ <Argument name="__x" type="_483" location="f12:293" file="f12" line="293"/>
+ <Argument name="__n" type="_503" location="f12:293" file="f12" line="293"/>
</F...
[truncated message content] |
|
From: <rom...@us...> - 2007-03-31 17:14:00
|
Revision: 964
http://svn.sourceforge.net/pygccxml/?rev=964&view=rev
Author: roman_yakovenko
Date: 2007-03-31 10:13:57 -0700 (Sat, 31 Mar 2007)
Log Message:
-----------
adding redirection tester
Modified Paths:
--------------
pyplusplus_dev/docs/troubleshooting_guide/exceptions/test.py
Modified: pyplusplus_dev/docs/troubleshooting_guide/exceptions/test.py
===================================================================
--- pyplusplus_dev/docs/troubleshooting_guide/exceptions/test.py 2007-03-30 20:43:14 UTC (rev 963)
+++ pyplusplus_dev/docs/troubleshooting_guide/exceptions/test.py 2007-03-31 17:13:57 UTC (rev 964)
@@ -5,7 +5,7 @@
def __init__( self, app_error ):
Exception.__init__( self )
self._pimpl = app_error
-
+
def __str__( self ):
return self._pimpl.message()
@@ -30,6 +30,12 @@
except Exception, err:
self.failUnless( str( err ) == "xyz" )
+ def test_redirection( self ):
+ try:
+ my_exceptions.check_preconditions( True )
+ except Exception, err:
+ self.failUnless( err.application_name() == "xyz" )
+
def test_converter( self ):
try:
my_exceptions.check_preconditions( True )
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rom...@us...> - 2007-03-30 20:43:13
|
Revision: 963
http://svn.sourceforge.net/pygccxml/?rev=963&view=rev
Author: roman_yakovenko
Date: 2007-03-30 13:43:14 -0700 (Fri, 30 Mar 2007)
Log Message:
-----------
implementing better exception handling
Modified Paths:
--------------
pyplusplus_dev/docs/troubleshooting_guide/exceptions/exceptions.cpp
pyplusplus_dev/docs/troubleshooting_guide/exceptions/test.py
Modified: pyplusplus_dev/docs/troubleshooting_guide/exceptions/exceptions.cpp
===================================================================
--- pyplusplus_dev/docs/troubleshooting_guide/exceptions/exceptions.cpp 2007-03-30 16:59:57 UTC (rev 962)
+++ pyplusplus_dev/docs/troubleshooting_guide/exceptions/exceptions.cpp 2007-03-30 20:43:14 UTC (rev 963)
@@ -7,59 +7,113 @@
* from Python built-in exceptions
*
**/
-
-class zero_division_error : public std::exception{
+class application_error : public std::exception{
public:
- zero_division_error()
+ application_error()
: std::exception(), m_msg()
{}
- zero_division_error( const std::string& msg )
+ application_error( const std::string& msg )
: std::exception(), m_msg( msg )
{}
- zero_division_error( const zero_division_error& other )
+ application_error( const application_error& other )
: std::exception(other), m_msg( other.m_msg )
{}
const std::string& message() const
{ return m_msg; }
- virtual ~zero_division_error() throw(){}
+ virtual ~application_error() throw(){}
+
+ std::string application_name() const
+ { return "my_exceptions module"; }
private:
const std::string m_msg;
};
-double devide( double x, int y ){
- if( !y ){
- throw zero_division_error( "unable to devide by 0( zero )" );
+void check_preconditions( bool raise_error ){
+ if( raise_error ){
+ throw application_error( "xyz" );
}
- return x/y;
}
+std::string get_application_name( const application_error& err ){
+ return err.application_name();
+}
+
namespace bpl = boost::python;
-void translate( const zero_division_error& err ){
- bpl::object this_module( bpl::handle<>( bpl::borrowed(PyImport_AddModule("my_exceptions"))));
- bpl::object zde_class = this_module.attr("zero_division_error");
- bpl::object pyerr = zde_class( err );
- PyErr_SetObject( zde_class.ptr(), bpl::incref( pyerr.ptr() ) );
-}
+struct exception_translator{
+
+ exception_translator(){
+ bpl::converter::registry::push_back( &exception_translator::convertible
+ , &exception_translator::construct
+ , bpl::type_id<application_error>() );
+
+ bpl::register_exception_translator<application_error>(&exception_translator::translate);
+ }
+
+ static void
+ translate( const application_error& err ){
+ bpl::object this_module( bpl::handle<>( bpl::borrowed(PyImport_AddModule("my_exceptions"))));
+ bpl::object app_exc_class = this_module.attr("application_error");
+ bpl::object pyerr = app_exc_class( err );
+ PyErr_SetObject( app_exc_class.ptr(), bpl::incref( pyerr.ptr() ) );
+ }
+ //Sometimes, exceptions should be passed back to the library.
+ static void*
+ convertible(PyObject* py_obj){
+ if( 1 != PyObject_IsInstance( py_obj, PyExc_Exception ) ){
+ return 0;
+ }
+
+ if( !PyObject_HasAttrString( py_obj, "_pimpl" ) ){
+ return 0;
+ }
+
+ bpl::object pyerr( bpl::handle<>( bpl::borrowed( py_obj ) ) );
+ bpl::object pimpl = bpl::getattr( pyerr, "_pimpl" );
+ bpl::extract<application_error> type_checker( pimpl );
+ if( !type_checker.check() ){
+ return 0;
+ }
+ return py_obj;
+ }
+
+ static void
+ construct( PyObject* py_obj, bpl::converter::rvalue_from_python_stage1_data* data){
+ typedef bpl::converter::rvalue_from_python_storage<application_error> storage_t;
+
+ bpl::object pyerr( bpl::handle<>( bpl::borrowed( py_obj ) ) );
+ bpl::object pimpl = bpl::getattr( pyerr, "_pimpl" );
+
+ storage_t* the_storage = reinterpret_cast<storage_t*>( data );
+ void* memory_chunk = the_storage->storage.bytes;
+ application_error* cpp_err
+ = new (memory_chunk) application_error( bpl::extract<application_error>(pimpl) );
+
+ data->convertible = memory_chunk;
+ }
+
+};
+
BOOST_PYTHON_MODULE( my_exceptions ){
typedef bpl::return_value_policy< bpl::copy_const_reference > return_copy_const_ref;
- bpl::class_< zero_division_error >( "_zero_division_error_" )
+ bpl::class_< application_error >( "_application_error_" )
.def( bpl::init<const std::string&>() )
- .def( bpl::init<const zero_division_error&>() )
- .def( "message", &zero_division_error::message, return_copy_const_ref() )
- .def( "__str__", &zero_division_error::message, return_copy_const_ref() );
+ .def( bpl::init<const application_error&>() )
+ .def( "message", &application_error::message, return_copy_const_ref() )
+ .def( "__str__", &application_error::message, return_copy_const_ref() );
- bpl::register_exception_translator<zero_division_error>(&translate);
+ exception_translator();
- bpl::def( "devide", &::devide );
+ bpl::def( "check_preconditions", &::check_preconditions );
+ bpl::def( "get_application_name", &::get_application_name );
}
Modified: pyplusplus_dev/docs/troubleshooting_guide/exceptions/test.py
===================================================================
--- pyplusplus_dev/docs/troubleshooting_guide/exceptions/test.py 2007-03-30 16:59:57 UTC (rev 962)
+++ pyplusplus_dev/docs/troubleshooting_guide/exceptions/test.py 2007-03-30 20:43:14 UTC (rev 963)
@@ -1,27 +1,43 @@
import unittest
import my_exceptions
-print dir( my_exceptions._zero_division_error_.__class__ )
-
-class zero_division_error(my_exceptions._zero_division_error_, ZeroDivisionError ):
+class application_error(Exception):
+ def __init__( self, app_error ):
+ Exception.__init__( self )
+ self._pimpl = app_error
+
+ def __str__( self ):
+ return self._pimpl.message()
- def __init__( self, msg ):
- my_exceptions._zero_division_error_.__init__( self, msg )
-
-my_exceptions.zero_division_error = zero_division_error
+my_exceptions.application_error = application_error
class tester_t( unittest.TestCase ):
def __init__( self, *args ):
unittest.TestCase.__init__( self, *args )
- def test( self ):
- print my_exceptions.devide( 1, 1 )
- self.failUnless( 1 == my_exceptions.devide( 1, 1 ) )
+ def test_function_call( self ):
+ my_exceptions.check_preconditions( False )
+
+ def test_concrete_error( self ):
try:
- my_exceptions.devide( 1, 0 )
- except zero_division_error, err:
- print err.__class__.__name__, str(err)
-
+ my_exceptions.check_preconditions( True )
+ except my_exceptions.application_error, err:
+ self.failUnless( str( err ) == "xyz" )
+
+ def test_base_error( self ):
+ try:
+ my_exceptions.check_preconditions( True )
+ except Exception, err:
+ self.failUnless( str( err ) == "xyz" )
+
+ def test_converter( self ):
+ try:
+ my_exceptions.check_preconditions( True )
+ except my_exceptions.application_error, err:
+ app_name = my_exceptions.get_application_name( err )
+ self.failUnless( "my_exceptions module" == app_name )
+
+
def create_suite():
suite = unittest.TestSuite()
suite.addTest( unittest.makeSuite(tester_t))
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ale...@us...> - 2007-03-30 16:59:57
|
Revision: 962
http://svn.sourceforge.net/pygccxml/?rev=962&view=rev
Author: alex_eisen
Date: 2007-03-30 09:59:57 -0700 (Fri, 30 Mar 2007)
Log Message:
-----------
Added file dialogs
Modified Paths:
--------------
pyplusplus_dev/ide/controllers/main.py
pyplusplus_dev/ide/views/main_frame.py
Modified: pyplusplus_dev/ide/controllers/main.py
===================================================================
--- pyplusplus_dev/ide/controllers/main.py 2007-03-30 15:24:52 UTC (rev 961)
+++ pyplusplus_dev/ide/controllers/main.py 2007-03-30 16:59:57 UTC (rev 962)
@@ -5,6 +5,8 @@
# accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
+import wx
+
""" Contoller class. Part of MVC
Responsibility: Glue view and model code:
- Handle all events from view (p.e. button) """
@@ -25,8 +27,30 @@
def GenPyPPCode(self):
""" Generate Py++ code"""
- self._appendOutText("Generation of Py++ code started")
+ self._appendOutText("Generation of Py++ code started")
+ def OpenHeaderDlg(self):
+ """ """
+ dialog = wx.FileDialog(self._view, "Choose a Header file", ".", "",
+ "Header (*.h)|*.h|All Files(*)|*", wx.OPEN)
+ try:
+ if dialog.ShowModal() == wx.ID_OK:
+ self._view.textHeader.Clear()
+ self._view.textHeader.AppendText(dialog.GetPath())
+ finally:
+ dialog.Destroy()
+
+ def OpenGccXmlDlg(self):
+ """ """
+ dialog = wx.FileDialog(self._view, "Choose GccXml executable",
+ ".", "", "All Files(*)|*", wx.OPEN)
+ try:
+ if dialog.ShowModal() == wx.ID_OK:
+ self._view.textGccXml.Clear()
+ self._view.textGccXml.AppendText(dialog.GetPath())
+ finally:
+ dialog.Destroy()
+
def _appendOutText(self, text):
self._view.textOutput.AppendText(text + "\n")
Modified: pyplusplus_dev/ide/views/main_frame.py
===================================================================
--- pyplusplus_dev/ide/views/main_frame.py 2007-03-30 15:24:52 UTC (rev 961)
+++ pyplusplus_dev/ide/views/main_frame.py 2007-03-30 16:59:57 UTC (rev 962)
@@ -1,4 +1,5 @@
#Boa:Frame:MainFrame
+from Dialog import Dialog
# Copyright 2004 Roman Yakovenko.
# 2007 Alexander Eisenhuth
@@ -50,7 +51,7 @@
flag=wx.ALIGN_CENTER_VERTICAL | wx.LEFT)
parent.AddWindow(self.textGccXml, 1, border=10,
flag=wx.ALIGN_CENTER_VERTICAL | wx.TOP | wx.BOTTOM)
- parent.AddWindow(self.butGccXml, 0, border=5,
+ parent.AddWindow(self.butGccXml, 0, border=10,
flag=wx.LEFT | wx.RIGHT | wx.ALIGN_CENTER_VERTICAL)
def _init_coll_bsMURCompile_Items(self, parent):
@@ -70,7 +71,7 @@
parent.AddWindow(self.staticText3, 0, border=5,
flag=wx.ALIGN_CENTER_VERTICAL | wx.LEFT)
parent.AddWindow(self.listIncludes, 1, border=10,
- flag=wx.BOTTOM | wx.TOP | wx.EXPAND | wx.ALIGN_CENTER_VERTICAL)
+ flag=wx.RIGHT | wx.BOTTOM | wx.TOP | wx.EXPAND | wx.ALIGN_CENTER_VERTICAL)
def _init_coll_bsHeader_Items(self, parent):
# generated method, don't edit
@@ -79,7 +80,7 @@
flag=wx.LEFT | wx.ALIGN_CENTER_VERTICAL)
parent.AddWindow(self.textHeader, 1, border=10,
flag=wx.ALIGN_CENTER_VERTICAL | wx.BOTTOM | wx.TOP)
- parent.AddWindow(self.butHeaders, 0, border=5,
+ parent.AddWindow(self.butHeaders, 0, border=10,
flag=wx.LEFT | wx.RIGHT | wx.ALIGN_CENTER_VERTICAL)
def _init_coll_bsUpLeft_Items(self, parent):
@@ -131,7 +132,7 @@
parent.AddWindow(self.staticText4, 0, border=5,
flag=wx.ALIGN_CENTER_VERTICAL | wx.LEFT)
parent.AddWindow(self.listDefines, 1, border=10,
- flag=wx.BOTTOM | wx.TOP | wx.ALIGN_CENTER_VERTICAL | wx.EXPAND)
+ flag=wx.RIGHT | wx.BOTTOM | wx.TOP | wx.ALIGN_CENTER_VERTICAL | wx.EXPAND)
def _init_coll_menuBar1_Menus(self, parent):
# generated method, don't edit
@@ -291,61 +292,60 @@
self.panelSHUp = wx.Panel(id=wxID_MAINFRAMEPANELSHUP, name=u'panelSHUp',
parent=self.splitterHorizontal, pos=wx.Point(0, 0),
- size=wx.Size(833, 372), style=wx.TAB_TRAVERSAL)
+ size=wx.Size(833, 10), style=wx.TAB_TRAVERSAL)
self.panelSHLow = wx.Panel(id=wxID_MAINFRAMEPANELSHLOW,
name=u'panelSHLow', parent=self.splitterHorizontal,
- pos=wx.Point(0, 376), size=wx.Size(833, 157),
+ pos=wx.Point(0, 14), size=wx.Size(833, 519),
style=wx.TAB_TRAVERSAL)
self.splitterHorizontal.SplitHorizontally(self.panelSHUp,
self.panelSHLow, 300)
self.notebook1 = wx.Notebook(id=wxID_MAINFRAMENOTEBOOK1,
name='notebook1', parent=self.panelSHLow, pos=wx.Point(0, 0),
- size=wx.Size(833, 157), style=0)
+ size=wx.Size(833, 519), style=0)
self.notebook1.SetLabel(u'Label')
self.textOutput = wx.TextCtrl(id=wxID_MAINFRAMETEXTOUTPUT,
name=u'textOutput', parent=self.notebook1, pos=wx.Point(0, 0),
- size=wx.Size(825, 131), style=wx.TE_READONLY | wx.TE_MULTILINE,
+ size=wx.Size(825, 493), style=wx.TE_READONLY | wx.TE_MULTILINE,
value=u'')
self.splitterVertical = wx.SplitterWindow(id=wxID_MAINFRAMESPLITTERVERTICAL,
name=u'splitterVertical', parent=self.panelSHUp, pos=wx.Point(0,
- 0), size=wx.Size(833, 367), style=wx.SP_3D)
+ 0), size=wx.Size(833, 5), style=wx.SP_3D)
self.splitterVertical.SetNeedUpdating(True)
self.splitterVertical.SetMinimumPaneSize(0)
self.panelSettings = wx.Panel(id=wxID_MAINFRAMEPANELSETTINGS,
name=u'panelSettings', parent=self.splitterVertical,
- pos=wx.Point(0, 0), size=wx.Size(235, 367),
- style=wx.TAB_TRAVERSAL)
+ pos=wx.Point(0, 0), size=wx.Size(10, 5), style=wx.TAB_TRAVERSAL)
self.panelCode = wx.Panel(id=wxID_MAINFRAMEPANELCODE, name=u'panelCode',
- parent=self.splitterVertical, pos=wx.Point(239, 0),
- size=wx.Size(594, 367), style=wx.TAB_TRAVERSAL)
+ parent=self.splitterVertical, pos=wx.Point(14, 0),
+ size=wx.Size(819, 5), style=wx.TAB_TRAVERSAL)
self.splitterVertical.SplitVertically(self.panelSettings,
self.panelCode, 300)
self.nbSettings = wx.Notebook(id=wxID_MAINFRAMENBSETTINGS,
name=u'nbSettings', parent=self.panelSettings, pos=wx.Point(0, 0),
- size=wx.Size(235, 367), style=0)
+ size=wx.Size(10, 5), style=0)
self.nbSettings.SetLabel(u'Label')
self.nbSettings.SetHelpText(u'')
self.panelNbSettings = wx.Panel(id=wxID_MAINFRAMEPANELNBSETTINGS,
name=u'panelNbSettings', parent=self.nbSettings, pos=wx.Point(0,
- 0), size=wx.Size(227, 341), style=wx.TAB_TRAVERSAL)
+ 0), size=wx.Size(2, 0), style=wx.TAB_TRAVERSAL)
self.panelNbSettings.Show(True)
self.panelNbSettings.SetMinSize(wx.Size(100, 100))
self.textCtrl2 = wx.TextCtrl(id=wxID_MAINFRAMETEXTCTRL2,
name='textCtrl2', parent=self.panelCode, pos=wx.Point(0, 17),
- size=wx.Size(594, 317), style=wx.TE_MULTILINE, value=u'')
+ size=wx.Size(819, 0), style=wx.TE_MULTILINE, value=u'')
self.panelButtons = wx.Panel(id=wxID_MAINFRAMEPANELBUTTONS,
- name=u'panelButtons', parent=self.panelCode, pos=wx.Point(54,
- 344), size=wx.Size(486, 23), style=wx.TAB_TRAVERSAL)
+ name=u'panelButtons', parent=self.panelCode, pos=wx.Point(166,
+ -18), size=wx.Size(486, 23), style=wx.TAB_TRAVERSAL)
self.butGenXml = wx.Button(id=wxID_MAINFRAMEBUTGENXML,
label=u'Generate XML code', name=u'butGenXml',
@@ -370,10 +370,10 @@
self.textHeader = wx.TextCtrl(id=wxID_MAINFRAMETEXTHEADER,
name=u'textHeader', parent=self.panelNbSettings, pos=wx.Point(56,
- 20), size=wx.Size(128, 21), style=0, value=u'')
+ 20), size=wx.Size(0, 21), style=0, value=u'')
self.butHeaders = wx.Button(id=wxID_MAINFRAMEBUTHEADERS, label=u'...',
- name=u'butHeaders', parent=self.panelNbSettings, pos=wx.Point(189,
+ name=u'butHeaders', parent=self.panelNbSettings, pos=wx.Point(-38,
19), size=wx.Size(28, 23), style=0)
self.butHeaders.Bind(wx.EVT_BUTTON, self.OnButHeadersButton,
id=wxID_MAINFRAMEBUTHEADERS)
@@ -389,10 +389,10 @@
self.textGccXml = wx.TextCtrl(id=wxID_MAINFRAMETEXTGCCXML,
name=u'textGccXml', parent=self.panelNbSettings, pos=wx.Point(56,
- 61), size=wx.Size(128, 21), style=0, value=u'')
+ 61), size=wx.Size(0, 21), style=0, value=u'')
self.butGccXml = wx.Button(id=wxID_MAINFRAMEBUTGCCXML, label=u'...',
- name=u'butGccXml', parent=self.panelNbSettings, pos=wx.Point(189,
+ name=u'butGccXml', parent=self.panelNbSettings, pos=wx.Point(-38,
60), size=wx.Size(28, 23), style=0)
self.butGccXml.Bind(wx.EVT_BUTTON, self.OnButGccXmlButton,
id=wxID_MAINFRAMEBUTGCCXML)
@@ -404,7 +404,7 @@
self.listIncludes = wx.ListCtrl(id=wxID_MAINFRAMELISTINCLUDES,
name=u'listIncludes', parent=self.panelNbSettings,
- pos=wx.Point(56, 102), size=wx.Size(166, 66), style=wx.LC_ICON)
+ pos=wx.Point(56, 102), size=wx.Size(0, 66), style=wx.LC_ICON)
self.listIncludes.Bind(wx.EVT_RIGHT_DOWN, self.OnListIncludesRightDown)
self.staticText4 = wx.StaticText(id=wxID_MAINFRAMESTATICTEXT4,
@@ -414,7 +414,7 @@
self.listDefines = wx.ListCtrl(id=wxID_MAINFRAMELISTDEFINES,
name=u'listDefines', parent=self.panelNbSettings, pos=wx.Point(56,
- 188), size=wx.Size(166, 68), style=wx.LC_ICON)
+ 188), size=wx.Size(0, 68), style=wx.LC_ICON)
self.listDefines.Bind(wx.EVT_RIGHT_DOWN, self.OnListDefinesRightDown)
self.staticText5 = wx.StaticText(id=wxID_MAINFRAMESTATICTEXT5,
@@ -451,9 +451,6 @@
def OnListIncludesRightDown(self, event):
self.PopupMenu(self.menuIncludes)
- def OnButHeaderButton(self, event):
- event.Skip()
-
def OnListDefinesRightDown(self, event):
self.PopupMenu(self.menuDefines)
@@ -467,9 +464,13 @@
self._controller.GenPyPPCode()
def OnButHeadersButton(self, event):
+ """Callback for button event"""
+ self._controller.OpenHeaderDlg()
event.Skip()
def OnButGccXmlButton(self, event):
+ """Callback for button event"""
+ self._controller.OpenGccXmlDlg()
event.Skip()
def set_controller(self, controller):
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ale...@us...> - 2007-03-30 15:24:53
|
Revision: 961
http://svn.sourceforge.net/pygccxml/?rev=961&view=rev
Author: alex_eisen
Date: 2007-03-30 08:24:52 -0700 (Fri, 30 Mar 2007)
Log Message:
-----------
First commit of ide
Added Paths:
-----------
pyplusplus_dev/ide/__init__.py
pyplusplus_dev/ide/controllers/
pyplusplus_dev/ide/controllers/__init__.py
pyplusplus_dev/ide/controllers/main.py
pyplusplus_dev/ide/ide.py
pyplusplus_dev/ide/model/
pyplusplus_dev/ide/model/__init__.py
pyplusplus_dev/ide/views/
pyplusplus_dev/ide/views/__init__.py
pyplusplus_dev/ide/views/main_frame.py
Property Changed:
----------------
pyplusplus_dev/ide/
Property changes on: pyplusplus_dev/ide
___________________________________________________________________
Name: svn:ignore
+ .settings
.project
.pydevproject
Added: pyplusplus_dev/ide/__init__.py
===================================================================
--- pyplusplus_dev/ide/__init__.py (rev 0)
+++ pyplusplus_dev/ide/__init__.py 2007-03-30 15:24:52 UTC (rev 961)
@@ -0,0 +1,7 @@
+# -*- coding: utf-8 -*-
+# Copyright 2007 Alexander Eisenhuth
+# 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)
+
+""" This package provide access to the py++ ide """
Added: pyplusplus_dev/ide/controllers/__init__.py
===================================================================
Added: pyplusplus_dev/ide/controllers/main.py
===================================================================
--- pyplusplus_dev/ide/controllers/main.py (rev 0)
+++ pyplusplus_dev/ide/controllers/main.py 2007-03-30 15:24:52 UTC (rev 961)
@@ -0,0 +1,33 @@
+# -*- coding: utf-8 -*-
+# Copyright 2004 Roman Yakovenko.
+# 2007 Alexander Eisenhuth
+# 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)
+
+""" Contoller class. Part of MVC
+Responsibility: Glue view and model code:
+- Handle all events from view (p.e. button) """
+class MainController:
+ def __init__(self, view):
+ self._view = view
+
+ # Give controller object to the view
+ self._view.set_controller(self)
+
+ def GenXmlCode(self):
+ """ Generate XML code"""
+ self._appendOutText("Generation of XML code staretd")
+
+ def GenCppCode(self):
+ """ Generate Boost.Python code"""
+ self._appendOutText("Generation of C++ code for Boost.Python started")
+
+ def GenPyPPCode(self):
+ """ Generate Py++ code"""
+ self._appendOutText("Generation of Py++ code started")
+
+ def _appendOutText(self, text):
+ self._view.textOutput.AppendText(text + "\n")
+
+
\ No newline at end of file
Added: pyplusplus_dev/ide/ide.py
===================================================================
--- pyplusplus_dev/ide/ide.py (rev 0)
+++ pyplusplus_dev/ide/ide.py 2007-03-30 15:24:52 UTC (rev 961)
@@ -0,0 +1,37 @@
+#!/usr/bin/env python
+#Boa:App:BoaApp
+
+# Copyright 2007 Alexander Eisenhuth
+# 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 wx
+
+from views.main_frame import create as createMainFrame
+from controllers.main import MainController
+
+modules ={u'main controller': [0, '', u'controllers/main.py'],
+ u'main view': [1, 'Main frame of ide', u'views/main_frame.py']}
+
+class BoaApp(wx.App):
+ def OnInit(self):
+
+ self.main = createMainFrame(None)
+
+ # Instanciate main controller and give it to the main view
+ controller = MainController(self.main)
+ self.main.set_controller(controller)
+
+ self.main.Show()
+ self.SetTopWindow(self.main)
+ return True
+
+def main():
+ application = BoaApp(0)
+ application.MainLoop()
+
+if __name__ == '__main__':
+ main()
Added: pyplusplus_dev/ide/model/__init__.py
===================================================================
Added: pyplusplus_dev/ide/views/__init__.py
===================================================================
Added: pyplusplus_dev/ide/views/main_frame.py
===================================================================
--- pyplusplus_dev/ide/views/main_frame.py (rev 0)
+++ pyplusplus_dev/ide/views/main_frame.py 2007-03-30 15:24:52 UTC (rev 961)
@@ -0,0 +1,477 @@
+#Boa:Frame:MainFrame
+
+# Copyright 2004 Roman Yakovenko.
+# 2007 Alexander Eisenhuth
+# 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)
+
+
+""" Contains the iplementation of the main frame of the application.
+Most of the code was build with BOA"""
+
+import wx
+
+def create(parent):
+ return MainFrame(parent)
+
+[wxID_MAINFRAMEMENUEFILEEXIT, wxID_MAINFRAMEMENUEFILENEW,
+ wxID_MAINFRAMEMENUEFILEOPEN, wxID_MAINFRAMEMENUEFILERECENT,
+ wxID_MAINFRAMEMENUEFILESAVE,
+] = [wx.NewId() for _init_coll_menueFile_Items in range(5)]
+
+[wxID_MAINFRAMEMENUINCLUDESADDINC, wxID_MAINFRAMEMENUINCLUDESITEMS1,
+] = [wx.NewId() for _init_coll_menuIncludes_Items in range(2)]
+
+[wxID_MAINFRAMEMENUDEFINESADDDEF, wxID_MAINFRAMEMENUDEFINESREMOVEDEF,
+] = [wx.NewId() for _init_coll_menuDefines_Items in range(2)]
+
+[wxID_MAINFRAME, wxID_MAINFRAMEBUTGCCXML, wxID_MAINFRAMEBUTGENCPP,
+ wxID_MAINFRAMEBUTGENPYPP, wxID_MAINFRAMEBUTGENXML, wxID_MAINFRAMEBUTHEADERS,
+ wxID_MAINFRAMELISTDEFINES, wxID_MAINFRAMELISTINCLUDES,
+ wxID_MAINFRAMENBSETTINGS, wxID_MAINFRAMENOTEBOOK1,
+ wxID_MAINFRAMEPANELBUTTONS, wxID_MAINFRAMEPANELCODE, wxID_MAINFRAMEPANELMAIN,
+ wxID_MAINFRAMEPANELNBSETTINGS, wxID_MAINFRAMEPANELSETTINGS,
+ wxID_MAINFRAMEPANELSHLOW, wxID_MAINFRAMEPANELSHUP,
+ wxID_MAINFRAMESPLITTERHORIZONTAL, wxID_MAINFRAMESPLITTERVERTICAL,
+ wxID_MAINFRAMESTATICTEXT1, wxID_MAINFRAMESTATICTEXT2,
+ wxID_MAINFRAMESTATICTEXT3, wxID_MAINFRAMESTATICTEXT4,
+ wxID_MAINFRAMESTATICTEXT5, wxID_MAINFRAMESTATUSBAR, wxID_MAINFRAMETEXTCTRL2,
+ wxID_MAINFRAMETEXTGCCXML, wxID_MAINFRAMETEXTHEADER, wxID_MAINFRAMETEXTOUTPUT,
+] = [wx.NewId() for _init_ctrls in range(29)]
+
+class MainFrame(wx.Frame):
+ """ Main frame class. Part of MVC """
+
+ def _init_coll_bsGccXml_Items(self, parent):
+ # generated method, don't edit
+
+ parent.AddWindow(self.staticText2, 0, border=5,
+ flag=wx.ALIGN_CENTER_VERTICAL | wx.LEFT)
+ parent.AddWindow(self.textGccXml, 1, border=10,
+ flag=wx.ALIGN_CENTER_VERTICAL | wx.TOP | wx.BOTTOM)
+ parent.AddWindow(self.butGccXml, 0, border=5,
+ flag=wx.LEFT | wx.RIGHT | wx.ALIGN_CENTER_VERTICAL)
+
+ def _init_coll_bsMURCompile_Items(self, parent):
+ # generated method, don't edit
+
+ parent.AddWindow(self.textCtrl2, 1, border=0, flag=wx.EXPAND)
+
+ def _init_coll_bsMain_Items(self, parent):
+ # generated method, don't edit
+
+ parent.AddWindow(self.splitterHorizontal, 1, border=5,
+ flag=wx.ALL | wx.EXPAND)
+
+ def _init_coll_bsIncPath_Items(self, parent):
+ # generated method, don't edit
+
+ parent.AddWindow(self.staticText3, 0, border=5,
+ flag=wx.ALIGN_CENTER_VERTICAL | wx.LEFT)
+ parent.AddWindow(self.listIncludes, 1, border=10,
+ flag=wx.BOTTOM | wx.TOP | wx.EXPAND | wx.ALIGN_CENTER_VERTICAL)
+
+ def _init_coll_bsHeader_Items(self, parent):
+ # generated method, don't edit
+
+ parent.AddWindow(self.staticText1, 0, border=5,
+ flag=wx.LEFT | wx.ALIGN_CENTER_VERTICAL)
+ parent.AddWindow(self.textHeader, 1, border=10,
+ flag=wx.ALIGN_CENTER_VERTICAL | wx.BOTTOM | wx.TOP)
+ parent.AddWindow(self.butHeaders, 0, border=5,
+ flag=wx.LEFT | wx.RIGHT | wx.ALIGN_CENTER_VERTICAL)
+
+ def _init_coll_bsUpLeft_Items(self, parent):
+ # generated method, don't edit
+
+ parent.AddWindow(self.nbSettings, 1, border=0, flag=wx.ALL | wx.EXPAND)
+
+ def _init_coll_bsMURButtons_Items(self, parent):
+ # generated method, don't edit
+
+ parent.AddWindow(self.butGenXml, 0, border=10,
+ flag=wx.RIGHT | wx.LEFT | wx.ALIGN_CENTER_VERTICAL)
+ parent.AddWindow(self.butGenCpp, 0, border=10,
+ flag=wx.LEFT | wx.RIGHT | wx.ALIGN_CENTER | wx.ALIGN_CENTER_VERTICAL)
+ parent.AddWindow(self.butGenPyPP, 0, border=10,
+ flag=wx.RIGHT | wx.LEFT | wx.ALIGN_RIGHT | wx.ALIGN_CENTER_VERTICAL)
+
+ def _init_coll_bsMainUpper_Items(self, parent):
+ # generated method, don't edit
+
+ parent.AddWindow(self.splitterVertical, 1, border=5,
+ flag=wx.BOTTOM | wx.EXPAND)
+
+ def _init_coll_bsMainLow_Items(self, parent):
+ # generated method, don't edit
+
+ parent.AddWindow(self.notebook1, 1, border=0, flag=wx.EXPAND)
+
+ def _init_coll_bsUpRight_Items(self, parent):
+ # generated method, don't edit
+
+ parent.AddWindow(self.staticText5, 0, border=0, flag=0)
+ parent.AddSizer(self.bsMURCompile, 1, border=4, flag=wx.TOP | wx.EXPAND)
+ parent.AddWindow(self.panelButtons, 0, border=10,
+ flag=wx.ALIGN_CENTER_HORIZONTAL | wx.TOP)
+
+ def _init_coll_bsMULSettings_Items(self, parent):
+ # generated method, don't edit
+
+ parent.AddSpacer((10, 10), border=0, flag=0)
+ parent.AddSizer(self.bsHeader, 0, border=5, flag=wx.RIGHT | wx.EXPAND)
+ parent.AddSizer(self.bsGccXml, 0, border=5, flag=wx.RIGHT | wx.EXPAND)
+ parent.AddSizer(self.bsIncPath, 0, border=5, flag=wx.RIGHT | wx.EXPAND)
+ parent.AddSizer(self.bsDefines, 0, border=5, flag=wx.RIGHT | wx.EXPAND)
+
+ def _init_coll_bsDefines_Items(self, parent):
+ # generated method, don't edit
+
+ parent.AddWindow(self.staticText4, 0, border=5,
+ flag=wx.ALIGN_CENTER_VERTICAL | wx.LEFT)
+ parent.AddWindow(self.listDefines, 1, border=10,
+ flag=wx.BOTTOM | wx.TOP | wx.ALIGN_CENTER_VERTICAL | wx.EXPAND)
+
+ def _init_coll_menuBar1_Menus(self, parent):
+ # generated method, don't edit
+
+ parent.Append(menu=self.menueFile, title=u'&File')
+
+ def _init_coll_menuIncludes_Items(self, parent):
+ # generated method, don't edit
+
+ parent.Append(help='', id=wxID_MAINFRAMEMENUINCLUDESADDINC,
+ kind=wx.ITEM_NORMAL, text=u'Add ...')
+ parent.Append(help='', id=wxID_MAINFRAMEMENUINCLUDESITEMS1,
+ kind=wx.ITEM_NORMAL, text=u'Remove')
+
+ def _init_coll_menueFile_Items(self, parent):
+ # generated method, don't edit
+
+ parent.Append(help=u'Create new Project', id=wxID_MAINFRAMEMENUEFILENEW,
+ kind=wx.ITEM_NORMAL, text=u'&New Project')
+ parent.Append(help=u'Open existing Project',
+ id=wxID_MAINFRAMEMENUEFILEOPEN, kind=wx.ITEM_NORMAL,
+ text=u'&Open Project')
+ parent.Append(help=u'Save current Project',
+ id=wxID_MAINFRAMEMENUEFILESAVE, kind=wx.ITEM_NORMAL,
+ text=u'&Save Project')
+ parent.AppendSeparator()
+ parent.AppendMenu(help=u'Open recently used Project',
+ id=wxID_MAINFRAMEMENUEFILERECENT, submenu=wx.Menu(),
+ text=u'Recent Projects')
+ parent.AppendSeparator()
+ parent.Append(help='', id=wxID_MAINFRAMEMENUEFILEEXIT,
+ kind=wx.ITEM_NORMAL, text=u'&Exit')
+ self.Bind(wx.EVT_MENU, self.OnMenueFileNewMenu,
+ id=wxID_MAINFRAMEMENUEFILENEW)
+ self.Bind(wx.EVT_MENU, self.OnMenueFileOpenMenu,
+ id=wxID_MAINFRAMEMENUEFILEOPEN)
+ self.Bind(wx.EVT_MENU, self.OnMenueFileSaveMenu,
+ id=wxID_MAINFRAMEMENUEFILESAVE)
+ self.Bind(wx.EVT_MENU, self.OnMenueFileExitMenu,
+ id=wxID_MAINFRAMEMENUEFILEEXIT)
+
+ def _init_coll_menuDefines_Items(self, parent):
+ # generated method, don't edit
+
+ parent.Append(help='', id=wxID_MAINFRAMEMENUDEFINESADDDEF,
+ kind=wx.ITEM_NORMAL, text=u'Add ...')
+ parent.Append(help='', id=wxID_MAINFRAMEMENUDEFINESREMOVEDEF,
+ kind=wx.ITEM_NORMAL, text=u'Remove')
+
+ def _init_coll_nbSettings_Pages(self, parent):
+ # generated method, don't edit
+
+ parent.AddPage(imageId=-1, page=self.panelNbSettings, select=True,
+ text=u'Settings')
+
+ def _init_coll_notebook1_Pages(self, parent):
+ # generated method, don't edit
+
+ parent.AddPage(imageId=-1, page=self.textOutput, select=True,
+ text=u'Output')
+
+ def _init_coll_statusBar_Fields(self, parent):
+ # generated method, don't edit
+ parent.SetFieldsCount(3)
+
+ parent.SetStatusText(number=0, text=u'<helptextOrStatus>')
+ parent.SetStatusText(number=1, text=u'<parseTime>')
+ parent.SetStatusText(number=2, text=u'<compileTime>')
+
+ parent.SetStatusWidths([-1, -1, -1])
+
+ def _init_sizers(self):
+ # generated method, don't edit
+ self.bsMain = wx.BoxSizer(orient=wx.VERTICAL)
+
+ self.bsMainUpper = wx.BoxSizer(orient=wx.VERTICAL)
+
+ self.bsMainLow = wx.BoxSizer(orient=wx.VERTICAL)
+
+ self.bsUpLeft = wx.BoxSizer(orient=wx.VERTICAL)
+
+ self.bsUpRight = wx.BoxSizer(orient=wx.VERTICAL)
+
+ self.bsMULSettings = wx.BoxSizer(orient=wx.VERTICAL)
+
+ self.bsMURCompile = wx.BoxSizer(orient=wx.VERTICAL)
+
+ self.bsMURButtons = wx.BoxSizer(orient=wx.HORIZONTAL)
+
+ self.bsHeader = wx.BoxSizer(orient=wx.HORIZONTAL)
+
+ self.bsGccXml = wx.BoxSizer(orient=wx.HORIZONTAL)
+
+ self.bsIncPath = wx.BoxSizer(orient=wx.HORIZONTAL)
+
+ self.bsDefines = wx.BoxSizer(orient=wx.HORIZONTAL)
+
+ self._init_coll_bsMain_Items(self.bsMain)
+ self._init_coll_bsMainUpper_Items(self.bsMainUpper)
+ self._init_coll_bsMainLow_Items(self.bsMainLow)
+ self._init_coll_bsUpLeft_Items(self.bsUpLeft)
+ self._init_coll_bsUpRight_Items(self.bsUpRight)
+ self._init_coll_bsMULSettings_Items(self.bsMULSettings)
+ self._init_coll_bsMURCompile_Items(self.bsMURCompile)
+ self._init_coll_bsMURButtons_Items(self.bsMURButtons)
+ self._init_coll_bsHeader_Items(self.bsHeader)
+ self._init_coll_bsGccXml_Items(self.bsGccXml)
+ self._init_coll_bsIncPath_Items(self.bsIncPath)
+ self._init_coll_bsDefines_Items(self.bsDefines)
+
+ self.panelSHUp.SetSizer(self.bsMainUpper)
+ self.panelSettings.SetSizer(self.bsUpLeft)
+ self.panelButtons.SetSizer(self.bsMURButtons)
+ self.panelSHLow.SetSizer(self.bsMainLow)
+ self.panelMain.SetSizer(self.bsMain)
+ self.panelCode.SetSizer(self.bsUpRight)
+ self.panelNbSettings.SetSizer(self.bsMULSettings)
+
+ def _init_utils(self):
+ # generated method, don't edit
+ self.menueFile = wx.Menu(title='')
+
+ self.menuBar1 = wx.MenuBar()
+
+ self.menuIncludes = wx.Menu(title='')
+
+ self.menuDefines = wx.Menu(title='')
+
+ self._init_coll_menueFile_Items(self.menueFile)
+ self._init_coll_menuBar1_Menus(self.menuBar1)
+ self._init_coll_menuIncludes_Items(self.menuIncludes)
+ self._init_coll_menuDefines_Items(self.menuDefines)
+
+ def _init_ctrls(self, prnt):
+ # generated method, don't edit
+ wx.Frame.__init__(self, id=wxID_MAINFRAME, name=u'MainFrame',
+ parent=prnt, pos=wx.Point(0, -2), size=wx.Size(851, 620),
+ style=wx.DEFAULT_FRAME_STYLE, title=u'Py++ Code generator')
+ self._init_utils()
+ self.SetClientSize(wx.Size(843, 586))
+ self.SetMenuBar(self.menuBar1)
+
+ self.statusBar = wx.StatusBar(id=wxID_MAINFRAMESTATUSBAR,
+ name=u'statusBar', parent=self, style=0)
+ self._init_coll_statusBar_Fields(self.statusBar)
+ self.SetStatusBar(self.statusBar)
+
+ self.panelMain = wx.Panel(id=wxID_MAINFRAMEPANELMAIN, name=u'panelMain',
+ parent=self, pos=wx.Point(0, 0), size=wx.Size(843, 543),
+ style=wx.TAB_TRAVERSAL)
+
+ self.splitterHorizontal = wx.SplitterWindow(id=wxID_MAINFRAMESPLITTERHORIZONTAL,
+ name=u'splitterHorizontal', parent=self.panelMain, pos=wx.Point(5,
+ 5), size=wx.Size(833, 533), style=0)
+ self.splitterHorizontal.SetNeedUpdating(False)
+ self.splitterHorizontal.SetMinimumPaneSize(0)
+
+ self.panelSHUp = wx.Panel(id=wxID_MAINFRAMEPANELSHUP, name=u'panelSHUp',
+ parent=self.splitterHorizontal, pos=wx.Point(0, 0),
+ size=wx.Size(833, 372), style=wx.TAB_TRAVERSAL)
+
+ self.panelSHLow = wx.Panel(id=wxID_MAINFRAMEPANELSHLOW,
+ name=u'panelSHLow', parent=self.splitterHorizontal,
+ pos=wx.Point(0, 376), size=wx.Size(833, 157),
+ style=wx.TAB_TRAVERSAL)
+ self.splitterHorizontal.SplitHorizontally(self.panelSHUp,
+ self.panelSHLow, 300)
+
+ self.notebook1 = wx.Notebook(id=wxID_MAINFRAMENOTEBOOK1,
+ name='notebook1', parent=self.panelSHLow, pos=wx.Point(0, 0),
+ size=wx.Size(833, 157), style=0)
+ self.notebook1.SetLabel(u'Label')
+
+ self.textOutput = wx.TextCtrl(id=wxID_MAINFRAMETEXTOUTPUT,
+ name=u'textOutput', parent=self.notebook1, pos=wx.Point(0, 0),
+ size=wx.Size(825, 131), style=wx.TE_READONLY | wx.TE_MULTILINE,
+ value=u'')
+
+ self.splitterVertical = wx.SplitterWindow(id=wxID_MAINFRAMESPLITTERVERTICAL,
+ name=u'splitterVertical', parent=self.panelSHUp, pos=wx.Point(0,
+ 0), size=wx.Size(833, 367), style=wx.SP_3D)
+ self.splitterVertical.SetNeedUpdating(True)
+ self.splitterVertical.SetMinimumPaneSize(0)
+
+ self.panelSettings = wx.Panel(id=wxID_MAINFRAMEPANELSETTINGS,
+ name=u'panelSettings', parent=self.splitterVertical,
+ pos=wx.Point(0, 0), size=wx.Size(235, 367),
+ style=wx.TAB_TRAVERSAL)
+
+ self.panelCode = wx.Panel(id=wxID_MAINFRAMEPANELCODE, name=u'panelCode',
+ parent=self.splitterVertical, pos=wx.Point(239, 0),
+ size=wx.Size(594, 367), style=wx.TAB_TRAVERSAL)
+ self.splitterVertical.SplitVertically(self.panelSettings,
+ self.panelCode, 300)
+
+ self.nbSettings = wx.Notebook(id=wxID_MAINFRAMENBSETTINGS,
+ name=u'nbSettings', parent=self.panelSettings, pos=wx.Point(0, 0),
+ size=wx.Size(235, 367), style=0)
+ self.nbSettings.SetLabel(u'Label')
+ self.nbSettings.SetHelpText(u'')
+
+ self.panelNbSettings = wx.Panel(id=wxID_MAINFRAMEPANELNBSETTINGS,
+ name=u'panelNbSettings', parent=self.nbSettings, pos=wx.Point(0,
+ 0), size=wx.Size(227, 341), style=wx.TAB_TRAVERSAL)
+ self.panelNbSettings.Show(True)
+ self.panelNbSettings.SetMinSize(wx.Size(100, 100))
+
+ self.textCtrl2 = wx.TextCtrl(id=wxID_MAINFRAMETEXTCTRL2,
+ name='textCtrl2', parent=self.panelCode, pos=wx.Point(0, 17),
+ size=wx.Size(594, 317), style=wx.TE_MULTILINE, value=u'')
+
+ self.panelButtons = wx.Panel(id=wxID_MAINFRAMEPANELBUTTONS,
+ name=u'panelButtons', parent=self.panelCode, pos=wx.Point(54,
+ 344), size=wx.Size(486, 23), style=wx.TAB_TRAVERSAL)
+
+ self.butGenXml = wx.Button(id=wxID_MAINFRAMEBUTGENXML,
+ label=u'Generate XML code', name=u'butGenXml',
+ parent=self.panelButtons, pos=wx.Point(10, 0), size=wx.Size(140,
+ 23), style=0)
+ self.butGenXml.Bind(wx.EVT_BUTTON, self.OnButGenXmlButton,
+ id=wxID_MAINFRAMEBUTGENXML)
+
+ self.butGenCpp = wx.Button(id=wxID_MAINFRAMEBUTGENCPP,
+ label=u'Generate C++ code', name=u'butGenCpp',
+ parent=self.panelButtons, pos=wx.Point(170, 0), size=wx.Size(142,
+ 23), style=0)
+ self.butGenCpp.Bind(wx.EVT_BUTTON, self.OnButGenCppButton,
+ id=wxID_MAINFRAMEBUTGENCPP)
+
+ self.butGenPyPP = wx.Button(id=wxID_MAINFRAMEBUTGENPYPP,
+ label=u'Generate Py++ code', name=u'butGenPyPP',
+ parent=self.panelButtons, pos=wx.Point(332, 0), size=wx.Size(144,
+ 23), style=0)
+ self.butGenPyPP.Bind(wx.EVT_BUTTON, self.OnButGenPyPPButton,
+ id=wxID_MAINFRAMEBUTGENPYPP)
+
+ self.textHeader = wx.TextCtrl(id=wxID_MAINFRAMETEXTHEADER,
+ name=u'textHeader', parent=self.panelNbSettings, pos=wx.Point(56,
+ 20), size=wx.Size(128, 21), style=0, value=u'')
+
+ self.butHeaders = wx.Button(id=wxID_MAINFRAMEBUTHEADERS, label=u'...',
+ name=u'butHeaders', parent=self.panelNbSettings, pos=wx.Point(189,
+ 19), size=wx.Size(28, 23), style=0)
+ self.butHeaders.Bind(wx.EVT_BUTTON, self.OnButHeadersButton,
+ id=wxID_MAINFRAMEBUTHEADERS)
+
+ self.staticText1 = wx.StaticText(id=wxID_MAINFRAMESTATICTEXT1,
+ label=u'Header\nFile', name='staticText1',
+ parent=self.panelNbSettings, pos=wx.Point(5, 15), size=wx.Size(51,
+ 30), style=wx.ALIGN_CENTRE)
+
+ self.staticText2 = wx.StaticText(id=wxID_MAINFRAMESTATICTEXT2,
+ label=u'GccXml', name='staticText2', parent=self.panelNbSettings,
+ pos=wx.Point(5, 60), size=wx.Size(51, 23), style=wx.ALIGN_CENTRE)
+
+ self.textGccXml = wx.TextCtrl(id=wxID_MAINFRAMETEXTGCCXML,
+ name=u'textGccXml', parent=self.panelNbSettings, pos=wx.Point(56,
+ 61), size=wx.Size(128, 21), style=0, value=u'')
+
+ self.butGccXml = wx.Button(id=wxID_MAINFRAMEBUTGCCXML, label=u'...',
+ name=u'butGccXml', parent=self.panelNbSettings, pos=wx.Point(189,
+ 60), size=wx.Size(28, 23), style=0)
+ self.butGccXml.Bind(wx.EVT_BUTTON, self.OnButGccXmlButton,
+ id=wxID_MAINFRAMEBUTGCCXML)
+
+ self.staticText3 = wx.StaticText(id=wxID_MAINFRAMESTATICTEXT3,
+ label=u'Include\nPath', name='staticText3',
+ parent=self.panelNbSettings, pos=wx.Point(5, 116),
+ size=wx.Size(51, 37), style=wx.ALIGN_CENTRE)
+
+ self.listIncludes = wx.ListCtrl(id=wxID_MAINFRAMELISTINCLUDES,
+ name=u'listIncludes', parent=self.panelNbSettings,
+ pos=wx.Point(56, 102), size=wx.Size(166, 66), style=wx.LC_ICON)
+ self.listIncludes.Bind(wx.EVT_RIGHT_DOWN, self.OnListIncludesRightDown)
+
+ self.staticText4 = wx.StaticText(id=wxID_MAINFRAMESTATICTEXT4,
+ label=u'Defines', name='staticText4', parent=self.panelNbSettings,
+ pos=wx.Point(5, 209), size=wx.Size(51, 25),
+ style=wx.ALIGN_CENTRE)
+
+ self.listDefines = wx.ListCtrl(id=wxID_MAINFRAMELISTDEFINES,
+ name=u'listDefines', parent=self.panelNbSettings, pos=wx.Point(56,
+ 188), size=wx.Size(166, 68), style=wx.LC_ICON)
+ self.listDefines.Bind(wx.EVT_RIGHT_DOWN, self.OnListDefinesRightDown)
+
+ self.staticText5 = wx.StaticText(id=wxID_MAINFRAMESTATICTEXT5,
+ label=u'Code', name='staticText5', parent=self.panelCode,
+ pos=wx.Point(0, 0), size=wx.Size(25, 13), style=0)
+
+ self._init_coll_notebook1_Pages(self.notebook1)
+ self._init_coll_nbSettings_Pages(self.nbSettings)
+
+ self._init_sizers()
+
+ def __init__(self, parent):
+ self._init_ctrls(parent)
+ self.SetSize((self.GetSize()[0]+1,self.GetSize()[1]+1))
+
+ def OnMenueFileNewMenu(self, event):
+ event.Skip()
+
+ def OnMenueFileOpenMenu(self, event):
+ event.Skip()
+
+ def OnMenueFileSaveMenu(self, event):
+ event.Skip()
+
+ def OnMenueFileRecentMenu(self, event):
+ event.Skip()
+
+ def OnMenueFileExitMenu(self, event):
+ event.Skip()
+
+ def OnTextGenCodeRightDown(self, event):
+ event.Skip()
+
+ def OnListIncludesRightDown(self, event):
+ self.PopupMenu(self.menuIncludes)
+
+ def OnButHeaderButton(self, event):
+ event.Skip()
+
+ def OnListDefinesRightDown(self, event):
+ self.PopupMenu(self.menuDefines)
+
+ def OnButGenXmlButton(self, event):
+ self._controller.GenXmlCode()
+
+ def OnButGenCppButton(self, event):
+ self._controller.GenCppCode()
+
+ def OnButGenPyPPButton(self, event):
+ self._controller.GenPyPPCode()
+
+ def OnButHeadersButton(self, event):
+ event.Skip()
+
+ def OnButGccXmlButton(self, event):
+ event.Skip()
+
+ def set_controller(self, controller):
+ """Set controller of MVC"""
+ self._controller = controller
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rom...@us...> - 2007-03-29 13:54:55
|
Revision: 960
http://svn.sourceforge.net/pygccxml/?rev=960&view=rev
Author: roman_yakovenko
Date: 2007-03-29 06:53:55 -0700 (Thu, 29 Mar 2007)
Log Message:
-----------
Added Paths:
-----------
pyplusplus_dev/ide/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rom...@us...> - 2007-03-27 21:25:44
|
Revision: 959
http://svn.sourceforge.net/pygccxml/?rev=959&view=rev
Author: roman_yakovenko
Date: 2007-03-27 14:25:44 -0700 (Tue, 27 Mar 2007)
Log Message:
-----------
adding custom exception example
Added Paths:
-----------
pyplusplus_dev/docs/troubleshooting_guide/exceptions/
pyplusplus_dev/docs/troubleshooting_guide/exceptions/definition.rest
pyplusplus_dev/docs/troubleshooting_guide/exceptions/exceptions.cpp
pyplusplus_dev/docs/troubleshooting_guide/exceptions/exceptions.cpp.rest
pyplusplus_dev/docs/troubleshooting_guide/exceptions/exceptions.rest
pyplusplus_dev/docs/troubleshooting_guide/exceptions/sconstruct
pyplusplus_dev/docs/troubleshooting_guide/exceptions/sconstruct.rest
pyplusplus_dev/docs/troubleshooting_guide/exceptions/test.py
pyplusplus_dev/docs/troubleshooting_guide/exceptions/test.py.rest
pyplusplus_dev/docs/troubleshooting_guide/exceptions/www_configuration.py
Added: pyplusplus_dev/docs/troubleshooting_guide/exceptions/definition.rest
===================================================================
--- pyplusplus_dev/docs/troubleshooting_guide/exceptions/definition.rest (rev 0)
+++ pyplusplus_dev/docs/troubleshooting_guide/exceptions/definition.rest 2007-03-27 21:25:44 UTC (rev 959)
@@ -0,0 +1,4 @@
+Boost.Python has a limitation: it does not allow to create classes, which derives
+from the classes defined in Python. It is impossible to solve the general use case,
+without changing the library, but it is pretty simple to create solution for
+"exception" classes.
Added: pyplusplus_dev/docs/troubleshooting_guide/exceptions/exceptions.cpp
===================================================================
--- pyplusplus_dev/docs/troubleshooting_guide/exceptions/exceptions.cpp (rev 0)
+++ pyplusplus_dev/docs/troubleshooting_guide/exceptions/exceptions.cpp 2007-03-27 21:25:44 UTC (rev 959)
@@ -0,0 +1,65 @@
+#include "boost/python.hpp"
+#include <stdexcept>
+
+/**
+ * Content:
+ * * example, which explain how to create custom exception class, which derives
+ * from Python built-in exceptions
+ *
+ **/
+
+class zero_division_error : public std::exception{
+public:
+
+ zero_division_error()
+ : std::exception(), m_msg()
+ {}
+
+ zero_division_error( const std::string& msg )
+ : std::exception(), m_msg( msg )
+ {}
+
+ zero_division_error( const zero_division_error& other )
+ : std::exception(other), m_msg( other.m_msg )
+ {}
+
+ const std::string& message() const
+ { return m_msg; }
+
+ virtual ~zero_division_error() throw(){}
+
+private:
+ const std::string m_msg;
+};
+
+double devide( double x, int y ){
+ if( !y ){
+ throw zero_division_error( "unable to devide by 0( zero )" );
+ }
+ return x/y;
+}
+
+namespace bpl = boost::python;
+
+void translate( const zero_division_error& err ){
+ bpl::object this_module( bpl::handle<>( bpl::borrowed(PyImport_AddModule("my_exceptions"))));
+ bpl::object zde_class = this_module.attr("zero_division_error");
+ bpl::object pyerr = zde_class( err );
+ PyErr_SetObject( zde_class.ptr(), bpl::incref( pyerr.ptr() ) );
+}
+
+
+BOOST_PYTHON_MODULE( my_exceptions ){
+
+ typedef bpl::return_value_policy< bpl::copy_const_reference > return_copy_const_ref;
+ bpl::class_< zero_division_error >( "_zero_division_error_" )
+ .def( bpl::init<const std::string&>() )
+ .def( bpl::init<const zero_division_error&>() )
+ .def( "message", &zero_division_error::message, return_copy_const_ref() )
+ .def( "__str__", &zero_division_error::message, return_copy_const_ref() );
+
+ bpl::register_exception_translator<zero_division_error>(&translate);
+
+ bpl::def( "devide", &::devide );
+}
+
Added: pyplusplus_dev/docs/troubleshooting_guide/exceptions/exceptions.cpp.rest
===================================================================
--- pyplusplus_dev/docs/troubleshooting_guide/exceptions/exceptions.cpp.rest (rev 0)
+++ pyplusplus_dev/docs/troubleshooting_guide/exceptions/exceptions.cpp.rest 2007-03-27 21:25:44 UTC (rev 959)
@@ -0,0 +1,3 @@
+.. code-block::
+ :language: C++
+ :source-file: ./exceptions.cpp
Added: pyplusplus_dev/docs/troubleshooting_guide/exceptions/exceptions.rest
===================================================================
--- pyplusplus_dev/docs/troubleshooting_guide/exceptions/exceptions.rest (rev 0)
+++ pyplusplus_dev/docs/troubleshooting_guide/exceptions/exceptions.rest 2007-03-27 21:25:44 UTC (rev 959)
@@ -0,0 +1,72 @@
+=================
+Custom exceptions
+=================
+
+.. contents:: Table of contents
+
+------------
+Introduction
+------------
+
+.. include:: ./definition.rest
+
+-------
+Content
+-------
+
+This example actually consist from 2 small, well documented examples.
+
+The first one shows how to handle conversion between tuples: `boost::tuples::tuple`_
+and Python tuple.
+
+.. _`boost::tuples::tuple` : http://boost.org/libs/tuple/doc/tuple_users_guide.html
+
+The second one shows how to add an automatic conversion from Python tuple to
+some registered class. The class registration allows you to use its functionality
+and enjoy from automatic conversion.
+
+Files
+-----
+
+* `tuples.hpp`_ file contains Boost.Tuple to\\from Python tuple conversion
+ implementation
+
+* `tuples_tester.cpp`_ file contains few functions, which test the tuples
+ conversion functionality
+
+* `custom_rvalue.cpp`_ file contains example of registration custom r-value
+ converter
+
+* `sconstruct`_ file contains build instructions for scons build tool.
+
+* `test.py`_ file contains complete unit tests for both example
+
+All files contain comments, which describe what and why was done.
+
+.. _`tuples.hpp` : ./tuples.hpp.html
+.. _`tuples_tester.cpp` : ./tuples_tester.cpp.html
+.. _`custom_rvalue.cpp` : ./custom_rvalue.cpp.html
+.. _`sconstruct` : ./sconstruct.html
+.. _`test.py` : ./test.py.html
+
+--------
+Download
+--------
+
+`automatic_conversion.zip`_
+
+.. _`automatic_conversion.zip` : ./automatic_conversion.zip
+
+
+.. _`Py++` : ./../pyplusplus.html
+.. _`pygccxml` : http://www.language-binding.net/pygccxml/pygccxml.html
+.. _`SourceForge`: http://sourceforge.net/index.php
+
+..
+ Local Variables:
+ mode: indented-text
+ indent-tabs-mode: nil
+ sentence-end-double-space: t
+ fill-column: 70
+ End:
+
Added: pyplusplus_dev/docs/troubleshooting_guide/exceptions/sconstruct
===================================================================
--- pyplusplus_dev/docs/troubleshooting_guide/exceptions/sconstruct (rev 0)
+++ pyplusplus_dev/docs/troubleshooting_guide/exceptions/sconstruct 2007-03-27 21:25:44 UTC (rev 959)
@@ -0,0 +1,10 @@
+#scons build script
+SharedLibrary( target=r'my_exceptions'
+ , source=[ r'exceptions.cpp' ]
+ , LIBS=[ r"boost_python" ]
+ , LIBPATH=[ r"/home/roman/boost_cvs/libs/python/build/bin-stage" ]
+ , CPPPATH=[ r"/home/roman/boost_cvs"
+ , r"/usr/include/python2.4" ]
+ , SHLIBPREFIX=''
+ , SHLIBSUFFIX='.so'
+)
Added: pyplusplus_dev/docs/troubleshooting_guide/exceptions/sconstruct.rest
===================================================================
--- pyplusplus_dev/docs/troubleshooting_guide/exceptions/sconstruct.rest (rev 0)
+++ pyplusplus_dev/docs/troubleshooting_guide/exceptions/sconstruct.rest 2007-03-27 21:25:44 UTC (rev 959)
@@ -0,0 +1,3 @@
+.. code-block::
+ :language: Python
+ :source-file: ./sconstruct
Added: pyplusplus_dev/docs/troubleshooting_guide/exceptions/test.py
===================================================================
--- pyplusplus_dev/docs/troubleshooting_guide/exceptions/test.py (rev 0)
+++ pyplusplus_dev/docs/troubleshooting_guide/exceptions/test.py 2007-03-27 21:25:44 UTC (rev 959)
@@ -0,0 +1,34 @@
+import unittest
+import my_exceptions
+
+print dir( my_exceptions._zero_division_error_.__class__ )
+
+class zero_division_error(my_exceptions._zero_division_error_, ZeroDivisionError ):
+
+ def __init__( self, msg ):
+ my_exceptions._zero_division_error_.__init__( self, msg )
+
+my_exceptions.zero_division_error = zero_division_error
+
+class tester_t( unittest.TestCase ):
+ def __init__( self, *args ):
+ unittest.TestCase.__init__( self, *args )
+
+ def test( self ):
+ print my_exceptions.devide( 1, 1 )
+ self.failUnless( 1 == my_exceptions.devide( 1, 1 ) )
+ try:
+ my_exceptions.devide( 1, 0 )
+ except zero_division_error, err:
+ print err.__class__.__name__, str(err)
+
+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()
Added: pyplusplus_dev/docs/troubleshooting_guide/exceptions/test.py.rest
===================================================================
--- pyplusplus_dev/docs/troubleshooting_guide/exceptions/test.py.rest (rev 0)
+++ pyplusplus_dev/docs/troubleshooting_guide/exceptions/test.py.rest 2007-03-27 21:25:44 UTC (rev 959)
@@ -0,0 +1,3 @@
+.. code-block::
+ :language: Python
+ :source-file: ./test.py
Added: pyplusplus_dev/docs/troubleshooting_guide/exceptions/www_configuration.py
===================================================================
--- pyplusplus_dev/docs/troubleshooting_guide/exceptions/www_configuration.py (rev 0)
+++ pyplusplus_dev/docs/troubleshooting_guide/exceptions/www_configuration.py 2007-03-27 21:25:44 UTC (rev 959)
@@ -0,0 +1,3 @@
+name = 'exceptions'
+files_to_skip = ['definition.rest']
+names = {}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|