params.py (8597:45c9f664a365) params.py (8607:5fb918115c07)
1# Copyright (c) 2004-2006 The Regents of The University of Michigan
2# Copyright (c) 2010-2011 Advanced Micro Devices, Inc.
3# All rights reserved.
4#
5# Redistribution and use in source and binary forms, with or without
6# modification, are permitted provided that the following conditions are
7# met: redistributions of source code must retain the above copyright
8# notice, this list of conditions and the following disclaimer;

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

159 return value
160 if isinstance(value, self.ptype):
161 return value
162 if isNullPointer(value) and isSimObjectClass(self.ptype):
163 return value
164 return self.ptype(value)
165
166 def cxx_predecls(self, code):
1# Copyright (c) 2004-2006 The Regents of The University of Michigan
2# Copyright (c) 2010-2011 Advanced Micro Devices, Inc.
3# All rights reserved.
4#
5# Redistribution and use in source and binary forms, with or without
6# modification, are permitted provided that the following conditions are
7# met: redistributions of source code must retain the above copyright
8# notice, this list of conditions and the following disclaimer;

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

159 return value
160 if isinstance(value, self.ptype):
161 return value
162 if isNullPointer(value) and isSimObjectClass(self.ptype):
163 return value
164 return self.ptype(value)
165
166 def cxx_predecls(self, code):
167 code('#include <cstddef>')
167 self.ptype.cxx_predecls(code)
168
169 def swig_predecls(self, code):
170 self.ptype.swig_predecls(code)
171
172 def cxx_decl(self, code):
173 code('${{self.ptype.cxx_type}} ${{self.name}};')
174

--- 1370 unchanged lines hidden ---
168 self.ptype.cxx_predecls(code)
169
170 def swig_predecls(self, code):
171 self.ptype.swig_predecls(code)
172
173 def cxx_decl(self, code):
174 code('${{self.ptype.cxx_type}} ${{self.name}};')
175

--- 1370 unchanged lines hidden ---