This documentation describes the Prokee module interface.
Static Methods:
create1d
CRegion *region::create1d(uint16_t x,uint16_t width)
create2d
CRegion *region::create2d(uint16_t x,uint16_t y,uint16_t width,uint16_t height)
createkd
CRegion *region::createkd(uint16_t *x,uint16_t k)
destroy
void region::destroy(CRegion *reg)
add1d
void region::add1d(CRegion **r,uint16_t p,uint16_t length)
sub1d
void region::sub1d(CRegion **r,uint16_t p,uint16_t length)
add2d
void region::add2d(CRegion **r,uint16_t x,uint16_t y,uint16_t width,uint16_t height)
sub2d
void region::sub2d(CRegion **r,uint16_t x,uint16_t y,uint16_t width,uint16_t height)
add
void region::add(CRegion **r,CRegion *s)
sub
void region::sub(CRegion **r,CRegion *s)
walk1d
void region::walk1d(CRegion *reg,uint16_t length,void(*callback)(uint16_t p,void *context),void *context)
walk2d
void region::walk2d(CRegion *reg,uint16_t width,uint16_t height,void(*callback)(uint16_t x,uint16_t y,void *context),void *context)
walk
void region::walk(CRegion *reg,uint16_t *dim,uint16_t *c,uint16_t d,uint16_t cd,void(*callback)(uint16_t *c,void *context),void *context)
move1d
void region::move1d(CRegion *reg,int16_t m)
move2d
void region::move2d(CRegion *reg,int16_t mx,int16_t my)
move
void region::move(CRegion *reg,int16_t *m,uint16_t d,uint16_t cd)
getRange
bool region::getRange(CRegion *reg,uint16_t d,uint16_t *b,uint16_t *e)
isEmpty
bool region::isEmpty(CRegion *reg)
Motivation
Static Methods
create_empty
Creates a new empty region.
Signature:
CRegion *region::create_empty()
Return value:Pointer to a
CRegion.
create_full
Creates a new "full" region.
Signature:
CRegion *region::create_full()
Return value:Pointer to a
CRegion.
create1d
Creates a new region from the given section.
Signature:
CRegion *region::create1d(uint16_t x,uint16_t width)
Parameters:
| uint16_t | x | | x-position of the region. |
| uint16_t | width | | The width of the region. |
Return value:Pointer to a
CRegion.
create2d
Creates a new region from the given rectangle.
Signature:
CRegion *region::create2d(uint16_t x,uint16_t y,uint16_t width,uint16_t height)
Parameters:
| uint16_t | x | | x-position of the region. |
| uint16_t | y | | y-position of the region. |
| uint16_t | width | | The width of the region. |
| uint16_t | height | | The height of the region. |
Return value:Pointer to a
CRegion.
createkd
Create a new region from the given k-dimensional cube.
Signature:
CRegion *region::createkd(uint16_t *x,uint16_t k)
Parameters:
| uint16_t * | x | | coordinates/dimensions of k-dimensional cube. |
| uint16_t | k | | dimensions. |
Return value:Pointer to a
CRegion.
destroy
Destroys a region.
Signature:
void region::destroy(CRegion *reg)
Parameters:
| CRegion * | reg | [IN/OUT] | Pointer to a CRegion. |
add1d
Adds a region.
Signature:
void region::add1d(CRegion **r,uint16_t p,uint16_t length)
Parameters:
| CRegion ** | r | [IN/OUT] | Pointer to a CRegion. |
| uint16_t | p | | start-position of the region. |
| uint16_t | length | | The length of the region. |
sub1d
Subtracts a region.
Signature:
void region::sub1d(CRegion **r,uint16_t p,uint16_t length)
Parameters:
| CRegion ** | r | [IN/OUT] | Pointer to a CRegion. |
| uint16_t | p | | start-position of the region. |
| uint16_t | length | | The length of the region. |
add2d
Adds a region.
Signature:
void region::add2d(CRegion **r,uint16_t x,uint16_t y,uint16_t width,uint16_t height)
Parameters:
| CRegion ** | r | [IN/OUT] | Pointer to a CRegion. |
| uint16_t | x | | x-position of the region. |
| uint16_t | y | | y-position of the region. |
| uint16_t | width | | The width of the region. |
| uint16_t | height | | The height of the region. |
sub2d
Subtracts a region.
Signature:
void region::sub2d(CRegion **r,uint16_t x,uint16_t y,uint16_t width,uint16_t height)
Parameters:
| CRegion ** | r | [IN/OUT] | Pointer to a CRegion. |
| uint16_t | x | | x-position of the region. |
| uint16_t | y | | y-position of the region. |
| uint16_t | width | | The width of the region. |
| uint16_t | height | | The height of the region. |
add
Adds a region.
Signature:
void region::add(CRegion **r,CRegion *s)
Parameters:
| CRegion ** | r | [IN/OUT] | Pointer to a CRegion. |
| CRegion * | s | [IN] | Pointer to a CRegion. |
sub
Subtracts a region.
Signature:
void region::sub(CRegion **r,CRegion *s)
Parameters:
| CRegion ** | r | [IN/OUT] | Pointer to a CRegion. |
| CRegion * | s | [IN] | Pointer to a CRegion. |
walk1d
Walks through a region.
Signature:
void region::walk1d(CRegion *reg,uint16_t length,void(*callback)(uint16_t p,void *context),void *context)
Parameters:
| CRegion * | reg | [IN/OUT] | Pointer to a CRegion. |
| uint16_t | length | | |
void(*callback) ( uint16_t p, void *context ) | [IN] |
callback function.
Parameters
p: context:
|
| void * | context | | |
walk2d
Walks through a region.
Signature:
void region::walk2d(CRegion *reg,uint16_t width,uint16_t height,void(*callback)(uint16_t x,uint16_t y,void *context),void *context)
Parameters:
| CRegion * | reg | [IN/OUT] | Pointer to a CRegion. |
| uint16_t | width | | |
| uint16_t | height | | |
void(*callback) ( uint16_t x, uint16_t y, void *context ) | [IN] |
callback function.
Parameters
|
| void * | context | | |
walk
Walks through a region.
Signature:
void region::walk(CRegion *reg,uint16_t *dim,uint16_t *c,uint16_t d,uint16_t cd,void(*callback)(uint16_t *c,void *context),void *context)
Parameters:
| CRegion * | reg | [IN/OUT] | Pointer to a CRegion. |
| uint16_t * | dim | | |
| uint16_t * | c | | |
| uint16_t | d | | |
| uint16_t | cd | | |
void(*callback) ( uint16_t *c, void *context ) | [IN] |
callback function.
Parameters
c: context:
|
| void * | context | | |
move1d
Moves a region.
Signature:
void region::move1d(CRegion *reg,int16_t m)
Parameters:
| CRegion * | reg | [IN/OUT] | Pointer to a CRegion. |
| int16_t | m | | |
move2d
Moves a region.
Signature:
void region::move2d(CRegion *reg,int16_t mx,int16_t my)
Parameters:
| CRegion * | reg | [IN/OUT] | Pointer to a CRegion. |
| int16_t | mx | | |
| int16_t | my | | |
move
Moves a region.
Signature:
void region::move(CRegion *reg,int16_t *m,uint16_t d,uint16_t cd)
Parameters:
| CRegion * | reg | [IN/OUT] | Pointer to a CRegion. |
| int16_t * | m | | |
| uint16_t | d | | |
| uint16_t | cd | | |
getRange
Gets the bounding box/interval of the region.
Signature:
bool region::getRange(CRegion *reg,uint16_t d,uint16_t *b,uint16_t *e)
Parameters:
| CRegion * | reg | [IN/OUT] | Pointer to a CRegion. |
| uint16_t | d | | |
| uint16_t * | b | | |
| uint16_t * | e | | |
print (version 1)
Prints a region.
Signature:
void region::print(CRegion *reg)
Parameters:
| CRegion * | reg | [IN/OUT] | Pointer to a CRegion. |
print (version 2)
Prints a region.
Signature:
void region::print(FILE *f,CRegion *reg,unsigned int d)
Parameters:
| FILE * | f | | file handle |
| CRegion * | reg | [IN/OUT] | Pointer to a CRegion. |
| unsigned int | d | | identation, set this to 0. |
isEmpty
Tests if a region is empty.
Signature:
bool region::isEmpty(CRegion *reg)
Parameters:
| CRegion * | reg | [IN/OUT] | Pointer to a CRegion. |
Return value:Returns
true, if the region is empty or
false otherwise.
copyCRegion
Copies a region.
Signature:
CRegion *region::copyCRegion(CRegion *reg)
Parameters:
| CRegion * | reg | [IN/OUT] | Pointer to a CRegion. |
Return value:Pointer to a
CRegion.