|
template<class TContainer > |
linq_driver< iter_cursor< typename util::container_traits< TContainer >::iterator > > | from (TContainer &c) |
|
template<class T > |
const linq_driver< T > & | from (const linq_driver< T > &c) |
|
template<class Iter > |
linq_driver< iter_cursor< Iter > > | from (Iter start, Iter finish) |
|
template<class TContainer > |
linq_driver< TContainer > | from_value (const TContainer &c) |
|
template<class Iter > |
std::enable_if< std::is_convertible< Iter, use_default_iterator_operators >::value, Iter >::type | operator+ (const Iter &it, typename std::iterator_traits< Iter >::distance_type n) |
|
template<class Iter > |
std::enable_if< std::is_convertible< Iter, use_default_iterator_operators >::value, Iter >::type | operator- (const Iter &it, typename std::iterator_traits< Iter >::distance_type n) |
|
template<class Iter > |
std::enable_if< std::is_convertible< Iter, use_default_iterator_operators >::value, Iter >::type | operator-= (const Iter &it, typename std::iterator_traits< Iter >::distance_type n) |
|
template<class Iter > |
std::enable_if< std::is_convertible< Iter, use_default_iterator_operators >::value, bool >::type | operator!= (const Iter &it, const Iter &it2) |
|
template<class Iter > |
std::enable_if< std::is_convertible< Iter, use_default_iterator_operators >::value, bool >::type | operator> (const Iter &it, const Iter &it2) |
|
template<class Iter > |
std::enable_if< std::is_convertible< Iter, use_default_iterator_operators >::value, bool >::type | operator<= (const Iter &it, const Iter &it2) |
|
template<class Iter > |
std::enable_if< std::is_convertible< Iter, use_default_iterator_operators >::value, bool >::type | operator>= (const Iter &it, const Iter &it2) |
|
template<class Iter > |
iter_range< Iter > | make_range (Iter start, Iter finish) |
|
template<class Cursor > |
Cursor::element_type | linq_last_ (Cursor c, onepass_cursor_tag) |
|
template<class Cursor > |
Cursor::reference_type | linq_last_ (Cursor c, forward_cursor_tag) |
|
template<class Cursor > |
Cursor::reference_type | linq_last_ (Cursor c, random_access_cursor_tag) |
|
template<class Cursor > |
Cursor::element_type | linq_last_or_default_ (Cursor c, onepass_cursor_tag) |
|
template<class Cursor > |
Cursor::element_type | linq_last_or_default_ (Cursor c, forward_cursor_tag) |
|
template<class Cursor > |
Cursor::element_type | linq_last_or_default_ (Cursor c, random_access_cursor_tag) |
|
template<class Collection > |
auto | get_cursor (const linq_take< Collection > &take) -> decltype(get_cursor_(take, typename Collection::cursor::cursor_category())) |
|
cursors
It should be noted that CppLinq uses a slightly different iterator concept, one where iterators know their extents. This sacrificed some generality, but it adds convenience and improves some performance in some cases. Notably, captures need only be stored once instead of twice in most use cases.
Cursors and Ranges are always classes.
To get a cursor from a range:
get_cursor(range) -> cur
Unlike boost ranges, CppLinq cursors are mutated directly, and may "shed state" as they are mutated. For example, a GroupBy range will drop references to earlier groups, possibly permitting freeing them.
Onepass cursor
- empty(cur) -> bool : at end of sequence
- inc(cur)
- get(cur) -> T
- copy ctor : duplicate reference to seek position
Forward cursor
- copy ctor : true duplicate of seek position
Bidirectional cursor
- forget() : notes the current element as the new 'begin' point
- atbegin(cur) -> bool
- dec(cur)
Random access cursor
- skip(cur, n)
- position(cur) -> n
- size(cur) -> n
- truncate(n) : keep only n more elements
As well, cursors must define the appropriate type/typedefs: