From: <jim...@ph...> - 2003-07-05 17:19:39
|
Although ClassBuilder is not documented very well, the iterator stuff is documented quite good, see 3.5 of the getting started document. It is allowed to have multiple cursors open at the same time and more important it is save to alter the list while iterating it. Unlike the STL stuff you can modify the list while you are iterating it, with the iterators. With most iterators there are certain modifications that are unsafe while you are iterating, with the ClassBuilder iterators it isn't. This is the reason of the static stuff. Internally a static list is kept of all open iterators per relation ship type. Thus a relation A <>-->> B is one static list while A <>-->> C is another. When for example an B object is removed or replaced from its relationship with A (see chapter 9 of the getting started document for more about object replacement), all open iterators A <>-->> B are verified, if their cursor is pointing to the B object. It their cursor is pointing to the B object then the cursor is updated. It is possible to keep the code out, just alter the CB...h files to make a few macro's empty and as a result no code will be inserted. But the iterator stuff, does not make the object sizes bigger and a good compiler/linker will remove unused code, so I do not know if it is worth to edit the include files. Personally I always use the iterators, because of there ease of use, especially with the Insert Iterators option with the ClassBuilder code editor and of its safety. Only in a few exceptional cases I go for direct use of GetFirst/GetNext to traverse a relation. It is not directly possible to alter the case, but perhaps a Add-in is possible, that traverse all classes and methods and alters the case of the methods. Jimmy Venema |