SimObject.py (8331:aa00cee9abb1) | SimObject.py (8459:b8c3c20d0385) |
---|---|
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; --- 732 unchanged lines hidden (view full) --- 741 if issubclass(pdesc.ptype, ptype): 742 match_obj = self._values[pname] 743 if found_obj != None and found_obj != match_obj: 744 raise AttributeError, \ 745 'parent.any matched more than one: %s and %s' % (found_obj.path, match_obj.path) 746 found_obj = match_obj 747 return found_obj, found_obj != None 748 | 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; --- 732 unchanged lines hidden (view full) --- 741 if issubclass(pdesc.ptype, ptype): 742 match_obj = self._values[pname] 743 if found_obj != None and found_obj != match_obj: 744 raise AttributeError, \ 745 'parent.any matched more than one: %s and %s' % (found_obj.path, match_obj.path) 746 found_obj = match_obj 747 return found_obj, found_obj != None 748 |
749 def find_all(self, ptype): 750 all = {} 751 # search children 752 for child in self._children.itervalues(): 753 if isinstance(child, ptype) and not isproxy(child) and \ 754 not isNullPointer(child): 755 all[child] = True 756 # search param space 757 for pname,pdesc in self._params.iteritems(): 758 if issubclass(pdesc.ptype, ptype): 759 match_obj = self._values[pname] 760 if not isproxy(match_obj) and not isNullPointer(match_obj): 761 all[match_obj] = True 762 return all.keys(), True 763 |
|
749 def unproxy(self, base): 750 return self 751 752 def unproxyParams(self): 753 for param in self._params.iterkeys(): 754 value = self._values.get(param) 755 if value != None and isproxy(value): 756 try: --- 240 unchanged lines hidden --- | 764 def unproxy(self, base): 765 return self 766 767 def unproxyParams(self): 768 for param in self._params.iterkeys(): 769 value = self._values.get(param) 770 if value != None and isproxy(value): 771 try: --- 240 unchanged lines hidden --- |