1# Copyright (c) 2012 ARM Limited 2# All rights reserved. 3# 4# The license below extends only to copyright in the software and shall 5# not be construed as granting a license to any other intellectual 6# property including but not limited to intellectual property relating 7# to a hardware implementation of the functionality of the software 8# licensed hereunder. You may use the software subject to the license --- 199 unchanged lines hidden (view full) --- 208 if 'cxx_class' not in cls._value_dict: 209 cls._value_dict['cxx_class'] = cls._value_dict['type'] 210 211 cls._value_dict['cxx_type'] = '%s *' % cls._value_dict['cxx_class'] 212 213 if 'cxx_header' not in cls._value_dict: 214 global noCxxHeader 215 noCxxHeader = True |
216 warn("No header file specified for SimObject: %s", name) |
217 218 # Export methods are automatically inherited via C++, so we 219 # don't want the method declarations to get inherited on the 220 # python side (and thus end up getting repeated in the wrapped 221 # versions of derived classes). The code below basicallly 222 # suppresses inheritance by substituting in the base (null) 223 # versions of these methods unless a different version is 224 # explicitly supplied. --- 573 unchanged lines hidden (view full) --- 798 child = self._children[name] 799 child.clear_parent(self) 800 del self._children[name] 801 802 # Add a new child to this object. 803 def add_child(self, name, child): 804 child = coerceSimObjectOrVector(child) 805 if child.has_parent(): |
806 warn("add_child('%s'): child '%s' already has parent", name, 807 child.get_name()) |
808 if self._children.has_key(name): 809 # This code path had an undiscovered bug that would make it fail 810 # at runtime. It had been here for a long time and was only 811 # exposed by a buggy script. Changes here will probably not be 812 # exercised without specialized testing. 813 self.clear_child(name) 814 child.set_parent(self, name) 815 self._children[name] = child --- 6 unchanged lines hidden (view full) --- 822 def adoptOrphanParams(self): 823 for key,val in self._values.iteritems(): 824 if not isSimObjectVector(val) and isSimObjectSequence(val): 825 # need to convert raw SimObject sequences to 826 # SimObjectVector class so we can call has_parent() 827 val = SimObjectVector(val) 828 self._values[key] = val 829 if isSimObjectOrVector(val) and not val.has_parent(): |
830 warn("%s adopting orphan SimObject param '%s'", self, key) |
831 self.add_child(key, val) 832 833 def path(self): 834 if not self._parent: 835 return '<orphan %s>' % self.__class__ 836 ppath = self._parent.path() 837 if ppath == 'root': 838 return self._name --- 291 unchanged lines hidden --- |