next up previous contents
Next: Interface and Efficiency Issues Up: Tasks involving Record Iteration Previous: Some Language Details for

Limitations on Record Iter Use

The internal state of iterators on a record is ill-defined after record modifications. Thus, if one wishes to perform a record modification such as a TRY_Abstract_Record::insert() or erase(), then the iterator driving the loop may not be able to safely iterate itself on the next loop iteration. Once the Fortran API implementation for Trybos is better defined, safe iterators should be possible to be implemented. Until then, as with YBOS, the programmer should not expect record iterators to maintain their value after any record modifications occur.

In order to work around such limitations in the meantime, a number of additional components will be included in a near-future version of Trybos. Several methods will be provided to replace loops with common operations on all specific Banks in a record, such as TRY_Abstract_Record::remove(name). The remove() method will replace both the loop over banks and the erase() operation, erasing all Banks with the given name. Also, a class is planned for a future Trybos release to define sets of Bank families, TRY_Bank_Name_Set. More alternative forms of common methods will be provided which operate on banks with a name matching any name in given the name set.



Robert Kennedy
Mon Jul 28 13:23:28 CDT 1997