Type.py (9499:b03b556a8fbb) Type.py (9500:9c3e3d1c7a87)
1# Copyright (c) 1999-2008 Mark D. Hill and David A. Wood
2# Copyright (c) 2009 The Hewlett-Packard Development Company
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;

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

241 code('''
242$klass ${{self.c_ident}}$parent
243{
244 public:
245 ${{self.c_ident}}
246''', klass="class")
247
248 if self.isMessage:
1# Copyright (c) 1999-2008 Mark D. Hill and David A. Wood
2# Copyright (c) 2009 The Hewlett-Packard Development Company
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;

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

241 code('''
242$klass ${{self.c_ident}}$parent
243{
244 public:
245 ${{self.c_ident}}
246''', klass="class")
247
248 if self.isMessage:
249 code('(Time curTime) : %s(curTime) {' % self["interface"])
249 code('(Cycles curTime) : %s(curTime) {' % self["interface"])
250 else:
251 code('()\n\t\t{')
252
253 code.indent()
254 if not self.isGlobal:
255 code.indent()
256 for dm in self.data_members.values():
257 ident = dm.ident

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

286
287 # ******** Full init constructor ********
288 if not self.isGlobal:
289 params = [ 'const %s& local_%s' % (dm.type.c_ident, dm.ident) \
290 for dm in self.data_members.itervalues() ]
291 params = ', '.join(params)
292
293 if self.isMessage:
250 else:
251 code('()\n\t\t{')
252
253 code.indent()
254 if not self.isGlobal:
255 code.indent()
256 for dm in self.data_members.values():
257 ident = dm.ident

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

286
287 # ******** Full init constructor ********
288 if not self.isGlobal:
289 params = [ 'const %s& local_%s' % (dm.type.c_ident, dm.ident) \
290 for dm in self.data_members.itervalues() ]
291 params = ', '.join(params)
292
293 if self.isMessage:
294 params = "const Time curTime, " + params
294 params = "const Cycles curTime, " + params
295
296 code('${{self.c_ident}}($params)')
297
298 # Call superclass constructor
299 if "interface" in self:
300 if self.isMessage:
301 code(' : ${{self["interface"]}}(curTime)')
302 else:

--- 508 unchanged lines hidden ---
295
296 code('${{self.c_ident}}($params)')
297
298 # Call superclass constructor
299 if "interface" in self:
300 if self.isMessage:
301 code(' : ${{self["interface"]}}(curTime)')
302 else:

--- 508 unchanged lines hidden ---