SimObject.py (5244:bf32c57328f5) SimObject.py (5454:4b1261c2af58)
1# Copyright (c) 2004-2006 The Regents of The University of Michigan
2# All rights reserved.
3#
4# Redistribution and use in source and binary forms, with or without
5# modification, are permitted provided that the following conditions are
6# met: redistributions of source code must retain the above copyright
7# notice, this list of conditions and the following disclaimer;
8# redistributions in binary form must reproduce the above copyright

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

212 if namespace:
213 t = '%s::%s' % (namespace, t)
214 cls._value_dict['cxx_type'] = t
215 if 'cxx_predecls' not in cls._value_dict:
216 # A forward class declaration is sufficient since we are
217 # just declaring a pointer.
218 decl = 'class %s;' % _cxx_class
219 if namespace:
1# Copyright (c) 2004-2006 The Regents of The University of Michigan
2# All rights reserved.
3#
4# Redistribution and use in source and binary forms, with or without
5# modification, are permitted provided that the following conditions are
6# met: redistributions of source code must retain the above copyright
7# notice, this list of conditions and the following disclaimer;
8# redistributions in binary form must reproduce the above copyright

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

212 if namespace:
213 t = '%s::%s' % (namespace, t)
214 cls._value_dict['cxx_type'] = t
215 if 'cxx_predecls' not in cls._value_dict:
216 # A forward class declaration is sufficient since we are
217 # just declaring a pointer.
218 decl = 'class %s;' % _cxx_class
219 if namespace:
220 decl = 'namespace %s { %s }' % (namespace, decl)
220 namespaces = namespace.split('::')
221 namespaces.reverse()
222 for namespace in namespaces:
223 decl = 'namespace %s { %s }' % (namespace, decl)
221 cls._value_dict['cxx_predecls'] = [decl]
222
223 if 'swig_predecls' not in cls._value_dict:
224 # A forward class declaration is sufficient since we are
225 # just declaring a pointer.
226 cls._value_dict['swig_predecls'] = \
227 cls._value_dict['cxx_predecls']
228

--- 682 unchanged lines hidden ---
224 cls._value_dict['cxx_predecls'] = [decl]
225
226 if 'swig_predecls' not in cls._value_dict:
227 # A forward class declaration is sufficient since we are
228 # just declaring a pointer.
229 cls._value_dict['swig_predecls'] = \
230 cls._value_dict['cxx_predecls']
231

--- 682 unchanged lines hidden ---