SConscript (5604:7c58fc1ec5dc) | SConscript (5610:0e1e9c186769) |
---|---|
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 --- 517 unchanged lines hidden (view full) --- 526 print >>out 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 | 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 --- 517 unchanged lines hidden (view full) --- 526 print >>out 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 code = '' 535 base = obj.get_base() | 534 class_path = obj.cxx_class.split('::') 535 class_path.reverse() 536 classname = class_path[0] 537 namespaces = class_path[1:] |
536 | 538 |
539 code = '' |
|
537 code += '// stop swig from creating/wrapping default ctor/dtor\n' | 540 code += '// stop swig from creating/wrapping default ctor/dtor\n' |
538 code += '%%nodefault %s;\n' % obj.cxx_class 539 code += 'class %s ' % obj.cxx_class 540 if base: 541 code += ': public %s' % base | 541 code += '%%nodefault %s;\n' % classname 542 code += 'class %s ' % classname 543 if obj._base: 544 code += ': public %s' % obj._base.cxx_class |
542 code += ' {};\n' 543 | 545 code += ' {};\n' 546 |
544 klass = obj.cxx_class; 545 if hasattr(obj, 'cxx_namespace'): 546 new_code = 'namespace %s {\n' % obj.cxx_namespace | 547 for ns in namespaces: 548 new_code = 'namespace %s {\n' % ns |
547 new_code += code 548 new_code += '}\n' 549 code = new_code | 549 new_code += code 550 new_code += '}\n' 551 code = new_code |
550 klass = '%s::%s' % (obj.cxx_namespace, klass) | |
551 552 print >>out, code 553 554 print >>out, '%%include "src/sim/sim_object_params.hh"' % obj 555 for obj in ordered_objs: 556 print >>out, '%%include "params/%s.hh"' % obj 557 558params_file = File('params/params.i') --- 501 unchanged lines hidden --- | 552 553 print >>out, code 554 555 print >>out, '%%include "src/sim/sim_object_params.hh"' % obj 556 for obj in ordered_objs: 557 print >>out, '%%include "params/%s.hh"' % obj 558 559params_file = File('params/params.i') --- 501 unchanged lines hidden --- |