head 1.4; access; symbols; locks; strict; comment @# @; 1.4 date 2002.09.07.01.50.40; author curt; state Exp; branches; next 1.3; 1.3 date 2002.08.31.19.01.58; author curt; state Exp; branches; next 1.2; 1.2 date 2002.08.31.18.54.04; author curt; state Exp; branches; next 1.1; 1.1 date 2002.02.15.17.22.01; author curt; state Exp; branches; next ; desc @@ 1.4 log @Updated doxygen docs. @ text @
Main Page Class Hierarchy Compound List File List Compound Members File Members

# sgstream.hxx

Go to the documentation of this file.

    00001
    00006 // Written by Bernie Bright, 1998
    00007 //
    00008 // Copyright (C) 1998  Bernie Bright - bbright@@c031.aone.net.au
    00009 //
    00010 // This library is free software; you can redistribute it and/or
    00011 // modify it under the terms of the GNU Library General Public
    00012 // License as published by the Free Software Foundation; either
    00013 // version 2 of the License, or (at your option) any later version.
    00014 //
    00015 // This library is distributed in the hope that it will be useful,
    00016 // but WITHOUT ANY WARRANTY; without even the implied warranty of
    00017 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    00018 // Library General Public License for more details.
    00019 //
    00020 // You should have received a copy of the GNU Library General Public
    00021 // License along with this library; if not, write to the
    00022 // Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    00023 // Boston, MA  02111-1307, USA.
    00024 //
    00025 // $Id: sgstream.hxx,v 1.2 2001/05/15 19:26:23 curt Exp $
    00026
    00027
    00028 #ifndef _SGSTREAM_HXX
    00029 #define _SGSTREAM_HXX
    00030
    00031 #ifndef __cplusplus
    00032 # error This library requires C++
    00033 #endif
    00034
    00035 #include <simgear/compiler.h>
    00036
    00037 #if defined( SG_HAVE_STD_INCLUDES )
    00038 #  include <istream>
    00039 #elif defined ( SG_HAVE_NATIVE_SGI_COMPILERS )
    00040 #  include <CC/stream.h>
    00041 #elif defined ( __BORLANDC__ )
    00042 #  include <iostream>
    00043 #else
    00044 #  include <istream.h>
    00045 #endif
    00046
    00047 #include STL_STRING
    00048
    00049 #include <simgear/misc/zfstream.hxx>
    00050
    00051 SG_USING_STD(string);
    00052
    00053 #ifndef SG_HAVE_NATIVE_SGI_COMPILERS
    00054 SG_USING_STD(istream);
    00055 #endif
    00056
    00057
    00061 class sg_gzifstream : private gzifstream_base, public istream
    00062 {
    00063 public:
    00065     sg_gzifstream();
    00066
    00073     sg_gzifstream( const string& name,
    00074                    ios_openmode io_mode = ios_in | ios_binary );
    00075
    00081     sg_gzifstream( int fd, ios_openmode io_mode = ios_in|ios_binary );
    00082
    00088     void open( const string& name,
    00089                ios_openmode io_mode = ios_in|ios_binary );
    00090
    00096     void attach( int fd, ios_openmode io_mode = ios_in|ios_binary );
    00097
    00101     void close() { gzbuf.close(); }
    00102
    00104     bool is_open() { return gzbuf.is_open(); }
    00105
    00106 private:
    00107     // Not defined!
    00108     sg_gzifstream( const sg_gzifstream& );
    00109     void operator= ( const sg_gzifstream& );
    00110 };
    00111
    00117 istream& skipeol( istream& in );
    00118
    00124 istream& skipws( istream& in );
    00125
    00132 istream& skipcomment( istream& in );
    00133
    00134
    00135 #endif /* _SGSTREAM_HXX */
    00136

@ 1.3 log @Oops, try again. @ text @d96 1 a96 1