From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,38c827f7e800d317 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-06-27 07:49:06 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: mheaney@on2.com (Matthew Heaney) Newsgroups: comp.lang.ada Subject: Re: conversion Date: 27 Jun 2003 07:49:05 -0700 Organization: http://groups.google.com/ Message-ID: <1ec946d1.0306270649.486e75b3@posting.google.com> References: NNTP-Posting-Host: 66.162.65.162 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1056725345 20111 127.0.0.1 (27 Jun 2003 14:49:05 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 27 Jun 2003 14:49:05 GMT Xref: archiver1.google.com comp.lang.ada:39818 Date: 2003-06-27T14:49:05+00:00 List-Id: "Andrew" wrote in message news:... > > I'm not real sure whether to extend on the functionality of ada.text_io or > to create new > functionality from the stream package. Any recommendations? Has anyone > done > something like this? GNAT has added a child package to Text_IO to add support for reading into an unbounded_string directly. It has also added a child packet to Ada.Strings.Unbounded, to return a pointer to the underlying string. This will make conversions from unbounded_string to string more efficient. The Charles library also has a string container package, that provides a similar function to return a pointer to the underlying string. It would be simple enough (and also more efficient) to add a child package (did I do it already?) to read into an unbounded string container type directly. http://home.earthlink.net/~matthewjheaney/charles/ I'll have a new release of the charles library probably later today (Fri, 27 June 2003). If there's something you need right away maybe I can fold it into today's release. Realize that you have a similar issue in C++, because you have both type char* and class std::string. The std::string class has a member function c_str() that allocs a const char* array containing the current value of the string.