Skip to content

Operators

Luis Llamas edited this page Apr 24, 2019 · 11 revisions

Operator First

Emits the first item in a sequence, when the sequence is complete.

First()

To emit as soon as received use TakeFirst()

Operator Last

Emits the last item in a sequence, when the sequence is complete.

First()

To emit as soon as received use TakeLast()

Last()

Operator Distinct

Emits the item received if is not equal to the last item received.

Distinct() 

Operator Where

Emit the item received if it satisfy a condition

Where(ReactiveCondition<T> condition)

Operator Select

Emit the item received transformed by a function

Select(ReactiveFunction<T> function)

Operator ForEach

Performs an action each time it received an item

ForEach(ReactiveAction<T> function)

Operator If

Performs an action each time if the item received satisfy a condition

If(ReactiveCondition<T> condition, ReactiveAction<T> function)

Operator Cast

Cast the received item

Cast()

Operator Map

Emit the item received transformed by a function to another type of data

Map(ReactiveMap<Torig, Tdest> map)

Operator Skip

Skips N items received

Skip(size_t num)

Operator SkipUntil

Skips until received item satisfy a condition

SkipUntil(ReactiveCondition<T> condition)

Operator SkipWhile

Skips while received item satisfy a condition

SkipWhile(ReactiveCondition<T> condition)

Operator Take

Emits the N first items received

Take(size_t num)

Operator TakeAt

Emits the N item received

TakeAt(size_t index)

Operator TakeFirst

Emits the first item received

TakeFirst()

Operator TakeLast

Emits the last item received

TakeLast()

Operator TakeUntil

Emits until received item satisfy a condition

TakeUntil(ReactiveCondition<T> condition)

Operator TakeWhile

Emits while received item satisfy a condition

TakeWhile(ReactiveCondition<T> condition)

Operator Timestamp

Emits timestamp when a item is received

Millis version

Millis()

Micros version

Micros()

Operator Elapsed

Emits time elapsed since last item is received

Millis version

ElapsedMillis()

Micros version

ElapsedMicros()

Operator Repeat

Repeat a sequence N times

Repeat(size_t N)

Operator Loop

Loops a sequence forever

Loop()

Operator NotReset

Breaks the reset signal upwards

NotReset()

Operator Split

Split an string using a separator

Split(char separator = ',')

Operator Buffer

WIP

Buffer()

Operator Join

Join received items using a separator

Join(char separator = ',')

Operator ParseInt

Parse the received item to Int

ParseInt()

Operator ParseFloat

Parse the received item to Float

ParseFloat()
Clone this wiki locally