Login | Register
My pages Projects Community openCollabNet

Discussions > users > AI302.Containers.Indefinite_Vectors questions

charles
Discussion topic

Back to topic list

AI302.Containers.Indefinite_Vectors questions

Reply

Author matthewjheaney
Full name Matthew Heaney
Date 2004-05-12 07:37:41 PDT
Message William asks:

Question 1:

What is supposed to be the different between the Generic_Iteration() and

Generic_Constant_Iteration() functions?

They appear to be (at least now) implemented the same.

Matt replies:

Yes, they are identical, except for the signature of generic formal
procedure Process. In Generic_Iteration, the generic formal subprogram
is declared like this:

   with procedure Process (E : in out ET) is <>;

and in Generic_Constant_Iteration, it's:

   with procedure Process (E : in ET) is <>;


William asks:

Question 2:

Also, why do some passive iteration process() functions get
cursor_type's
(as in AI302.Containers.Ind​efinite_Hashed_Maps)​ as argument and others
(as
in AI302.Containers.Ind​efinite_Vectors) get the actual element? It seems
to
make more sense to have the single element process() functions get an
Iterator_type rather than the element itself.

Will one approach or the other be preferred or will they remain
"inconsistent"?


Matt replies:

That difference was a consequence of the fact that the vector didn't
originally have a cursor. Without a cursor, you have to do something
else, which is to pass the element directly.

However, during the meeting in Phoenix, the ARG requested that we add
cursors to the vector container too, and so now all the passive
iterators are identical.


-Matt



--------------------​--------------------​--------------------​---------
To unsubscribe, e-mail: users-unsubscribe@ch​arles.tigris.org
For additional commands, e-mail: users-help at charles dot tigris dot org

« Previous message in topic | 1 of 1 | Next message in topic »

Messages

Show all messages in topic

AI302.Containers.Indefinite_Vectors questions matthewjheaney Matthew Heaney 2004-05-12 07:37:41 PDT
Messages per page: