]> git.tdb.fi Git - libs/core.git/blobdiff - source/io/base.cpp
Unify end-of-file handling
[libs/core.git] / source / io / base.cpp
index fe706fd5b3cf5cad6b7c5b52e5f229992d5ac933..bf4c82018dc60d9a6d4ddd18be350468f9a4c0a0 100644 (file)
@@ -48,5 +48,14 @@ int Base::get()
        return static_cast<unsigned char>(c);
 }
 
        return static_cast<unsigned char>(c);
 }
 
+void Base::set_eof()
+{
+       if(!eof_flag)
+       {
+               eof_flag = true;
+               signal_end_of_file.emit();
+       }
+}
+
 } // namespace IO
 } // namespace Msp
 } // namespace IO
 } // namespace Msp