SimObject.py (7742:611fe187288e) SimObject.py (7811:a8fc35183c10)
1# Copyright (c) 2004-2006 The Regents of The University of Michigan
2# Copyright (c) 2010 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;

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

121 code('// stop swig from creating/wrapping default ctor/dtor')
122 code('%nodefault $classname;')
123 code('class $classname')
124 if cls._base:
125 code(' : public ${{cls._base.cxx_class}}')
126 code('{};')
127
128 for ns in reversed(namespaces):
1# Copyright (c) 2004-2006 The Regents of The University of Michigan
2# Copyright (c) 2010 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;

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

121 code('// stop swig from creating/wrapping default ctor/dtor')
122 code('%nodefault $classname;')
123 code('class $classname')
124 if cls._base:
125 code(' : public ${{cls._base.cxx_class}}')
126 code('{};')
127
128 for ns in reversed(namespaces):
129 code('/* namespace $ns */ }')
129 code('} // namespace $ns')
130
131def public_value(key, value):
132 return key.startswith('_') or \
133 isinstance(value, (FunctionType, MethodType, classmethod, type))
134
135# The metaclass for SimObject. This class controls how new classes
136# that derive from SimObject are instantiated, and provides inherited
137# class behavior (just like a class controls how instances of that

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

385''')
386
387 # A forward class declaration is sufficient since we are just
388 # declaring a pointer.
389 for ns in class_path[:-1]:
390 code('namespace $ns {')
391 code('class $0;', class_path[-1])
392 for ns in reversed(class_path[:-1]):
130
131def public_value(key, value):
132 return key.startswith('_') or \
133 isinstance(value, (FunctionType, MethodType, classmethod, type))
134
135# The metaclass for SimObject. This class controls how new classes
136# that derive from SimObject are instantiated, and provides inherited
137# class behavior (just like a class controls how instances of that

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

385''')
386
387 # A forward class declaration is sufficient since we are just
388 # declaring a pointer.
389 for ns in class_path[:-1]:
390 code('namespace $ns {')
391 code('class $0;', class_path[-1])
392 for ns in reversed(class_path[:-1]):
393 code('/* namespace $ns */ }')
393 code('} // namespace $ns')
394 code()
395
396 for param in params:
397 param.cxx_predecls(code)
398 code()
399
400 if cls._base:
401 code('#include "params/${{cls._base.type}}.hh"')

--- 575 unchanged lines hidden ---
394 code()
395
396 for param in params:
397 param.cxx_predecls(code)
398 code()
399
400 if cls._base:
401 code('#include "params/${{cls._base.type}}.hh"')

--- 575 unchanged lines hidden ---