28 virtual size_t listSize() = 0;
38 return AListModelRange<T>(item, {item.getRow() + 1}, std::dynamic_pointer_cast<IListModel<T>>(this->shared_from_this()));
44 size_t size = listSize();
46 for (
size_t i = 0; i < size; ++i) {
47 result << listItemAt(i);
52 template<
typename Filter>
55 size_t currentBeginning = 0;
56 size_t s = listSize();
57 bool prevValue =
false;
60 auto endSliceIfNecessary = [&](
size_t i) {
62 result << range(currentBeginning, i);
65 for (
size_t i = 0; i < s; ++i, prevValue = currentValue) {
66 currentValue = filter(i);
72 endSliceIfNecessary(i);
75 endSliceIfNecessary(listSize());