def __lt__(self, other): if not isinstance(other, self.__class__): return self.__class__.__name__ < other.__class__.__name__ return (algorithm.declaration_path(self.related_class), self.access, self.is_virtual) < ( algorithm.declaration_path(other.related_class), other.access, self.is_virtual, )
def __eq__(self, other): if not isinstance(other, hierarchy_info_t): return False return ( algorithm.declaration_path(self.related_class) == algorithm.declaration_path(other.related_class) and self.access == other.access and self.is_virtual == other.is_virtual )
def _get__cmp__scope_items(self): """implementation details""" return [ self.class_type , self._sorted_list( [ algorithm.declaration_path( base.related_class ) for base in self.bases ] ) , self._sorted_list( [ algorithm.declaration_path( derive.related_class ) for derive in self.derived ] ) , self.is_abstract , self._sorted_list( self.public_members ) , self._sorted_list( self.private_members ) , self._sorted_list( self.protected_members ) ]
def __eq__(self, other): """ function will return true, if both declarations refers to the same object. This function could be implemented in terms of _get__cmp__data, but in this case it will downgrade performance. self.mangled property is not compared, because it could be chaned from one compilation time to an other. """ if not isinstance(other, self.__class__): return False return self.name == other.name \ and self.location == other.location \ and algorithm.declaration_path( self.parent ) \ == algorithm.declaration_path( other.parent )
def __eq__(self, other): if not scopedef.scopedef_t.__eq__(self, other): return False return ( self.class_type == other.class_type and self._sorted_list([algorithm.declaration_path(base.related_class) for base in self.bases]) == other._sorted_list([algorithm.declaration_path(base.related_class) for base in other.bases]) and self._sorted_list([algorithm.declaration_path(derive.related_class) for derive in self.derived]) == other._sorted_list([algorithm.declaration_path(derive.related_class) for derive in other.derived]) and self.is_abstract == other.is_abstract and self._sorted_list(self.public_members) == other._sorted_list(other.public_members) and self._sorted_list(self.private_members) == other._sorted_list(other.private_members) and self._sorted_list(self.protected_members) == self._sorted_list(other.protected_members) )
def __eq__(self, other): """ function will return true, if both declarations refers to the same object. This function could be implemented in terms of _get__cmp__data, but in this case it will downgrade performance. self.mangled property is not compared, because it could be changed from one compilation time to an other. """ if not isinstance( other, self.__class__ ): return False return self.name == other.name \ and self.location == other.location \ and algorithm.declaration_path( self.parent ) \ == algorithm.declaration_path( other.parent )
def __eq__(self, other): if not scopedef.scopedef_t.__eq__(self, other): return False return self.class_type == other.class_type \ and self._sorted_list( [ algorithm.declaration_path( base.related_class ) for base in self.bases ] ) \ == other._sorted_list( [ algorithm.declaration_path( base.related_class ) for base in other.bases ] ) \ and self._sorted_list( [ algorithm.declaration_path( derive.related_class ) for derive in self.derived ] ) \ == other._sorted_list( [ algorithm.declaration_path( derive.related_class ) for derive in other.derived ] ) \ and self.is_abstract == other.is_abstract \ and self._sorted_list( self.public_members ) \ == other._sorted_list( other.public_members ) \ and self._sorted_list( self.private_members ) \ == other._sorted_list( other.private_members ) \ and self._sorted_list( self.protected_members ) \ == self._sorted_list( other.protected_members )
def _get__cmp__data(self): """implementation details""" data = [ algorithm.declaration_path(self.parent), self.name, self.location ] data.extend(self._get__cmp__items()) return data
def __lt__(self, other): if not isinstance(other, self.__class__): return self.__class__.__name__ < other.__class__.__name__ return ( algorithm.declaration_path( self.related_class ), self.access, self.is_virtual ) \ < ( algorithm.declaration_path( other.related_class ), other.access, self.is_virtual )
def __eq__(self, other): if not isinstance(other, hierarchy_info_t): return False return algorithm.declaration_path( self.related_class ) == algorithm.declaration_path( other.related_class ) \ and self.access == other.access \ and self.is_virtual == other.is_virtual
def _get__cmp__data(self): """implementation details""" data = [ algorithm.declaration_path( self.parent ), self.name, self.location ] data.extend( self._get__cmp__items() ) return data