#ifndef __JLANG__JNULLSTREAM__ #define __JLANG__JNULLSTREAM__ #include #include #include "JLang/JNullStreamBuffer.hh" /** * \author mdejong */ namespace JLANG {} namespace JPP { using namespace JLANG; } namespace JLANG { /** * Streaming of input. */ class JNullStream : protected JNullStreamBuffer, public std::istream, public std::ostream { public: /** * Default constructor. */ JNullStream() : JNullStreamBuffer(), std::istream(this), std::ostream(this) {} /** * Close stream. * This method does nothing. */ void close() {} }; /** * Null I/O stream. */ static JNullStream null; } #endif