comp.lang.ada
 help / color / mirror / Atom feed
* Dynamically reallocated buffer
@ 2007-06-01  6:33 Maciej Sobczak
  2007-06-01  7:15 ` anon
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Maciej Sobczak @ 2007-06-01  6:33 UTC (permalink / raw)


I need a dynamically reallocated buffer of bytes, which I can extend
at run-time by appending new fragments to the whole buffer. The
purpose of the buffer is to pass it later to the subprogram that
writes it "en bloc" to some external device.

For those of you who know C++ I need something like:

vector<unsigned char> buffer;
// fill the buffer with push_back or insert at end
// ...
write_to_device(&buffer[0], buffer.size());

The problem is that Ada.Containers.Vectors does not provide the
necessary guarantees to be any useful in this context.

What are your suggestions?

--
Maciej Sobczak
http://www.msobczak.com/




^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2007-06-05  0:25 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-06-01  6:33 Dynamically reallocated buffer Maciej Sobczak
2007-06-01  7:15 ` anon
2007-06-01 13:04   ` Maciej Sobczak
2007-06-01  7:30 ` Dmitry A. Kazakov
2007-06-01 13:08   ` Maciej Sobczak
2007-06-01 11:32 ` Georg Bauhaus
2007-06-01 14:49 ` Matthew Heaney
2007-06-02 12:38   ` Stephen Leake
2007-06-03  9:52     ` Georg Bauhaus
2007-06-05  0:25       ` Stephen Leake

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox