RxCpp
The Reactive Extensions for Native (RxCpp) is a library for composing asynchronous and event-based programs using observable sequences and LINQ-style query operators in both C and C++.
Namespaces | Classes | Functions
cpplinq Namespace Reference

Namespaces

 util
 

Classes

struct  bidirectional_cursor_tag
 
struct  collection_tag
 
struct  container_interface
 
class  container_range
 
struct  cursor_interface
 
class  cursor_iterator
 
struct  default_equality
 
struct  default_less
 
class  dynamic_collection
 
class  dynamic_cursor
 
struct  forward_cursor_tag
 
struct  group
 
class  iter_cursor
 
class  iter_range
 
class  linq_driver
 
class  linq_groupby
 
class  linq_select
 
class  linq_select_many
 
struct  linq_skip
 
struct  linq_take
 
struct  linq_take_cursor
 
class  linq_where
 
struct  noread_cursor_tag
 
struct  onepass_cursor_tag
 
struct  random_access_cursor_tag
 
struct  readonly_cursor_tag
 
struct  readwrite_cursor_tag
 
struct  use_default_iterator_operators
 

Functions

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()))
 

Detailed Description

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

Forward cursor

Bidirectional cursor

Random access cursor

As well, cursors must define the appropriate type/typedefs:

Function Documentation

template<class TContainer >
linq_driver<iter_cursor<typename util::container_traits<TContainer>::iterator> > cpplinq::from ( TContainer &  c)
template<class T >
const linq_driver<T>& cpplinq::from ( const linq_driver< T > &  c)
template<class Iter >
linq_driver<iter_cursor<Iter> > cpplinq::from ( Iter  start,
Iter  finish 
)
template<class TContainer >
linq_driver<TContainer> cpplinq::from_value ( const TContainer &  c)
template<class Collection >
auto cpplinq::get_cursor ( const linq_take< Collection > &  take) -> decltype(get_cursor_(take, typename Collection::cursor::cursor_category()))
template<class Cursor >
Cursor::element_type cpplinq::linq_last_ ( Cursor  c,
onepass_cursor_tag   
)
template<class Cursor >
Cursor::reference_type cpplinq::linq_last_ ( Cursor  c,
forward_cursor_tag   
)
template<class Cursor >
Cursor::reference_type cpplinq::linq_last_ ( Cursor  c,
random_access_cursor_tag   
)
template<class Cursor >
Cursor::element_type cpplinq::linq_last_or_default_ ( Cursor  c,
onepass_cursor_tag   
)
template<class Cursor >
Cursor::element_type cpplinq::linq_last_or_default_ ( Cursor  c,
forward_cursor_tag   
)
template<class Cursor >
Cursor::element_type cpplinq::linq_last_or_default_ ( Cursor  c,
random_access_cursor_tag   
)
template<class Iter >
iter_range<Iter> cpplinq::make_range ( Iter  start,
Iter  finish 
)
template<class Iter >
std::enable_if< std::is_convertible<Iter, use_default_iterator_operators>::value, bool >::type cpplinq::operator!= ( const Iter &  it,
const Iter &  it2 
)
template<class Iter >
std::enable_if< std::is_convertible<Iter, use_default_iterator_operators>::value, Iter >::type cpplinq::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 cpplinq::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 cpplinq::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 cpplinq::operator<= ( const Iter &  it,
const Iter &  it2 
)
template<class Iter >
std::enable_if< std::is_convertible<Iter, use_default_iterator_operators>::value, bool >::type cpplinq::operator> ( const Iter &  it,
const Iter &  it2 
)
template<class Iter >
std::enable_if< std::is_convertible<Iter, use_default_iterator_operators>::value, bool >::type cpplinq::operator>= ( const Iter &  it,
const Iter &  it2 
)