Boron 0.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

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

Get a single value from the series.

Parameters:
buf Series buffer to pick from.
n Zero-based index of element to pick.
res Result of picked value.

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

Replace a single value in the series.

Parameters:
buf Series buffer to modify.
n Zero-based index of element to replace.
val Value to replace.

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

Append a value to the series.

Parameters:
buf Series buffer to append to.
val Value to append.
Returns:
UR_OK/UR_THROW

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

Insert a value into the series.

Parameters:
buf Series buffer to insert into.
index Position in buf.
val Value to append.
part Limit number of val elements. This will be INT32_MAX by default.
Returns:
UR_OK/UR_THROW

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

Change part of the series.

Parameters:
si Series buffer and change position. Si.end is ignored.
val Replacement value.
part Remove this number of elements and insert replacement. If zero then simply overwrite with val.

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

Remove part of the series.

Parameters:
si Series buffer and position. Si.end is ignored.
part Number of element to remove.

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

Reverse series elements.

Parameters:
si Series buffer and slice to reverse.

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

Search for a value in the series.

Parameters:
ser Series cell.
val Value to find.
opt Options.
Returns:
Zero-based index of val in series or -1 if not found.


The documentation for this struct was generated from the following files:
Generated on 27 Jan 2012 by Doxygen 1.5.1