HAllObj (see figure 5.15) performs a loop over all iconic objects of a specified input iconic parameter and returns their database key.
Hkey obj_key; Hrlregion *region; Himage image; INT4_8 index; ... HAllObj(proc_handle,1,obj_key,index) { HGetFDRL(proc_handle,obj_key,®ion); HGetDImage(proc_handle,obj_key,IMAGE_INDEX,&image); }
Figure 5.16: Application of HAllObj: Access the domain (area of definition) and the first gray value channel of all iconic objects of the first input iconic parameter.
Within the loop, all iconic objects contained in the input iconic parameter with the index13) par_num are accessed one by one. index is set to the index of the current iconic object to be processed and obj_key is set to the corresponding database key. Thus, using HAllObj is equivalent to programming an explicit loop over all iconic objects contained in a parameter and determining the database keys via HGetObj, see also figure 5.3. Figure 5.16 shows an application of HAllObj.
| 13) So in contrast to the routines
described in section “Loop Macros”, HAllObj allows
to specify the desired parameter by its index.
|