Boron 2.1.0
USeriesType Struct Reference

The USeriesType struct holds extra methods for series datatypes. More...

Data Fields

void(* pick )(const UBuffer *buf, UIndex n, UCell *res)
 Get a single value from the series.
 
void(* poke )(UBuffer *buf, UIndex n, const UCell *val)
 Replace a single value in the series.
 
int(* append )(UThread *, UBuffer *buf, const UCell *val)
 Append a value to the series.
 
int(* insert )(UThread *, UBuffer *buf, UIndex index, const UCell *val, UIndex part)
 Insert a value into the series.
 
int(* change )(UThread *, USeriesIterM *si, const UCell *val, UIndex part)
 Change part of the series.
 
void(* remove )(UThread *, USeriesIterM *si, UIndex part)
 Remove part of the series.
 
void(* reverse )(const USeriesIterM *si)
 Reverse series elements.
 
int(* find )(UThread *, const USeriesIter *si, const UCell *val, int opt)
 Search for a value in the series.
 

Detailed Description

The USeriesType struct holds extra methods for series datatypes.

Field Documentation

◆ append

int(* USeriesType::append) (UThread *, UBuffer *buf, const UCell *val)

Append a value to the series.

Parameters
bufSeries buffer to append to.
valValue to append.
Returns
UR_OK/UR_THROW

◆ change

int(* USeriesType::change) (UThread *, USeriesIterM *si, const UCell *val, UIndex part)

Change part of the series.

Parameters
siSeries buffer and change position. Si.end is ignored.
valReplacement value.
partRemove this number of elements and insert replacement. If zero then simply overwrite with val.

◆ find

int(* USeriesType::find) (UThread *, const USeriesIter *si, const UCell *val, int opt)

Search for a value in the series.

Parameters
siSeries iterator.
valValue to find.
optOptions.
Returns
Zero-based index of val in series or -1 if not found.

◆ insert

int(* USeriesType::insert) (UThread *, UBuffer *buf, UIndex index, const UCell *val, UIndex part)

Insert a value into the series.

Parameters
bufSeries buffer to insert into.
indexPosition in buf.
valValue to append.
partLimit number of val elements. This will be INT32_MAX by default.
Returns
UR_OK/UR_THROW

◆ pick

void(* USeriesType::pick) (const UBuffer *buf, UIndex n, UCell *res)

Get a single value from the series.

Parameters
bufSeries buffer to pick from.
nZero-based index of element to pick.
resResult of picked value.

◆ poke

void(* USeriesType::poke) (UBuffer *buf, UIndex n, const UCell *val)

Replace a single value in the series.

Parameters
bufSeries buffer to modify.
nZero-based index of element to replace.
valValue to replace.

◆ remove

void(* USeriesType::remove) (UThread *, USeriesIterM *si, UIndex part)

Remove part of the series.

Parameters
siSeries buffer and position. Si.end is ignored.
partNumber of element to remove.

◆ reverse

void(* USeriesType::reverse) (const USeriesIterM *si)

Reverse series elements.

Parameters
siSeries buffer and slice to reverse.

The documentation for this struct was generated from the following files: