Updated iRel.h with iterator support
Tim Tautges
tautges at mcs.anl.gov
Fri Feb 5 10:09:42 CST 2010
Hi all,
Attached is an updated header for iRel with iterator support. There's one very important assumption I'm making which
I'm not sure is valid, and which I need input on: can one use an iterator to recover the set it's iterating? Currently
I don't see such a function. The result is that very few iterator-based functions actually make sense for iRel, namely
2 of them: getEntSetIterRelation and getEntArrSetIterArrRelation.
One other side effect of this change, and one which impacts both iGeom and iMesh, is that we need an
iBase_EntityIterator type, which before now we didn't have. That shouldn't be a terribly difficult change for most
implementations.
And, just writing the signatures for these functions reminded me just how narrowly targeted these modifications are; for
example, nowhere in our interfaces do we consider the notion of iterating over sets stored in a set. Thus,
iterator-based functions in iRel will not be useful here. It's also not clear what the semantics are for creating an
iterator over a set that contains sets. Does that iterator iterate the entities contained in any sets?
You might ask who would ever want to do such a thing, but that's exactly the question we should avoid asking when
designing interfaces.
- tim
--
================================================================
"You will keep in perfect peace him whose mind is
steadfast, because he trusts in you." Isaiah 26:3
Tim Tautges Argonne National Laboratory
(tautges at mcs.anl.gov) (telecommuting from UW-Madison)
phone: (608) 263-8485 1500 Engineering Dr.
fax: (608) 263-4499 Madison, WI 53706
-------------- next part --------------
A non-text attachment was scrubbed...
Name: iRel_new.h
Type: text/x-chdr
Size: 21432 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/tstt-interface/attachments/20100205/1244ea86/attachment.h>
More information about the tstt-interface
mailing list