The USeriesType struct holds extra methods for series datatypes.
More...
|
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.
|
|
The USeriesType struct holds extra methods for series datatypes.
◆ append
Append a value to the series.
- Parameters
-
buf | Series buffer to append to. |
val | Value to append. |
- Returns
- UR_OK/UR_THROW
◆ change
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. |
◆ find
Search for a value in the series.
- Parameters
-
si | Series iterator. |
val | Value to find. |
opt | Options. |
- Returns
- Zero-based index of val in series or -1 if not found.
◆ insert
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
◆ pick
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. |
◆ poke
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. |
◆ remove
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. |
◆ reverse
void(* USeriesType::reverse) (const USeriesIterM *si) |
Reverse series elements.
- Parameters
-
si | Series buffer and slice to reverse. |
The documentation for this struct was generated from the following files: