Jpp
JNullStream.hh
Go to the documentation of this file.
1 #ifndef __JLANG__JNULLSTREAM__
2 #define __JLANG__JNULLSTREAM__
3 
4 #include <istream>
5 #include <ostream>
6 
8 
9 
10 /**
11  * \author mdejong
12  */
13 
14 namespace JLANG {}
15 namespace JPP { using namespace JLANG; }
16 
17 namespace JLANG {
18 
19 
20  /**
21  * Streaming of input.
22  */
23  class JNullStream :
24  protected JNullStreamBuffer,
25  public std::istream,
26  public std::ostream
27  {
28  public:
29  /**
30  * Default constructor.
31  */
34  std::istream(this),
35  std::ostream(this)
36  {}
37 
38 
39  /**
40  * Close stream.
41  * This method does nothing.
42  */
43  void close()
44  {}
45  };
46 
47 
48  /**
49  * Null I/O stream.
50  */
51  static JNullStream null;
52 }
53 
54 #endif
JNullStreamBuffer.hh
JLANG::JNullStream::JNullStream
JNullStream()
Default constructor.
Definition: JNullStream.hh:32
JLANG::JNullStreamBuffer
Null stream buffer.
Definition: JNullStreamBuffer.hh:21
JLANG::JNullStream
Streaming of input.
Definition: JNullStream.hh:23
JPP
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Definition: JAAnetToolkit.hh:37
JLANG::JNullStream::close
void close()
Close stream.
Definition: JNullStream.hh:43
std
Definition: jaanetDictionary.h:36
JLANG
Auxiliary classes and methods for language specific functionality.
Definition: JAbstractClass.hh:10