]> git.tdb.fi Git - libs/core.git/blobdiff - source/filtered.h
Drop copyright and license notices from files
[libs/core.git] / source / filtered.h
index 057517547c5ea7aa9afdfd80a9f78ff2292bfa75..98cda4740a1700c3e41903156fce1de3c088f9b2 100644 (file)
@@ -1,10 +1,3 @@
-/* $Id$
-
-This file is part of libmspio
-Copyright © 2008  Mikko Rasa, Mikkosoft Productions
-Distributed under the LGPL
-*/
-
 #ifndef MSP_IO_FILTERED_H_
 #define MSP_IO_FILTERED_H_
 
@@ -19,8 +12,8 @@ private:
        {
                Filtered &f;
 
-               Activator(Filtered &f_): f(f_) { f.active=true; }
-               ~Activator() { f.active=false; }
+               Activator(Filtered &f_): f(f_) { f.active = true; }
+               ~Activator() { f.active = false; }
        };
 
        F filter;
@@ -28,6 +21,7 @@ private:
 
 public:
        Filtered(): filter(*this), active(false) { }
+       ~Filtered() { active = true; }
 
        template<typename A0>
        Filtered(A0 a0): B(a0), filter(*this), active(false) { }
@@ -35,6 +29,10 @@ public:
        template<typename A0, typename A1>
        Filtered(A0 a0, A1 a1): B(a0, a1), filter(*this), active(false) { }
 
+       virtual unsigned put(char c) { return filter.put(c); }
+       virtual bool getline(std::string &l) { return filter.getline(l); }
+       virtual int get() { return filter.get(); }
+
        F &get_filter() { return filter; }
 protected:
        virtual unsigned do_write(const char *b, unsigned s)