This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: filename from fstream object
- From: Bernd Speiser <bernd dot speiser at uni-tuebingen dot de>
- To: John Love-Jensen <eljay at adobe dot com>, gcc-help at gcc dot gnu dot org
- Date: Sat, 18 Jan 2003 01:03:33 +0100
- Subject: Re: filename from fstream object
- Organization: Univ. Tuebingen, Inst. f. Organische Chemie
- References: <BA417460.69F7%eljay@adobe.com>
- Reply-to: bernd dot speiser at uni-tuebingen dot de
John Love-Jensen wrote:
>
> Hi Bernd,
>
> You can roll your own...
>
> class NamedIfstream : public ifstream {
> public:
> private:
> string mName;
> };
>
John,
OK, good idea. I've written some minimal classes (NamedIFileStream,
NamedOFileStream)
for this, and packed them together with a small number of other classes which I
find useful as utilities into a library.
It can be downloaded from
http://www.echem.uni-tuebingen.de/~bs/echem/software/BSUtilities.shtml
Interested people could just use the code from the header file included in the
distribution.
The present version works with gcc 3.2, I found that it doesn't work with
2.95.3,
since the parameter sequence for the open function in <fstream> has changed.
Bernd
--
=======================================================================
Bernd Speiser
Institut f"ur Organische Chemie
Auf der Morgenstelle 18
D-72076 T"ubingen
Germany
phone: +49-7071-2976205 (office) +49-7071-2976242 (laboratory)
fax: +49-7071-295518 (new!)
e-mail: bernd.speiser@uni-tuebingen.de
Internet: http://www.uni-tuebingen.de/speiser
=======================================================================