def iter_people(self, order_by=None): """ Protected version of iter_people """ if order_by: retval = [] for person in filter(None, self.db.iter_people()): if self.__is_living(person): if self.mode == self.MODE_EXCLUDE_ALL: continue else: retval.append(self.__restrict_person(person)) else: retval.append(person) retval = sort_objects(retval, order_by, self) for item in retval: yield item else: for person in filter(None, self.db.iter_people()): if self.__is_living(person): if self.mode == self.MODE_EXCLUDE_ALL: continue else: yield self.__restrict_person(person) else: yield person
def iter_notes(self, order_by=None): """ Return an iterator over objects for Notes in the database """ if order_by: return sort_objects(map(self.get_note_from_handle, self.nlist), order_by, self) else: return map(self.get_note_from_handle, self.nlist)
def iter_events(self, order_by=None): """ Return an iterator over objects for Events in the database """ if order_by: return sort_objects(map(self.get_event_from_handle, self.elist), order_by, self) else: return map(self.get_event_from_handle, self.elist)
def iter_families(self, order_by=None): """ Return an iterator over objects for Families in the database """ if order_by: return sort_objects(map(self.get_family_from_handle, self.flist), order_by, self) else: return map(self.get_family_from_handle, self.flist)
def iter_people(self, order_by=None): """ Return an iterator over objects for Persons in the database """ if order_by: return sort_objects(map(self.get_person_from_handle, self.plist), order_by, self) else: return map(self.get_person_from_handle, self.plist)