Lines Matching refs:attr

601     def _cls_get_port_ref(cls, attr):
605 ref = cls._port_refs.get(attr)
607 ref = cls._ports[attr].makeRef(cls)
608 cls._port_refs[attr] = ref
611 # Set attribute (called on foo.attr = value when foo is an
613 def __setattr__(cls, attr, value):
615 if public_value(attr, value):
616 type.__setattr__(cls, attr, value)
619 if attr in cls.keywords:
620 cls._set_keyword(attr, value, cls.keywords[attr])
623 if attr in cls._ports:
624 cls._cls_get_port_ref(attr).connect(value)
631 % (attr, cls.__name__))
634 param = cls._params.get(attr)
636 cls._set_param(attr, value, param)
641 cls._add_cls_child(attr, coerceSimObjectOrVector(value))
646 "Class %s has no parameter \'%s\'" % (cls.__name__, attr))
648 def __getattr__(cls, attr):
649 if attr == 'cxx_class_path':
652 if attr == 'cxx_class_name':
655 if attr == 'cxx_namespaces':
658 if attr == 'pybind_class':
661 if attr in cls._values:
662 return cls._values[attr]
664 if attr in cls._children:
665 return cls._children[attr]
668 return getattr(cls.getCCClass(), attr)
671 "object '%s' has no attribute '%s'" % (cls.__name__, attr))
1248 def _get_port_ref(self, attr):
1252 ref = self._port_refs.get(attr)
1254 ref = self._ports[attr].makeRef(self)
1255 self._port_refs[attr] = ref
1258 def __getattr__(self, attr):
1259 if attr in self._ports:
1260 return self._get_port_ref(attr)
1262 if attr in self._values:
1263 return self._values[attr]
1265 if attr in self._children:
1266 return self._children[attr]
1271 if self._ccObject and hasattr(self._ccObject, attr):
1272 return getattr(self._ccObject, attr)
1275 % (self.__class__.__name__, attr)
1283 # Set attribute (called on foo.attr = value when foo is an
1285 def __setattr__(self, attr, value):
1287 if attr.startswith('_'):
1288 object.__setattr__(self, attr, value)
1291 if attr in self._ports:
1293 self._get_port_ref(attr).connect(value)
1296 param = self._params.get(attr)
1303 (e, self.__class__.__name__, attr, value)
1306 self._values[attr] = value
1309 self.add_child(attr, value)
1315 self._hr_values[attr] = hr_value
1321 self.add_child(attr, value)
1326 % (self.__class__.__name__, attr))
1663 for (attr, portRef) in sorted(self._port_refs.items()):