coveo::linq
Implementation of .NET-like LINQ operators in C++
Modules
LINQ expressions

Modules

 LINQ expression entry points
 Functions to start a LINQ expression.
 
 LINQ operator chaining
 How to chain LINQ operators into an expression.
 
 LINQ operators
 Information and reference of LINQ operators.
 

Detailed Description

LINQ expressions are comprised of three distinct parts: an entry point, one or more operators and a glue operator to chain those elements together. The entry point provides the initial sequence on which to operate and each LINQ operator in turn applies a change to that sequence - be it sorting, filtering, etc.

Here is an example with all elements. Here, we filter a sequence of numbers to only keep those above 20, then we order them by numerical value.

const int NUMBERS[] = { 42, 23, 11, 66, 7 };
using namespace coveo::linq;
auto seq = from(NUMBERS)
| where([](int i) { return i >= 20; })
| order_by([](int i) { return i; });
// seq contains 23, 42, 66

coveo::linq::from() is the usual entry point for a LINQ expression, but there are a few others. coveo::linq::operator|() is used to chain the LINQ operators together. As for LINQ operators, there are too many of them to list them here. For more information, see: