Bitmap Arrays

A bitmap array is an array of identically-ranged bitmaps, indexed by an integer value. They are initialised using two ranges, one for the range of each bitmap, and one providing the range of indices for the array.

Typically bitmap arrays are used for collections of privileges, where each element of the collection is indexed by something like a role_id.

The following functions comprise the Veil bitmap arrays API:

veil_init_bitmap_array(text, text, text)

function veil_init_bitmap_array(text, text, text) returns bool
Creates, or resets the ranges of, a bitmap array.

veil_clear_bitmap_array(text)

function veil_clear_bitmap_array(text) returns bool
Clear all bits in a bitmap array

veil_bitmap_from_array(text, text, int4)

function veil_bitmap_from_array(text, text, int4) returns text
Generate a reference to a specific bitmap in a bitmap array

veil_bitmap_array_testbit(text, int4, int4)

function veil_bitmap_array_testbit(text, int4, int4) returns bool
Test a specific bit in a bitmap array.

veil_bitmap_array_setbit(text, int4, int4)

function veil_bitmap_array_setbit(text, int4, int4) returns bool
Set a specific bit in a bitmap array.

veil_bitmap_array_clearbit(text, int4, int4)

function veil_bitmap_array_clearbit(text, int4, int4) returns bool
Clear a specific bit in a bitmap array.

veil_union_from_bitmap_array(text, text, int4)

function veil_union_from_bitmap_array(text, text, int4) returns bool
Union a bitmap with a specified bitmap from an array, with the result in the bitmap. This is a faster shortcut for:

veil_bitmap_union(<bitmap>, veil_bitmap_from_array(<bitmap_array>, <index>)) .

veil_intersect_from_bitmap_array(text, text, int4)

function veil_intersect_from_bitmap_array(text, text, int4) returns bool
Intersect a bitmap with a specified bitmap from an array, with the result in the bitmap. This is a faster shortcut for:

veil_bitmap_intersect(<bitmap>, veil_bitmap_from_array(<bitmap_array>, <index>)) .

veil_bitmap_array_bits(text, int4)

function veil_bitmap_array_bits(text, int4) returns setof int4
Show all bits in the specific bitmap within an array. This is primarily intended for interactive use when developing and debugging Veil-based systems.

veil_bitmap_array_arange(text)

function veil_bitmap_array_arange(text) returns veil_range_t
Show the range of array indices for the specified bitmap array. Primarily for interactive use.

veil_bitmap_array_brange(text)

function veil_bitmap_array_brange(text) returns veil_range_t
Show the range of all bitmaps in the specified bitmap array. Primarily for interactive use.

Next: Bitmap Hashes


Generated on Fri Mar 12 08:38:46 2010 for Veil by  doxygen 1.5.6