]> git.donarmstrong.com Git - flightcrew.git/blob - src/zipios/zipios++/filterinputstreambuf.h
Imported Upstream version 0.7.2+dfsg
[flightcrew.git] / src / zipios / zipios++ / filterinputstreambuf.h
1 #ifndef FILTERINPUTSTREAMBUF_H
2 #define FILTERINPUTSTREAMBUF_H
3
4 #include "zipios++/zipios-config.h"
5
6 #include "zipios++/meta-iostreams.h"
7
8 namespace zipios {
9
10 using std::streambuf ;
11
12 /** An input streambuf filter is a streambuf that filters the input it
13  gets from the streambuf it is attached to. FilterInputStreambuf is a base class to
14  derive input streambuf filters from. */
15 class FilterInputStreambuf : public streambuf {
16 public:
17   /** Constructor.
18       @param inbuf the streambuf to use for input.
19       @param del_inbuf if true is specified inbuf will be deleted, when 
20       the FilterInputStreambuf is destructed.
21   */
22   explicit FilterInputStreambuf( streambuf *inbuf, bool del_inbuf = false ) ;
23   /** Destructor. */
24   virtual ~FilterInputStreambuf() ;
25
26 protected:
27   int _s_pos ; // Position in this streambuf - FIXME: is this used?
28   streambuf *_inbuf ;
29   bool _del_inbuf ;
30 private:
31
32   /** Copy-constructor is private to prevent copying. */
33   FilterInputStreambuf( const FilterInputStreambuf &src ) ;
34
35   /** Copy-assignment operator is private to prevent copying.  */
36   const FilterInputStreambuf &operator= ( const FilterInputStreambuf &src ) ;
37 };
38
39
40 } // namespace 
41
42
43 #endif
44
45 /** \file
46     Header file that defines FilterInputStreambuf.
47 */
48
49 /*
50   Zipios++ - a small C++ library that provides easy access to .zip files.
51   Copyright (C) 2000  Thomas Søndergaard
52   
53   This library is free software; you can redistribute it and/or
54   modify it under the terms of the GNU Lesser General Public
55   License as published by the Free Software Foundation; either
56   version 2 of the License, or (at your option) any later version.
57   
58   This library is distributed in the hope that it will be useful,
59   but WITHOUT ANY WARRANTY; without even the implied warranty of
60   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
61   Lesser General Public License for more details.
62   
63   You should have received a copy of the GNU Lesser General Public
64   License along with this library; if not, write to the Free Software
65   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
66 */