Did you know ... Search Documentation:
Pack odf_sheet -- prolog/ods/datasource.pl
PublicShow source

This module represents rectangular areas in a sheet and can reason about such regions.

 ds_sheet(+DS, -Sheet) is det
True when DS is on Sheet.
 ds_size(+DS, -Columns, -Rows) is det
True when Columns and Rows represent the size of a datasource
 ds_cell_count(+DS, -Count) is det
True when Count is the number of cells in DS.
 ds_side(?Which, ?DS, ?Value)
True when Value is the row/column of the indicated side of the datasource. Which is one of left, right, top or bottom.
 ds_empty(+DS) is semidet
True if DS is empty (contains no cells)
 ds_id(+DS, -ID) is det
ds_id(-DS, +ID) is det
True when ID is an identifier for DS
 ds_inside(+DS, ?X, ?Y) is nondet
True when X,Y is inside the datasource
 ds_adjacent(+DS1, -Rel, +DS2) is semidet
True if DS1 is above, below left_of or right_of DS2.
 ds_intersection(+DS1, +DS2, -DS) is semidet
True when the intersection of DS1 and DS2 is DS. Fails if the two do not intersect.
 ds_union(+DS1, +DS2, -DS) is det
True when the union of DS1 and DS2 is DS.
 ds_union(+DSList, -DS) is det
True when DS is the union of all datasources
 ds_intersections(+ListOfDS, -Pairs) is semidet
True when Pairs is a non-empty list of pairs of datasources with a non-empty intersection.
To be done
- Can be more efficient
 ds_subtract(+Subtract, +From, -Remainder:list(pair(where-datasource))) is det
Remainder is a list of pairs of the form <location>-datasource that describes the area of From that is not covered by Subtract. Defined locations are:
all
From is unaffected
top and bottom
Subtract removes a set of rows
left and right
Subtract removes a set of columns $ top/left, top/middle, top/right, middle/left, middle/right, bottom/left, bottom/middle and bottom/right : Subtract is enclosed in From

Empty datasources are removed from the result set. E.g., if Subtract removes the top N rows of From, Remainder is a list holding only bottom - DSRem.

 ds_row_slice(+DS, ?Offset, ?Slice) is det
True when Slice is a row from DS at offset Offset. Offsets are 0-based.
 ds_unbounded_row_slice(+DS, +Offset, -Slice) is det
True when Slice is a row from DS at offset Offset. Offsets are 0-based. It is allowed for Slice to be outside the range of the datasouce.
 ds_column_slice(+DS, ?Offset, ?Slice) is det
True when Slice is a column from DS at offset Offset. Offsets are 0-based.
 ds_row_slice(+DS, +Offset, +Height, -Slice) is det
True when Slice is a horizontal slice from DS, starting at Offset (0-based, relative to DS) and being rows high.
 ds_column_slice(+DS, +Offset, +Width, -Slice) is det
True when Slice is a vertical slice from DS, starting at Offset (0-based, relative to DS) and being Columns wide.
 ds_unbounded_column_slice(+DS, +Offset, -Slice) is det
True when Slice is a column from DS at offset Offset. Offsets are 0-based. It is allowed for Slice to be outside the range of the datasouce.
 ds_grow(+DS0, +Amount, -DS)

Undocumented predicates

The following predicates are exported, but not or incorrectly documented.

 ds_id(Arg1, Arg2, Arg3)