equal
deleted
inserted
replaced
556 for type in self.CustomTypeHierarchy.keys(): |
556 for type in self.CustomTypeHierarchy.keys(): |
557 for base_type in DataTypeRange.keys(): |
557 for base_type in DataTypeRange.keys(): |
558 if self.IsOfType(type, base_type) and not self.IsOfType(type, exclude): |
558 if self.IsOfType(type, base_type) and not self.IsOfType(type, exclude): |
559 derived.append(type) |
559 derived.append(type) |
560 break |
560 break |
561 return DataTypeRange.keys() + derived |
561 return derived |
562 setattr(cls, "GetSubrangeBaseTypes", GetSubrangeBaseTypes) |
562 setattr(cls, "GetSubrangeBaseTypes", GetSubrangeBaseTypes) |
563 |
563 |
564 """ |
564 """ |
565 returns true if the given data type is the same that "reference" meta-type or one of its types. |
565 returns true if the given data type is the same that "reference" meta-type or one of its types. |
566 """ |
566 """ |
677 customdatatypes = [] |
677 customdatatypes = [] |
678 for customdatatype in self.getdataTypes(): |
678 for customdatatype in self.getdataTypes(): |
679 if not only_locatable or self.IsLocatableType(customdatatype): |
679 if not only_locatable or self.IsLocatableType(customdatatype): |
680 customdatatype_name = customdatatype.getname() |
680 customdatatype_name = customdatatype.getname() |
681 if customdatatype_name != exclude and not self.ElementIsUsedBy(exclude, customdatatype_name): |
681 if customdatatype_name != exclude and not self.ElementIsUsedBy(exclude, customdatatype_name): |
682 customdatatypes.append(customdatatype_name) |
682 customdatatypes.append({"name": customdatatype_name, "infos": customdatatype}) |
683 return customdatatypes |
683 return customdatatypes |
684 setattr(cls, "GetCustomDataTypes", GetCustomDataTypes) |
684 setattr(cls, "GetCustomDataTypes", GetCustomDataTypes) |
685 |
685 |
686 # Return if Data Type can be used for located variables |
686 # Return if Data Type can be used for located variables |
687 def IsLocatableType(self, datatype): |
687 def IsLocatableType(self, datatype): |