From: Sébastien <seb.morand@gmail.com>
Subject: Ada.Containers.Vectors Update_Element issue
Date: Tue, 13 May 2008 17:26:40 +0000
Date: 2008-05-13T17:26:40+00:00 [thread overview]
Message-ID: <g0cj0n$i6o$1@registered.motzarella.org> (raw)
Hi,
I'm trying to use the Ada.Containers.Vectors librairies, but I don't
know how to update element using a context.
I have a list of element and I want to use Update_Element with a
procecedure Update_Element_Process, however I want to add static
argument to the Update_Element_Process.
This could be something like :
procedure My_Update(c: in out context; Element: in out Element_Type);
and then
procedure Update_All(c: in out context) is
begin
my_list.Update_Element(1, My_Update'Access);
end;
Because My_Update is not exacly the type Update_Element_Process it's nor
working.
type Update_Element_Process is
access procedure (Element : in out Element_Type);
Note that generic doesn't help : they give me a bug error compilation
because of Address invalid of the generic instance.
I tried this:
generic
c: Context;
procedure My_Update_Generic(Element: in out Element_Type);
procedure Update_All(c: in out context) is
procedure My_Update is new My_Update_Generic(c => c);
begin
my_list.Update_Element(1, My_Update'Access);
end;
That's not working and I can understand it ;-) No dynamical address
since the generic will instancied at runtime or something like that ...
Thanks by advance if you have any clue to update a vector list using
this way (because I could : get element, then update, then replace, but
it's going to be really slower ...)
S�bastien
next reply other threads:[~2008-05-13 17:26 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-13 17:26 Sébastien [this message]
2008-05-13 17:55 ` Ada.Containers.Vectors Update_Element issue Adam Beneschan
2008-05-14 15:01 ` Sébastien
2008-05-14 15:17 ` Adam Beneschan
2008-05-14 18:21 ` Sébastien
2008-05-14 21:25 ` Matthew Heaney
2008-05-14 21:33 ` Adam Beneschan
2008-05-17 8:13 ` Ludovic Brenta
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox