Extracted class Composable from BaseIterator.
Added iter::Virtual. Indexes::for_all now return iter::Virtual
This commit is contained in:
@@ -432,24 +432,24 @@ bool operator!=(const EdgeAccessor &a, const EdgeAccessor &b)
|
||||
}
|
||||
|
||||
// ************************* VertexIterator
|
||||
DESTRUCTOR(VertexIterator, unique_ptr);
|
||||
DESTRUCTOR(VertexIterator, Virtual);
|
||||
|
||||
Option<const VertexAccessor> VertexIterator::next()
|
||||
{
|
||||
return HALF_CALL(get()->next()).map<const VertexAccessor>();
|
||||
return HALF_CALL(next()).map<const VertexAccessor>();
|
||||
}
|
||||
|
||||
Count VertexIterator::count() { return HALF_CALL(get()->count()); }
|
||||
Count VertexIterator::count() { return HALF_CALL(count()); }
|
||||
|
||||
// ************************* EdgeIterator
|
||||
DESTRUCTOR(EdgeIterator, unique_ptr);
|
||||
DESTRUCTOR(EdgeIterator, Virtual);
|
||||
|
||||
Option<const EdgeAccessor> EdgeIterator::next()
|
||||
{
|
||||
return HALF_CALL(get()->next()).map<const EdgeAccessor>();
|
||||
return HALF_CALL(next()).map<const EdgeAccessor>();
|
||||
}
|
||||
|
||||
Count EdgeIterator::count() { return HALF_CALL(get()->count()); }
|
||||
Count EdgeIterator::count() { return HALF_CALL(count()); }
|
||||
|
||||
// ************************* OutEdgesIterator
|
||||
DESTRUCTOR(OutEdgesIterator, out_edge_iterator_t);
|
||||
|
||||
@@ -32,12 +32,11 @@ bool NonUniqueUnorderedIndex<T, K>::insert(IndexRecord<T, K> &&value)
|
||||
}
|
||||
|
||||
template <class T, class K>
|
||||
std::unique_ptr<IteratorBase<const typename T::accessor_t>>
|
||||
iter::Virtual<const typename T::accessor_t>
|
||||
NonUniqueUnorderedIndex<T, K>::for_range(DbAccessor &t, Border<K> from,
|
||||
Border<K> to)
|
||||
{
|
||||
return std::make_unique<decltype(
|
||||
for_range_exact(t, std::move(from), std::move(to)))>(
|
||||
return iter::make_virtual(
|
||||
for_range_exact(t, std::move(from), std::move(to)));
|
||||
}
|
||||
|
||||
|
||||
@@ -39,11 +39,10 @@ bool UniqueOrderedIndex<T, K>::insert(IndexRecord<T, K> &&value)
|
||||
}
|
||||
|
||||
template <class T, class K>
|
||||
std::unique_ptr<IteratorBase<const typename T::accessor_t>>
|
||||
iter::Virtual<const typename T::accessor_t>
|
||||
UniqueOrderedIndex<T, K>::for_range(DbAccessor &t, Border<K> from, Border<K> to)
|
||||
{
|
||||
return std::make_unique<decltype(
|
||||
for_range_exact(t, std::move(from), std::move(to)))>(
|
||||
return iter::make_virtual(
|
||||
for_range_exact(t, std::move(from), std::move(to)));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user