SConscript (5610:0e1e9c186769) SConscript (5623:11a1079070b6)
1# -*- mode:python -*-
2
3# Copyright (c) 2004-2005 The Regents of The University of Michigan
4# All rights reserved.
5#
6# Redistribution and use in source and binary forms, with or without
7# modification, are permitted provided that the following conditions are
8# met: redistributions of source code must retain the above copyright

--- 518 unchanged lines hidden (view full) ---

527
528 for obj in ordered_objs:
529 if obj.swig_objdecls:
530 for decl in obj.swig_objdecls:
531 print >>out, decl
532 continue
533
534 class_path = obj.cxx_class.split('::')
1# -*- mode:python -*-
2
3# Copyright (c) 2004-2005 The Regents of The University of Michigan
4# All rights reserved.
5#
6# Redistribution and use in source and binary forms, with or without
7# modification, are permitted provided that the following conditions are
8# met: redistributions of source code must retain the above copyright

--- 518 unchanged lines hidden (view full) ---

527
528 for obj in ordered_objs:
529 if obj.swig_objdecls:
530 for decl in obj.swig_objdecls:
531 print >>out, decl
532 continue
533
534 class_path = obj.cxx_class.split('::')
535 class_path.reverse()
536 classname = class_path[0]
537 namespaces = class_path[1:]
535 classname = class_path[-1]
536 namespaces = class_path[:-1]
537 namespaces.reverse()
538
539 code = ''
538
539 code = ''
540
541 if namespaces:
542 code += '// avoid name conflicts\n'
543 sep_string = '_COLONS_'
544 flat_name = sep_string.join(class_path)
545 code += '%%rename(%s) %s;\n' % (flat_name, classname)
546
540 code += '// stop swig from creating/wrapping default ctor/dtor\n'
541 code += '%%nodefault %s;\n' % classname
542 code += 'class %s ' % classname
543 if obj._base:
544 code += ': public %s' % obj._base.cxx_class
545 code += ' {};\n'
546
547 for ns in namespaces:

--- 513 unchanged lines hidden ---
547 code += '// stop swig from creating/wrapping default ctor/dtor\n'
548 code += '%%nodefault %s;\n' % classname
549 code += 'class %s ' % classname
550 if obj._base:
551 code += ': public %s' % obj._base.cxx_class
552 code += ' {};\n'
553
554 for ns in namespaces:

--- 513 unchanged lines hidden ---