Skip to content

Operators

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

First

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

First()

To emit as soon as received use TakeFirst()

Last

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

First()

To emit as soon as received use TakeLast()

Last()

Distinct

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

Distinct() 

Where

Emit the item received if it satisfy a condition

Where(ReactiveCondition<T> condition)

Select

Emit the item received transformed by a function

Select(ReactiveFunction<T> function)

ForEach

Performs an action each time it received an item

ForEach(ReactiveAction<T> function)

If

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

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

Cast

Cast the received item

Cast()

Map

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

Map(ReactiveMap<Torig, Tdest> map)

Skip

Skips N items received

Skip(size_t num)

SkipUntil

Skips until received item satisfy a condition

SkipUntil(ReactiveCondition<T> condition)

SkipWhile

Skips while received item satisfy a condition

SkipWhile(ReactiveCondition<T> condition)

Take

Emits the N first items received

Take(size_t num)

TakeAt

Emits the N item received

TakeAt(size_t index)

TakeFirst

Emits the first item received

TakeFirst()

TakeLast

Emits the last item received

TakeLast()

TakeUntil

Emits until received item satisfy a condition

TakeUntil(ReactiveCondition<T> condition)

TakeWhile

Emits while received item satisfy a condition

TakeWhile(ReactiveCondition<T> condition)

Timestamp

Emits timestamp when a item is received

Millis version

Millis()

Micros version

Micros()

Elapsed

Emits time elapsed since last item is received

Millis version

ElapsedMillis()

Micros version

ElapsedMicros()

Repeat

Repeat a sequence N times

Repeat(size_t N)

Loop

Loops a sequence forever

Loop()

NotReset

Breaks the reset signal upwards

NotReset()

Split

Split an string using a separator

Split(char separator = ',')

Buffer

WIP

Buffer()

Join

Join received items using a separator

Join(char separator = ',')

ParseInt

Parse the received item to Int

ParseInt()

ParseFloat

Parse the received item to Float

ParseFloat()
Clone this wiki locally