If I were implementing this in C++, I would have the result object
return a different generic STL iterator (forward, random access, etc.)
depending on how I wanted to access the data. Perhaps you could emulate
this in C. I generally don't like the one-interface-fits-all approach;
you get a much cleaner and extensible interface if you introduce a type
for each class of behavior being modeled.
T.
--
Timothy H. Keitt
National Center for Ecological Analysis and Synthesis
735 State Street, Suite 300, Santa Barbara, CA 93101
Phone: 805-892-2519, FAX: 805-892-2510
http://www.nceas.ucsb.edu/~keitt/