Previous: Relations between objects
Up: Relations between objects
Next: User's Links
Previous Page: Relations between objects
Next Page: User's Links
Pointers are handled by DSPACK and are correctly converted by the I/O system. Pointers are are only allowed as elements of structures - the item name must start from a '*' and the item description must be the name of the object to which the pointer should point. Only pointers to valid DSPACK objects are allowed. Pointers to elements of objects are illegal (the I/O system will make them point to the beginning of the structure anyway). Pointers are not followed by the I/O system - it is the user's responsibility to save all objects needed. (however - see 'user links').
One consequence of the above limitations (imposed by the I/O system) is that the pointers may be converted at will to indexes (entry numbers). The user callable routine
ioldflag = ids_pnt_conv(newflag)
instructs DSPACK to convert pointers in all subsequent 'GET' calls into indexes if newflag=1 and to convert indexes to pointers if newflag=2. The routine returns the status of the 'flag' before the call. The conversion is performed following all pointers - this means that the 'GET' call will return an object with valid pointers or indexes and all structures below have valid pointers/indexes. If the object contains pointers already the conversion routine leaves them as they are - the same is true if conversion to indexes is attempted on an object already converted. As DSPACK objects are contiguous in memory, a pointer returned by DSPACK may be treated as a pointer to an array of structures and the index is just the array index. On the other hand if the structures are defined in a 'tree' with one object containing pointers to everything which is needed - then getting the pointer to this single object is the only DSPACK call required in order to get access to all other objects.